Mercurial > public > ostc4
diff Discovery/Src/tComm.c @ 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 | 5e38b09d2c45 |
children | dddfe7917131 |
line wrap: on
line diff
--- a/Discovery/Src/tComm.c Tue Mar 24 22:32:48 2020 +0100 +++ b/Discovery/Src/tComm.c Sat Mar 28 21:41:47 2020 +0100 @@ -583,7 +583,6 @@ #else uint8_t dummyForBootloader[256] = {0}; #endif - uint8_t count; uint8_t aTxBuffer[128]; uint8_t aRxBuffer[68]; @@ -1183,9 +1182,11 @@ if(HAL_UART_Transmit(&UartHandle, (uint8_t*)plogbookHeaderOSTC3, 256,5000)!= HAL_OK) return 0; - if(logbookHeader.pBeginProfileData[0]==0) /* no sample information */ + if((logbookHeader.pBeginProfileData[0]==0) /* no sample information */ + && (logbookHeader.pBeginProfileData[1]==0) + && (logbookHeader.pBeginProfileData[2]==0)) { - sampleTotalLength = logbook_fillDummySampleBuffer(logbookHeader.diveTimeMinutes, logbookHeader.diveTimeSeconds, logbookHeader.maxDepth, logbookHeader.lastDecostop_m, logbookHeader.minTemp); + sampleTotalLength = logbook_fillDummySampleBuffer(&logbookHeader); while(sampleTotalLength >= 128) { logbook_readDummySamples(aTxBuffer,128);