mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fix divinglog import temperature truncation
The code incorrectly divided the temperature by 10 as an integer, causing unnecessary precision loss due to truncation. Fix it, and update the test results for the now improved temperature import. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
03b10383c9
commit
d5a0184f71
2 changed files with 64 additions and 64 deletions
|
@ -3294,7 +3294,7 @@ extern int divinglog_profile(void *handle, int columns, char **data, char **colu
|
|||
int tank = atoi_n(ptr2+7, 1);
|
||||
int rbt = atoi_n(ptr2+8, 3) * 60;
|
||||
|
||||
cur_sample->temperature.mkelvin = C_to_mkelvin(temp / 10);
|
||||
cur_sample->temperature.mkelvin = C_to_mkelvin(temp / 10.0f);
|
||||
cur_sample->pressure[0].mbar = pressure * 100;
|
||||
if (oldcyl != tank) {
|
||||
struct gasmix *mix = &cur_dive->cylinder[tank].gasmix;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue