comparison Discovery/Src/base.c @ 718:b9f699d2e3d0

Updated menu structure to support new sensor information page: The sensor information page has been added to the sensor submenu of the hardware menu. It will be shown dynamically in case a smart sensor is detected. In order to have this dynamic visualization some new functions had to be added to the general menu file. The information page returns to the sensor menu, for this behavior also a new function had to be added.
author Ideenmodellierer
date Sun, 20 Nov 2022 20:49:41 +0100
parents d55817a11f4c
children 5078da3845c0
comparison
equal deleted inserted replaced
717:88f73b05d45c 718:b9f699d2e3d0
210 #include "show_logbook.h" 210 #include "show_logbook.h"
211 #include "text_multilanguage.h" 211 #include "text_multilanguage.h"
212 #include "tHome.h" 212 #include "tHome.h"
213 #include "tInfo.h" 213 #include "tInfo.h"
214 #include "tInfoLog.h" 214 #include "tInfoLog.h"
215 #include "tInfoSensor.h"
215 #include "tMenu.h" 216 #include "tMenu.h"
216 #include "tMenuEdit.h" 217 #include "tMenuEdit.h"
217 #include "tMenuEditGasOC.h" 218 #include "tMenuEditGasOC.h"
218 #include "tStructure.h" 219 #include "tStructure.h"
219 #include "externLogbookFlash.h" 220 #include "externLogbookFlash.h"
697 case BaseMenu: 698 case BaseMenu:
698 tM_refresh_live_content(); 699 tM_refresh_live_content();
699 tMenuEdit_refresh_live_content(); 700 tMenuEdit_refresh_live_content();
700 break; 701 break;
701 case BaseInfo: 702 case BaseInfo:
702 tInfo_refresh(); ///< only compass at the moment 23.Feb.2015 hw 703 tInfo_refresh();
703 break; 704 break;
704 case BaseComm: /* refresh already done in tim callback */ 705 case BaseComm: /* refresh already done in time callback */
705 break; 706 break;
706 default: 707 default:
707 if(get_globalState() == StStop) 708 if(get_globalState() == StStop)
708 tHome_sleepmode_fun(); 709 tHome_sleepmode_fun();
709 break; 710 break;
814 sendActionToMenu(action); 815 sendActionToMenu(action);
815 else 816 else
816 sendActionToMenuEdit(action); 817 sendActionToMenuEdit(action);
817 break; 818 break;
818 819
819 case BaseInfo: 820 case BaseInfo: switch(status.page)
820 if (status.page == InfoPageLogList) 821 {
821 sendActionToInfoLogList(action); 822 case InfoPageLogList: sendActionToInfoLogList(action);
822 else if (status.page == InfoPageLogShow) 823 break;
823 sendActionToInfoLogShow(action); 824 case InfoPageLogShow: sendActionToInfoLogShow(action);
824 else 825 break;
825 sendActionToInfo(action); 826 case InfoPageSensor: sendActionToInfoSensor(action);
827 break;
828 default: sendActionToInfo(action);
829 break;
830 }
826 break; 831 break;
827 832
828 default: 833 default:
829 break; 834 break;
830 } 835 }
1788 break; 1793 break;
1789 1794
1790 case BaseInfo: 1795 case BaseInfo:
1791 if((timeout_in_seconds >= settingsGetPointer()->timeoutInfo) || RequestModeChange) 1796 if((timeout_in_seconds >= settingsGetPointer()->timeoutInfo) || RequestModeChange)
1792 { 1797 {
1793 if(status.page == InfoPageLogList) 1798 timeout_in_seconds = 0;
1799
1800 switch(status.page)
1794 { 1801 {
1795 exitLog(); 1802 case InfoPageLogList: exitLog();
1796 timeout_in_seconds = 0; 1803 break;
1797 } 1804 case InfoPageLogShow: show_logbook_exit();
1798 else 1805 exitLog();
1799 if(status.page == InfoPageLogShow) 1806 break;
1800 { 1807 case InfoPageCompass: /* compass has individual timeout */
1801 show_logbook_exit(); 1808 break;
1802 exitLog(); 1809 case InfoPageSensor: exitInfoToBack();
1803 timeout_in_seconds = 0; 1810 break;
1804 } 1811 default: exitInfo();
1805 else 1812 break;
1806 if(status.page != InfoPageCompass)
1807 {
1808 exitInfo();
1809 timeout_in_seconds = 0;
1810 } 1813 }
1811 } 1814 }
1812 break; 1815 break;
1813 default: 1816 default:
1814 break; 1817 break;