| | |
| | | //deca_sleep(1000); |
| | | |
| | | g_com_map[GROUP_ID]=3; |
| | | g_com_map[VERSION] = (3<<8)|5; |
| | | g_com_map[VERSION] = (3<<8)|6; |
| | | |
| | | if (g_com_map[COM_INTERVAL] <50) |
| | | { |
| | |
| | | char str[17]= {"AT+IPR=9600;&W\r\n"}; |
| | | extern UART_HandleTypeDef huart5; |
| | | extern uint8_t stop_flag; |
| | | extern uint16_t beepontime; |
| | | u32 keystarttime,keystarttime2; |
| | | extern uint8_t userkey_state4g; |
| | | void UserKeyTask(void) |
| | | { |
| | | if(!HAL_GPIO_ReadPin(GPIOB,GPIO_PIN_1)) |
| | | { |
| | | if(HIDO_TimerGetTick() - keystarttime>1000) |
| | | { |
| | | beepontime = 2; |
| | | userkey_state4g = 1; |
| | | // userkey_state = 1; |
| | | // heartbeasend_flag = 1; |
| | | keystarttime = HIDO_TimerGetTick(); |
| | | } |
| | | }else |
| | | { |
| | | keystarttime = HIDO_TimerGetTick(); |
| | | keystarttime2 = HIDO_TimerGetTick(); |
| | | } |
| | | if(beepontime>0) |
| | | {Beep_On();} |
| | | else |
| | | {Beep_Off();} |
| | | Sleep_Panduan_Poll(); |
| | | |
| | | } |
| | | void Main_Poll() |
| | | { |
| | | // if(main_time>10&&only_one_flag==0) |
| | |
| | | HIDO_ATLitePoll(); |
| | | UDPClient_Poll(); |
| | | HAL_IWDG_Refresh(&hiwdg); |
| | | PowerDownDetect(); |
| | | PowerDownDetect(); |
| | | UserKeyTask(); |
| | | Sleep_Panduan_Poll(); |
| | | |
| | | } |
| | | // if(AIR780E_IsIPIdle() && Socket_IsSendQueueEmpty(0)) |
| | | // { |