comparison Discovery/Src/tMenuEditHardware.c @ 110:cc8e24374b83 FlipDisplay

Added option to handled mirrored display to existing functions
author Ideenmodellierer
date Tue, 01 Jan 2019 21:02:17 +0100
parents 5f11787b4f42
children 3834b6272ee5
comparison
equal deleted inserted replaced
109:65a6e352ce08 110:cc8e24374b83
42 void openEdit_O2Sensors(void); 42 void openEdit_O2Sensors(void);
43 void openEdit_Brightness(void); 43 void openEdit_Brightness(void);
44 //void openEdit_Luftintegration(void); 44 //void openEdit_Luftintegration(void);
45 void openEdit_ButtonSens(void); 45 void openEdit_ButtonSens(void);
46 void openEdit_ScooterControl(void); 46 void openEdit_ScooterControl(void);
47 void openEdit_FlipDisplay(void);
47 48
48 /* Announced function prototypes -----------------------------------------------*/ 49 /* Announced function prototypes -----------------------------------------------*/
49 uint8_t OnAction_Compass (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); 50 uint8_t OnAction_Compass (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action);
50 uint8_t OnAction_Bearing (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); 51 uint8_t OnAction_Bearing (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action);
51 uint8_t OnAction_BearingClear (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); 52 uint8_t OnAction_BearingClear (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action);
86 break; 87 break;
87 case 5: 88 case 5:
88 openEdit_ButtonSens(); 89 openEdit_ButtonSens();
89 break; 90 break;
90 case 6: 91 case 6:
91 openEdit_ScooterControl(); 92 if(getLicence() == LICENCEBONEX)
93 {
94 openEdit_ScooterControl();
95 }
96 else
97 {
98 openEdit_FlipDisplay();
99 }
92 break; 100 break;
93 } 101 }
94 } 102 }
95 103
96 /* Private functions ---------------------------------------------------------*/ 104 /* Private functions ---------------------------------------------------------*/
111 MX_Bluetooth_PowerOff(); 119 MX_Bluetooth_PowerOff();
112 } 120 }
113 exitMenuEdit_to_Menu_with_Menu_Update_do_not_write_settings_for_this_only(); 121 exitMenuEdit_to_Menu_with_Menu_Update_do_not_write_settings_for_this_only();
114 } 122 }
115 123
124 void openEdit_FlipDisplay(void)
125 {
126 /* does not work like this resetEnterPressedToStateBeforeButtonAction(); */
127
128 SSettings *pSettings = settingsGetPointer();
129
130 if(pSettings->FlipDisplay == 0)
131 {
132 pSettings->FlipDisplay = 1;
133 }
134 else
135 {
136 pSettings->FlipDisplay = 0;
137 }
138 /* reinit all views */
139 tHome_init();
140 tI_init();
141 tM_init();
142 tMenuEdit_init();
143 tInfoLog_init();
144 tM_build_pages();
145
146
147 exitEditWithUpdate();
148 exitMenuEdit_to_Home();
149 }
116 /* 150 /*
117 void refresh_ScooterControl(void) 151 void refresh_ScooterControl(void)
118 { 152 {
119 char text[256]; 153 char text[256];
120 154
467 } 501 }
468 */ 502 */
469 503
470 void refresh_O2Sensors(void) 504 void refresh_O2Sensors(void)
471 { 505 {
472 char text[10]; 506 char text[16];
473 uint16_t y_line; 507 uint16_t y_line;
474 508
475 text[0] = '\001'; 509 text[0] = '\001';
476 text[1] = TXT_o2Sensors; 510 text[1] = TXT_o2Sensors;
477 text[2] = 0; 511 text[2] = 0;