comparison Discovery/Src/base.c @ 662:1b995079c045 Betatest

PSCR Mode
author heinrichs weikamp
date Tue, 14 Dec 2021 15:36:10 +0100
parents 7b5a063f080f
children 7a352b449055
comparison
equal deleted inserted replaced
661:87bee7cc77b3 662:1b995079c045
505 } 505 }
506 if(DoDisplayRefresh) /* set every 100ms by timer interrupt */ 506 if(DoDisplayRefresh) /* set every 100ms by timer interrupt */
507 { 507 {
508 DoDisplayRefresh = 0; 508 DoDisplayRefresh = 0;
509 509
510 updateSetpointStateUsed();
510 if(stateUsed == stateSimGetPointer()) 511 if(stateUsed == stateSimGetPointer())
511 { 512 {
512 simulation_UpdateLifeData(1); 513 simulation_UpdateLifeData(1);
513 } 514 }
514 check_warning(); 515 check_warning();
586 switch(status.base) 587 switch(status.base)
587 { 588 {
588 case BaseHome: 589 case BaseHome:
589 case BaseMenu: 590 case BaseMenu:
590 case BaseInfo: 591 case BaseInfo:
591 updateSetpointStateUsed();
592
593 DateEx_copy_to_dataOut(); 592 DateEx_copy_to_dataOut();
594 DataEX_copy_to_LifeData(&modeChange); 593 DataEX_copy_to_LifeData(&modeChange);
595 //foto session :-) stateRealGetPointerWrite()->lifeData.battery_charge = 99; 594 //foto session :-) stateRealGetPointerWrite()->lifeData.battery_charge = 99;
596 //foto session :-) stateSimGetPointerWrite()->lifeData.battery_charge = 99; 595 //foto session :-) stateSimGetPointerWrite()->lifeData.battery_charge = 99;
597 DataEX_copy_to_deco(); 596 DataEX_copy_to_deco();
767 { 766 {
768 pSettings->design = 7; // auto switch to 9 if necessary 767 pSettings->design = 7; // auto switch to 9 if necessary
769 } 768 }
770 } else if ((status.page == PageDive) && (status.line != 0)) 769 } else if ((status.page == PageDive) && (status.line != 0))
771 { 770 {
772 if (pSettings->extraDisplay == EXTRADISPLAY_BIGFONT) 771 if(get_globalState() == StDMENU)
773 { 772 {
774 pSettings->design = 3; 773 if (pSettings->extraDisplay == EXTRADISPLAY_BIGFONT)
775 if(pSettings->MotionDetection == MOTION_DETECT_SECTOR)
776 { 774 {
777 DefineSectorCount(CUSTOMER_DEFINED_VIEWS); 775 pSettings->design = 3;
778 MapCVToSector(); 776 if(pSettings->MotionDetection == MOTION_DETECT_SECTOR)
777 {
778 DefineSectorCount(CUSTOMER_DEFINED_VIEWS);
779 MapCVToSector();
780 }
779 } 781 }
782 else if (pSettings->extraDisplay == EXTRADISPLAY_DECOGAME)
783 pSettings->design = 4;
780 } 784 }
781 else if (pSettings->extraDisplay == EXTRADISPLAY_DECOGAME)
782 pSettings->design = 4;
783 set_globalState(StD); 785 set_globalState(StD);
784 } 786 }
785 else 787 else
786 { 788 {
787 tHome_change_field_button_pressed(); 789 tHome_change_field_button_pressed();
1731 { 1733 {
1732 setBatteryPercentage(settingsGetPointer()->lastKnownBatteryPercentage); 1734 setBatteryPercentage(settingsGetPointer()->lastKnownBatteryPercentage);
1733 } 1735 }
1734 } 1736 }
1735 // stuff before and new @161121 CCR-sensor limit 10 minutes 1737 // stuff before and new @161121 CCR-sensor limit 10 minutes
1736 if((settingsGetPointer()->dive_mode == DIVEMODE_CCR) && (settingsGetPointer()->CCR_Mode == CCRMODE_Sensors)) 1738 if(isLoopMode(settingsGetPointer()->dive_mode) && (settingsGetPointer()->CCR_Mode == CCRMODE_Sensors))
1737 { 1739 {
1738 timeout_limit_Surface_in_seconds = settingsGetPointer()->timeoutSurfacemodeWithSensors; 1740 timeout_limit_Surface_in_seconds = settingsGetPointer()->timeoutSurfacemodeWithSensors;
1739 } 1741 }
1740 else 1742 else
1741 { 1743 {