comparison Discovery/Src/tMenuXtra.c @ 769:6b248bcdbf28

Deactivation of the 'fallback' option when the CCR mode is set to 'Fixed' - this makes it a little clearer that the option has no influence in this mode.
author heinrichsweikamp
date Fri, 21 Apr 2023 09:47:06 +0200
parents e81afd727993
children 4c41d9a18c7f
comparison
equal deleted inserted replaced
768:dfdfea8897f3 769:6b248bcdbf28
27 ////////////////////////////////////////////////////////////////////////////// 27 //////////////////////////////////////////////////////////////////////////////
28 28
29 /* Includes ------------------------------------------------------------------*/ 29 /* Includes ------------------------------------------------------------------*/
30 #include <stdio.h> 30 #include <stdio.h>
31 #include <string.h> 31 #include <string.h>
32 #include <stdbool.h>
32 #include "tMenu.h" 33 #include "tMenu.h"
33 #include "tStructure.h" 34 #include "tStructure.h"
34 #include "tMenuXtra.h" 35 #include "tMenuXtra.h"
35 #include "text_multilanguage.h" 36 #include "text_multilanguage.h"
36 #include "data_central.h" 37 #include "data_central.h"
150 textPointer += 2; 151 textPointer += 2;
151 } 152 }
152 153
153 if((line == 0) || (line == 2)) 154 if((line == 0) || (line == 2))
154 { 155 {
156 bool canDoFallback = pSettings->CCR_Mode == CCRMODE_Sensors;
157 if (!canDoFallback) {
158 text[textPointer++] = '\031';
159 }
155 textPointer += snprintf(&text[textPointer], 60,\ 160 textPointer += snprintf(&text[textPointer], 60,\
156 "%c" 161 "%c"
157 ,TXT_Fallback 162 ,TXT_Fallback
158 ); 163 );
159 164
160 text[textPointer++] = '\t'; 165 text[textPointer++] = '\t';
161 if(settingsGetPointer()->fallbackToFixedSetpoint) 166 if(settingsGetPointer()->fallbackToFixedSetpoint && canDoFallback)
162 text[textPointer++] = '\005'; 167 text[textPointer++] = '\005';
163 else 168 else
164 text[textPointer++] = '\006'; 169 text[textPointer++] = '\006';
165 170
171 if (!canDoFallback) {
172 text[textPointer++] = '\020';
173 }
166 strcpy(&text[textPointer],"\n\r"); 174 strcpy(&text[textPointer],"\n\r");
167 textPointer += 2; 175 textPointer += 2;
168 } 176 }
169 177
170 178