|
|
@ -78,9 +78,11 @@ void one_conduction_process_rx_packet(uint8_t* rx, int len) { |
|
|
|
int32_t pumpworkstate = int32Param[1]; |
|
|
|
|
|
|
|
ZLOGI("update state mode:%d state:%d", workmode, pumpworkstate); |
|
|
|
zapp_get_gstate()->last_usr_operation_time = znordic_getpower_on_ms(); |
|
|
|
zapp_get_gstate()->hand_acid_mode = workmode; |
|
|
|
zapp_get_gstate()->work_state = pumpworkstate; |
|
|
|
send_success_receipt(rxheader, NULL, 0); |
|
|
|
|
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
@ -156,7 +158,11 @@ void process_online_workstate(app_event_t* event, uint16_t event_size) { // |
|
|
|
} |
|
|
|
|
|
|
|
if (zappcore_cur_state_haspassed_ms() > 3000 && time_since_usr_last_operation_ms() > 3000) { |
|
|
|
if (!zapp_get_gstate()->work_state) zappcore_change_state(kstate_online_standy); |
|
|
|
if (zapp_get_gstate()->work_state) return; |
|
|
|
if (zapp_get_gstate()->hand_acid_mode == khand_acid_m_unset_mode) { |
|
|
|
return; |
|
|
|
} |
|
|
|
zappcore_change_state(kstate_online_standy); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|