diff 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
line wrap: on
line diff
--- a/Discovery/Src/tMenuXtra.c	Thu Apr 13 09:35:43 2023 +0200
+++ b/Discovery/Src/tMenuXtra.c	Fri Apr 21 09:47:06 2023 +0200
@@ -29,6 +29,7 @@
 /* Includes ------------------------------------------------------------------*/
 #include <stdio.h>
 #include <string.h>
+#include <stdbool.h>
 #include "tMenu.h"
 #include "tStructure.h"
 #include "tMenuXtra.h"
@@ -152,17 +153,24 @@
 
         if((line == 0) || (line == 2))
          {
+             bool canDoFallback = pSettings->CCR_Mode == CCRMODE_Sensors;
+             if (!canDoFallback) {
+                 text[textPointer++] = '\031';
+             }
              textPointer += snprintf(&text[textPointer], 60,\
                  "%c"
                  ,TXT_Fallback
              );
 
              text[textPointer++] = '\t';
-             if(settingsGetPointer()->fallbackToFixedSetpoint)
+             if(settingsGetPointer()->fallbackToFixedSetpoint && canDoFallback)
                  text[textPointer++] = '\005';
              else
                  text[textPointer++] = '\006';
 
+             if (!canDoFallback) {
+                 text[textPointer++] = '\020';
+             }
              strcpy(&text[textPointer],"\n\r");
              textPointer += 2;
          }