This commit is contained in:
parent
c8f605082a
commit
9d7496aac2
|
@ -53,7 +53,7 @@ static void _CommonBtnEvtCb (void *arg)
|
||||||
{
|
{
|
||||||
// static rt_uint8_t button_cnt = 0;
|
// static rt_uint8_t button_cnt = 0;
|
||||||
|
|
||||||
if (flex_button_event_read (&user_button[USER_BUTTON_1]) == FLEX_BTN_PRESS_DOUBLE_CLICK)
|
if (flex_button_event_read (&user_button[USER_BUTTON_1]) == FLEX_BTN_PRESS_CLICK)
|
||||||
{
|
{
|
||||||
if(SysControl.status != kCalibrationEvent)
|
if(SysControl.status != kCalibrationEvent)
|
||||||
{
|
{
|
||||||
|
@ -94,7 +94,7 @@ static void _CommonBtnEvtCb (void *arg)
|
||||||
// }
|
// }
|
||||||
// button_cnt++;
|
// button_cnt++;
|
||||||
}
|
}
|
||||||
else if (flex_button_event_read(&user_button[USER_BUTTON_1]) == FLEX_BTN_PRESS_LONG_HOLD)
|
else if ((flex_button_event_read(&user_button[USER_BUTTON_1]) == FLEX_BTN_PRESS_LONG_HOLD)&&(flex_button_event_read(&user_button[USER_BUTTON_0]) == FLEX_BTN_PRESS_REPEAT_CLICK))
|
||||||
{
|
{
|
||||||
LOG_I("本地清除阀门信息");
|
LOG_I("本地清除阀门信息");
|
||||||
rt_uint8_t mac_addr[6] = {0};
|
rt_uint8_t mac_addr[6] = {0};
|
||||||
|
|
|
@ -1851,6 +1851,7 @@ static void Ml307_Life_Thread_Entry(void *parameter)
|
||||||
}
|
}
|
||||||
if (device->class->device_ops->control(device, AT_DEVICE_CTRL_POWER_OFF, RT_NULL) == RT_EOK)
|
if (device->class->device_ops->control(device, AT_DEVICE_CTRL_POWER_OFF, RT_NULL) == RT_EOK)
|
||||||
{
|
{
|
||||||
|
rt_thread_mdelay(RT_TICK_PER_SECOND);
|
||||||
if (device->class->device_ops->control(device, AT_DEVICE_CTRL_POWER_ON, RT_NULL) == RT_EOK)
|
if (device->class->device_ops->control(device, AT_DEVICE_CTRL_POWER_ON, RT_NULL) == RT_EOK)
|
||||||
{
|
{
|
||||||
LOG_D("AT device power on success");
|
LOG_D("AT device power on success");
|
||||||
|
|
Loading…
Reference in New Issue