Mercurial > public > ostc4
diff Discovery/Src/logbook.c @ 200:7116c0ffb862
Merged in janlmulder/ostc4/div-fixes-cleaup-2 (pull request #8)
2 (simple) bugfixes and again some cleanup
author | heinrichsweikamp <bitbucket@heinrichsweikamp.com> |
---|---|
date | Fri, 22 Mar 2019 08:15:30 +0000 |
parents | ac58a9fb92ac |
children | 2bb1db22b5f5 |
line wrap: on
line diff
--- a/Discovery/Src/logbook.c Tue Mar 19 15:43:38 2019 +0000 +++ b/Discovery/Src/logbook.c Fri Mar 22 08:15:30 2019 +0000 @@ -238,7 +238,7 @@ header.dateDay = Sdate.Date; header.timeHour = Stime.Hours; header.timeMinute = Stime.Minutes; - header.cnsAtBeginning = (uint16_t)((pInfo->lifeData.cns * 100) + 0.5f); + header.cnsAtBeginning = (uint16_t)pInfo->lifeData.cns; header.surfacePressure_mbar = (uint16_t)(pInfo->lifeData.pressure_surface_bar * 1000); header.firmwareVersionHigh = firmwareVersion_16bit_high(); header.firmwareVersionLow = firmwareVersion_16bit_low(); @@ -609,8 +609,7 @@ if(divisor.cns == 0) { divisor.cns = smallHeader.cnsDivisor - 1; - //addU16(&sample[length], (uint16_t)(state.lifeData.cns * 100.0f + 0.5f)); - addU16(&sample[length], (uint16_t)(state.lifeData.cns)); // hw 151110 cns is 0 to 100 % and more (not 0 to 1.00 and more) + addU16(&sample[length], (uint16_t)state.lifeData.cns); length += 2; } else