diff --git a/README.md b/README.md
index fabd2f2..4c16ac1 100644
--- a/README.md
+++ b/README.md
@@ -1,17 +1,25 @@
-# zTC1 a1版
-**斐讯TC1智能排插第三方固件.**
+# 斐讯TC1 a1智能排插第三方固件
+排插TC1因为服务器关闭,无法使用. 故而为其开发一个不需要服务器也能满足基本智能控制使用的固件.
-排插TC1因为服务器关闭,无法使用. 故而为其开发一个不需要服务器也能满足基本智能控制使用的固件.
+# 固件web界面
-**注意:** TC1排插硬件分a1 a2两个版本,本固件仅支持**a1版本**. a1 a2两个版本仅主控不同, 除此之外其他无任何区别.
+
+
+固件启动后, 会开启一个热点, 接热点后, 直接用浏览器访问: http://192.168.0.1 即可看到如web界面.
-## 区分硬件版本
+# 注意
+
+TC1排插硬件分a1 a2两个版本,本固件仅支持**a1版本**. a1 a2两个版本仅主控不同, 除此之外其他无任何区别.
+
+
+
+# 区分硬件版本
硬件版本在外包装底部,如图所示:
@@ -23,7 +31,7 @@
-## 已知BUG
+# 已知BUG
不定时重启断电!!!
@@ -31,7 +39,7 @@
-## 特性
+# 特性
本固件使用斐讯TC1排插硬件为基础,实现以下功能:
@@ -45,7 +53,7 @@
-## 开始
+# 开始
整体流程如下:拆开TC1,将固件/烧录器/pc互相连接,在pc运行烧录软件进行烧录,烧录固件.
@@ -53,7 +61,7 @@
-## 拆机接线及烧录固件相关
+# 拆机接线及烧录固件相关
见[固件烧录](https://github.com/a2633063/zTC1/wiki/固件烧录)
@@ -61,21 +69,21 @@
-## 开始使用/使用方法
+# 开始使用/使用方法
见[开始使用](https://github.com/a2633063/zTC1/wiki/开始使用)
-## 接入home assistant
+# 接入home assistant
见[homeassistant接入](https://github.com/a2633063/zTC1/wiki/homeassistant接入)
-## 其他内容
+# 其他内容
-### 代码编译
+## 代码编译
> 此项为专业开发人员准备,如果你不是开发人员,请跳过此项
@@ -90,7 +98,7 @@ TC1使用的主控为EMW3031,基于MiCO(MCU based Internet Connectivity Operatin
-### 通信协议
+## 通信协议
> 此项为专业开发人员准备,如果你不是开发人员,请跳过此项
diff --git a/TC1/http_server/demo/demo.html b/TC1/http_server/demo/demo.html
new file mode 100644
index 0000000..eef92a9
--- /dev/null
+++ b/TC1/http_server/demo/demo.html
@@ -0,0 +1,429 @@
+
+
+
power by github/zTC1
+ + + + diff --git a/TC1/http_server/demo/power b/TC1/http_server/demo/power new file mode 100644 index 0000000..063fd9f --- /dev/null +++ b/TC1/http_server/demo/power @@ -0,0 +1 @@ +{'idx':1332,'len':100,'p_count':36000000,'powers':[20,18,17,30,29,26,24,21,18,17,30,28,26,24,22,20,18,17,29,26,24,22,18,17,31,29,26,23,21,19,17,30,28,26,23,20,17,17,29,26,25,23,20,17,32,30,28,25,24,21,19,17,31,28,27,25,22,20,17,32,29,26,23,21,17,17,28,25,23,20,18,17,31,28,26,23,20,18,17,31,29,27,25,23,21,18,17,31,28,26,24,22,20,17,17,29,26,24,22,19],'up_time':'0:22:13'} diff --git a/TC1/http_server/demo/socket b/TC1/http_server/demo/socket new file mode 100644 index 0000000..e35291e --- /dev/null +++ b/TC1/http_server/demo/socket @@ -0,0 +1 @@ +1,1,0,1,0,1 \ No newline at end of file diff --git a/TC1/http_server/demo/status b/TC1/http_server/demo/status new file mode 100644 index 0000000..0139beb --- /dev/null +++ b/TC1/http_server/demo/status @@ -0,0 +1 @@ +{ 'sockets':'1,1,1,1,0,1', 'mode':1, 'station_ssid':'TL-5408', 'station_pwd':'stu@5408', 'ap_ssid':'TC1-AP', 'ap_pwd':'12345678', 'mqtt_addr':'MQTT.ADDR', 'mqtt_port':1883, 'ip':'192.168.33.222', 'mask':'255.255.255.0', 'gateway':'192.168.33.1', 'start_time':0} diff --git a/TC1/http_server/index.html b/TC1/http_server/index.html index db189c4..c38adb3 100644 --- a/TC1/http_server/index.html +++ b/TC1/http_server/index.html @@ -276,7 +276,7 @@ function GetPowerRecord() { var html = ""; for (var i = 0; i < power.powers.length; i++) { var curr_p = power.powers[i]/10; - p.innerHTML = curr_p; + p.innerHTML = curr_p.toFixed(2); var y = Math.pow(curr_p, 0.6); html += ""; position += 1; @@ -285,7 +285,8 @@ function GetPowerRecord() { power_line.innerHTML += html; power_line.scrollTo(power_line.scrollWidth, 0); //滑动到最后 } - w.innerHTML = power.p_count; //累加功率 + var w_v = (17.1 * power.p_count) / 1000 / 36000; + w.innerHTML = w_v.toFixed(2); //累加功率 uptime.innerHTML = power.up_time; window.setTimeout(GetPowerRecord, 3000); }, power_idx.toString()); diff --git a/build/TC1@MK3031@moc/binary/TC1@MK3031@moc.all.bin b/build/TC1@MK3031@moc/binary/TC1@MK3031@moc.all.bin index 3000aa3..5783db4 100644 Binary files a/build/TC1@MK3031@moc/binary/TC1@MK3031@moc.all.bin and b/build/TC1@MK3031@moc/binary/TC1@MK3031@moc.all.bin differ diff --git a/build/TC1@MK3031@moc/binary/TC1@MK3031@moc.ota.bin b/build/TC1@MK3031@moc/binary/TC1@MK3031@moc.ota.bin index 067c0ce..d390618 100644 Binary files a/build/TC1@MK3031@moc/binary/TC1@MK3031@moc.ota.bin and b/build/TC1@MK3031@moc/binary/TC1@MK3031@moc.ota.bin differ diff --git a/img/web.png b/img/web.png new file mode 100644 index 0000000..a798006 Binary files /dev/null and b/img/web.png differ