zhyinch
2022-08-01 8961dfd8d31587ce62667e4f1941d92c5c685ef5
Src/main.c
@@ -136,7 +136,7 @@
//      g_com_map[MOTOR_ONTIME]--;
//      motor_state = 1;
//   }
if(g_com_map[MOTOR_ENABLE])
if(0)//g_com_map[MOTOR_ENABLE])
{
    
@@ -188,6 +188,7 @@
   if(HAL_GPIO_ReadPin(INPUT_5V_GPIO_Port,INPUT_5V_Pin))
   {
      nomove_count = 0;
        bat_percent=Get_Battary();
      if(state5v==0)
      {
         state5v=1;
@@ -306,7 +307,7 @@
   hardware_pici = STMFLASH_ReadHalfWord(FLASH_HARDWARE_VERSION_MAP+2);
   hardware_type = STMFLASH_ReadHalfWord(FLASH_HARDWARE_VERSION_MAP+4);
   //deca_sleep(1000);
   g_com_map[VERSION] = 0x011a;
   g_com_map[VERSION] = (1<<8)|33;
    active_flag = g_com_map[ACTIVE_INDEX];
       module_power = g_com_map[POWER];
   imu_enable=g_com_map[IMU_ENABLE];
@@ -330,9 +331,9 @@
#ifdef DEBUG_MODE
//   g_com_map[DEV_ROLE]=1;
//      g_com_map[DEV_ID]=1;
   g_com_map[COM_INTERVAL]=100;
//   g_com_map[COM_INTERVAL]=100;
//   g_com_map[MAX_REPORT_ANC_NUM]=1;
   g_com_map[NOMOVESLEEP_TIME]=10;
//   g_com_map[NOMOVESLEEP_TIME]=10;
#endif
      if(g_com_map[COM_INTERVAL]==0)
   {
@@ -478,7 +479,7 @@
      {
         waitusart_timer--;
      }
         if(m_bEUARTTxEn==0&&waitusart_timer==0&&(motor_state==0||motor_state==3))
         if(m_bEUARTTxEn==0&&waitusart_timer==0)
         {   
#ifndef DEBUG_MODE   
if(!HAL_GPIO_ReadPin(INPUT_5V_GPIO_Port,INPUT_5V_Pin))