Skip to content

Commit

Permalink
Bugfix vor rebooting with slow Bafang protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
stancecoke authored Jun 19, 2024
1 parent 90f6ad2 commit 58e86c3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -568,35 +568,42 @@ int main(void)
Hall_45 = temp<<16;
printf_("Hall_45: %d \n", (int16_t) (((Hall_45 >> 23) * 180) >> 8));
printf_("Hall_45: %u \n", Hall_45);
HAL_IWDG_Refresh(&hiwdg);

EE_ReadVariable(EEPROM_POS_HALL_51, &temp);
Hall_51 = temp<<16;
printf_("Hall_51: %d \n", (int16_t) (((Hall_51 >> 23) * 180) >> 8));
printf_("Hall_51: %u \n", Hall_51);
HAL_IWDG_Refresh(&hiwdg);

EE_ReadVariable(EEPROM_POS_HALL_13, &temp);
Hall_13 = temp<<16;
printf_("Hall_13: %d \n", (int16_t) (((Hall_13 >> 23) * 180) >> 8));
printf_("Hall_13: %u \n", Hall_13);
HAL_IWDG_Refresh(&hiwdg);

EE_ReadVariable(EEPROM_POS_HALL_32, &temp);
Hall_32 = temp<<16;
printf_("Hall_32: %d \n", (int16_t) (((Hall_32 >> 23) * 180) >> 8));
printf_("Hall_32: %u \n", Hall_32);
HAL_IWDG_Refresh(&hiwdg);

EE_ReadVariable(EEPROM_POS_HALL_26, &temp);
Hall_26 = temp<<16;
printf_("Hall_26: %d \n", (int16_t) (((Hall_26 >> 23) * 180) >> 8));
printf_("Hall_26: %u \n", Hall_26);
HAL_IWDG_Refresh(&hiwdg);

EE_ReadVariable(EEPROM_POS_HALL_64, &temp);
Hall_64 = temp<<16;
printf_("Hall_64: %d \n", (int16_t) (((Hall_64 >> 23) * 180) >> 8));
printf_("Hall_64: %u \n", Hall_64);
HAL_IWDG_Refresh(&hiwdg);

EE_ReadVariable(EEPROM_POS_KV, &ui32_KV);
if(!ui32_KV)ui32_KV=111;
printf_("KV: %d \n",ui32_KV );
HAL_IWDG_Refresh(&hiwdg);

}

Expand Down

0 comments on commit 58e86c3

Please sign in to comment.