change back to HAL_Delay

This commit is contained in:
interfisch 2019-12-06 22:08:17 +01:00
parent 2e28a807ea
commit f302ff8041
2 changed files with 210 additions and 215 deletions

View File

@ -284,11 +284,8 @@ int main(void) {
int16_t board_temp_adcFilt = adc_buffer.temp;
int16_t board_temp_deg_c;
uint32_t timePrev=0; //for loop timing
while(1) {
//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
HAL_Delay(DELAY_IN_MAIN_LOOP); //delay in ms
#ifdef CONTROL_NUNCHUCK
Nunchuck_Read();
@ -516,8 +513,6 @@ int main(void) {
poweroff();
}
}
timePrev = HAL_GetTick();
}
}
/** System Clock Configuration