mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-13 21:48:25 +08:00
Merge branch 'oopuuu:master' into master
This commit is contained in:
@@ -519,6 +519,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<div class="mdl-card__actions mdl-card--border">
|
<div class="mdl-card__actions mdl-card--border">
|
||||||
|
<span>提示:长按电源按钮5s可开启热点重新配网,10s恢复出厂设置</span>
|
||||||
<div class="mdl-layout-spacer"></div>
|
<div class="mdl-layout-spacer"></div>
|
||||||
<i class="material-icons">
|
<i class="material-icons">
|
||||||
<svg>
|
<svg>
|
||||||
|
|||||||
@@ -519,7 +519,7 @@ void UserMqttHassAuto(char socket_id) {
|
|||||||
"\"name\":\"TC1_%s\","
|
"\"name\":\"TC1_%s\","
|
||||||
"\"model\":\"TC1\","
|
"\"model\":\"TC1\","
|
||||||
"\"manufacturer\":\"PHICOMM\"}}",
|
"\"manufacturer\":\"PHICOMM\"}}",
|
||||||
user_config->socket_names[socket_id], str_mac, socket_id, str_mac, socket_id,
|
user_config->socket_names[(int)socket_id], str_mac, socket_id, str_mac, socket_id,
|
||||||
str_mac,
|
str_mac,
|
||||||
socket_id, str_mac, socket_id, str_mac, str_mac);
|
socket_id, str_mac, socket_id, str_mac, str_mac);
|
||||||
UserMqttSendTopic(topic_buf, send_buf, 1);
|
UserMqttSendTopic(topic_buf, send_buf, 1);
|
||||||
|
|||||||
@@ -103,11 +103,11 @@ void UserRelaySetAll(char y)
|
|||||||
UserRelaySet(i, y);
|
UserRelaySet(i, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void KeyLongPress(void)
|
static void KeyLong5sPress(void)
|
||||||
{
|
{
|
||||||
// key_log("KeyLongPress");
|
key_log("WARNGIN: wifi ap started!");
|
||||||
// UserLedSet(1);
|
sys_config->micoSystemConfig.ssid[0] = 0;
|
||||||
// UserMqttSend("mqtt test");
|
mico_system_context_update(mico_system_context_get());
|
||||||
}
|
}
|
||||||
|
|
||||||
static void KeyLong10sPress(void)
|
static void KeyLong10sPress(void)
|
||||||
@@ -156,9 +156,9 @@ static void KeyTimeoutHandler(void* arg)
|
|||||||
{
|
{
|
||||||
key_log("button long pressed:%d",key_time);
|
key_log("button long pressed:%d",key_time);
|
||||||
|
|
||||||
if (key_time == 30)
|
if (key_time == 50)
|
||||||
{
|
{
|
||||||
KeyLongPress();
|
KeyLong5sPress();
|
||||||
}
|
}
|
||||||
else if (key_time == 100)
|
else if (key_time == 100)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user