# HG changeset patch # User Ideenmodellierer # Date 1550596398 -3600 # Node ID 135eae957389cede85b3f509e883a264c7d88e97 # Parent f35e53ef04e0c74f7e22d94a5c4f3b3149a8a56e Add compile switch to disable optimization for specific function diff -r f35e53ef04e0 -r 135eae957389 Discovery/Src/base.c --- a/Discovery/Src/base.c Sun Feb 17 21:29:38 2019 +0100 +++ b/Discovery/Src/base.c Tue Feb 19 18:13:18 2019 +0100 @@ -589,12 +589,14 @@ case BaseMenu: case BaseInfo: updateSetpointStateUsed(); + DateEx_copy_to_dataOut(); - DataEX_call(); DataEX_copy_to_LifeData(&modeChange); //foto session :-) stateRealGetPointerWrite()->lifeData.battery_charge = 99; //foto session :-) stateSimGetPointerWrite()->lifeData.battery_charge = 99; DataEX_copy_to_deco(); + DataEX_call(); + if(stateUsed == stateSimGetPointer()) simulation_UpdateLifeData(1); check_warning(); @@ -602,7 +604,7 @@ logbook_InitAndWrite(); updateMiniLiveLogbook(1); timer_UpdateSecond(1); -base_tempLightLevel = TIM_BACKLIGHT_adjust(); + base_tempLightLevel = TIM_BACKLIGHT_adjust(); tCCR_tick(); tHome_tick(); if(status.base == BaseHome) @@ -1097,7 +1099,7 @@ } -void delayMicros(uint32_t micros) +__attribute__((optimize("O0"))) void delayMicros(uint32_t micros) { micros = micros * (168/4) - 10; while(micros--);