Skip to content

Commit 43dc170

Browse files
committed
Update hardware version function to start incrementation on version 3
1 parent 2f75351 commit 43dc170

File tree

1 file changed

+1
-1
lines changed
  • AxxSolder_firmware/Core/Src

1 file changed

+1
-1
lines changed

AxxSolder_firmware/Core/Src/main.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ void get_mcu_temp(){
372372

373373
/* Function to get the hardware version based on version bit pins */
374374
uint8_t get_hw_version(){
375-
return (HAL_GPIO_ReadPin(GPIOC, VERSION_BIT_3_Pin) << 2) + (HAL_GPIO_ReadPin(GPIOC, VERSION_BIT_2_Pin) << 1) + (HAL_GPIO_ReadPin(GPIOC, VERSION_BIT_1_Pin));
375+
return 3 + (HAL_GPIO_ReadPin(GPIOC, VERSION_BIT_3_Pin) << 2) + (HAL_GPIO_ReadPin(GPIOC, VERSION_BIT_2_Pin) << 1) + (HAL_GPIO_ReadPin(GPIOC, VERSION_BIT_1_Pin)); //version counting starts at version 3
376376
}
377377

378378
uint16_t RGB_to_BRG(uint16_t color){

0 commit comments

Comments
 (0)