changeset 457:4bd01f48c285 minor_improvments

Eliminated some minor warnings
author ideenmodellierer
date Tue, 24 Mar 2020 22:32:48 +0100
parents 5e38b09d2c45
children 5dd996ed8611
files Discovery/Src/logbook.c Discovery/Src/show_logbook.c Discovery/Src/t7.c Discovery/Src/tCCR.c Discovery/Src/tInfoLog.c
diffstat 5 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Discovery/Src/logbook.c	Tue Mar 24 22:14:16 2020 +0100
+++ b/Discovery/Src/logbook.c	Tue Mar 24 22:32:48 2020 +0100
@@ -979,7 +979,7 @@
     int32_t cnsLast = 0;
 	int16_t decostepDepthVal = 0;
 	int16_t decostepDepthLast = 0;
-	int16_t tankVal = 0;
+	uint16_t tankVal = 0;
 
      SManualGas manualGasVal;
      SManualGas manualGasLast;
--- a/Discovery/Src/show_logbook.c	Tue Mar 24 22:14:16 2020 +0100
+++ b/Discovery/Src/show_logbook.c	Tue Mar 24 22:32:48 2020 +0100
@@ -458,7 +458,7 @@
         if(logNumber > 9999)
             logNumber = 9999;
 
-        snprintf(text,20,"#%i",logNumber);
+        snprintf(text,20,"#%ld",logNumber);
         Gfx_write_label_var(hgfx, 300, 590,10, &FontT42,CLUT_GasSensor1,text);
     }
 
--- a/Discovery/Src/t7.c	Tue Mar 24 22:14:16 2020 +0100
+++ b/Discovery/Src/t7.c	Tue Mar 24 22:32:48 2020 +0100
@@ -684,7 +684,9 @@
     uint8_t dateNotSet = 0;
 
     uint8_t oxygen_percentage, gasOffset, actualGasID;
+#ifdef ENABLE_BOTTLE_SENSOR
 	uint16_t bottleFirstGas_bar;
+#endif
     point_t start, stop;//, other;
 
 	SSettings* pSettings;
@@ -2555,7 +2557,9 @@
     uint8_t textpointer = 0;
     _Bool tinyHeaderFont = 0;
     uint8_t line = 0;
+#ifdef ENABLE_BOTTLE_SENSOR
     uint16_t agedColor = 0;
+#endif
 
     SDivetime Stopwatch = {0,0,0,0};
     float fAverageDepth, fAverageDepthAbsolute;
--- a/Discovery/Src/tCCR.c	Tue Mar 24 22:14:16 2020 +0100
+++ b/Discovery/Src/tCCR.c	Tue Mar 24 22:32:48 2020 +0100
@@ -362,8 +362,9 @@
 void tCCR_control(void)
 {
 	uint16_t checksum = 0;
+#ifdef ENABLE_BOTTLE_SENSOR
 	SDiveState *pLivedata = stateRealGetPointerWrite();
-
+#endif
 
 	if((UartReadyHUD == RESET) && StartListeningToUART_HUD && (time_elapsed_ms(LastReceivedTick_HUD, HAL_GetTick()) > HUD_RX_START_DELAY_MS))
 	{
--- a/Discovery/Src/tInfoLog.c	Tue Mar 24 22:14:16 2020 +0100
+++ b/Discovery/Src/tInfoLog.c	Tue Mar 24 22:32:48 2020 +0100
@@ -66,7 +66,9 @@
 void stepBackInfo(void);
 void stepForwardInfo(void);
 void showLogExit(void);
+#ifdef ENABLE_PROFILE_RESET
 void resetDiveProfile(void);
+#endif
 
 /* Exported functions --------------------------------------------------------*/
 void tInfoLog_init(void)