comparison Discovery/Src/base.c @ 615:556df4a8f418

Moved non critical functions from timer interrupt to main loop: Especially the drawing of the minilog could potentially cause an overrun of the timer interrupt without need => Moved to main loop.
author Ideenmodellierer
date Wed, 27 Jan 2021 21:56:48 +0100
parents 916998f90e39
children 6826731ff2be
comparison
equal deleted inserted replaced
614:7d6a51bb21d1 615:556df4a8f418
498 deco_loop(); 498 deco_loop();
499 TriggerButtonAction(); 499 TriggerButtonAction();
500 if(DoDisplayRefresh) /* set every 100ms by timer interrupt */ 500 if(DoDisplayRefresh) /* set every 100ms by timer interrupt */
501 { 501 {
502 DoDisplayRefresh = 0; 502 DoDisplayRefresh = 0;
503
504 if(stateUsed == stateSimGetPointer())
505 {
506 simulation_UpdateLifeData(1);
507 }
508 check_warning();
509 updateMiniLiveLogbook(1);
510
503 RefreshDisplay(); 511 RefreshDisplay();
504
505 TimeoutControl(); /* exit menus if needed */ 512 TimeoutControl(); /* exit menus if needed */
506 513
507 #ifdef ENABLE_MOTION_CONTROL 514 #ifdef ENABLE_MOTION_CONTROL
508 if((stateUsed->mode == MODE_DIVE) && (settingsGetPointer()->MotionDetection != MOTION_DETECT_OFF)) /* handle motion events in divemode only */ 515 if((stateUsed->mode == MODE_DIVE) && (settingsGetPointer()->MotionDetection != MOTION_DETECT_OFF)) /* handle motion events in divemode only */
509 { 516 {
581 //foto session :-) stateRealGetPointerWrite()->lifeData.battery_charge = 99; 588 //foto session :-) stateRealGetPointerWrite()->lifeData.battery_charge = 99;
582 //foto session :-) stateSimGetPointerWrite()->lifeData.battery_charge = 99; 589 //foto session :-) stateSimGetPointerWrite()->lifeData.battery_charge = 99;
583 DataEX_copy_to_deco(); 590 DataEX_copy_to_deco();
584 DataEX_call(); 591 DataEX_call();
585 592
586 if(stateUsed == stateSimGetPointer())
587 {
588 simulation_UpdateLifeData(1);
589 }
590
591 check_warning();
592 updateMiniLiveLogbook(1);
593 timer_UpdateSecond(1); 593 timer_UpdateSecond(1);
594 base_tempLightLevel = TIM_BACKLIGHT_adjust(); 594 base_tempLightLevel = TIM_BACKLIGHT_adjust();
595 tCCR_tick(); 595 tCCR_tick();
596 tHome_tick(); 596 tHome_tick();
597 break; 597 break;