change back to HAL_Delay
This commit is contained in:
parent
2e28a807ea
commit
f302ff8041
|
@ -284,11 +284,8 @@ int main(void) {
|
||||||
int16_t board_temp_adcFilt = adc_buffer.temp;
|
int16_t board_temp_adcFilt = adc_buffer.temp;
|
||||||
int16_t board_temp_deg_c;
|
int16_t board_temp_deg_c;
|
||||||
|
|
||||||
uint32_t timePrev=0; //for loop timing
|
|
||||||
|
|
||||||
while(1) {
|
while(1) {
|
||||||
//HAL_Delay(DELAY_IN_MAIN_LOOP); //delay in ms
|
HAL_Delay(DELAY_IN_MAIN_LOOP); //delay in ms
|
||||||
if ((HAL_GetTick()-timePrev) > DELAY_IN_MAIN_LOOP) { // try with DELAY_IN_MAIN_LOOP = 5 ms and then with DELAY_IN_MAIN_LOOP = 10 ms
|
|
||||||
|
|
||||||
#ifdef CONTROL_NUNCHUCK
|
#ifdef CONTROL_NUNCHUCK
|
||||||
Nunchuck_Read();
|
Nunchuck_Read();
|
||||||
|
@ -516,8 +513,6 @@ int main(void) {
|
||||||
poweroff();
|
poweroff();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
timePrev = HAL_GetTick();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** System Clock Configuration
|
/** System Clock Configuration
|
||||||
|
|
Loading…
Reference in New Issue