diff Discovery/Inc/logbook.h @ 458:5dd996ed8611 minor_improvments

Added ppO2 to dummy profile data: PPO2 calculation based on the first gas has been added to the dummy profile to enable drawing of the graph at log page four As this increased the number of parameters to be passed to the sub functions, the complete dive header is passed as reference instead of single members to increase the code maintanability
author ideenmodellierer
date Sat, 28 Mar 2020 21:41:47 +0100
parents 928a14568689
children 73da921869d9
line wrap: on
line diff
--- a/Discovery/Inc/logbook.h	Tue Mar 24 22:32:48 2020 +0100
+++ b/Discovery/Inc/logbook.h	Sat Mar 28 21:41:47 2020 +0100
@@ -30,6 +30,8 @@
 #include "data_central.h"
 #include "settings.h"
 
+#define NUM_GAS		(5)	/* number of selectable gases */
+
 typedef struct
 {
     uint8_t setpoint_cbar;
@@ -65,7 +67,7 @@
     int16_t  minTemp;
     uint16_t surfacePressure_mbar;
     uint16_t desaturationTime;
-    SGasListLog gasordil[5];
+    SGasListLog gasordil[NUM_GAS];
     uint8_t  firmwareVersionLow;
     uint8_t  firmwareVersionHigh;
     uint16_t batteryVoltage;
@@ -73,7 +75,7 @@
     uint8_t  gfAtBeginning;
     uint8_t  gfAtEnd;
     uint16_t personalDiveCount;
-    SSetpointLog setpoint[5];
+    SSetpointLog setpoint[NUM_GAS];
     uint16_t maxCNS;
     uint16_t averageDepth_mbar;
     uint16_t total_diveTime_seconds;
@@ -114,7 +116,7 @@
     uint8_t minTemp[2];
     uint8_t surfacePressure_mbar[2];
     uint8_t desaturationTime[2];
-    uint8_t gasordil[5*4];
+    uint8_t gasordil[NUM_GAS*4];
     uint8_t firmwareVersionLow;
     uint8_t firmwareVersionHigh;
     uint8_t batteryVoltage[2];
@@ -217,7 +219,7 @@
 void logbook_recover_brokenlog(uint8_t headerId);
 
 uint16_t logbook_lastDive_diveNumber(void);
-uint16_t logbook_fillDummySampleBuffer(uint16_t diveMinutes, uint8_t diveSeconds, uint16_t maxDepth, uint8_t lastDecostop_m, int16_t minTemp);
+uint16_t logbook_fillDummySampleBuffer(SLogbookHeader* pHeader);
 void logbook_readDummySamples(uint8_t* pTarget, uint16_t length);
 
 #endif /* LOGBOOK_H */