diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2017-03-11 08:41:41 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-03-11 08:41:41 -0800 |
commit | 08284275e733fcea8b909b86fda503d4b24e0b84 (patch) | |
tree | b2092172f09044d58efdae479447bae9b6c824ad /core/uemis.c | |
parent | b8b858a9d299877969527ef5b3c4bde97bb86d05 (diff) | |
parent | 2b06a0b2234cf2779f80e87038011067be282bcb (diff) | |
download | subsurface-08284275e733fcea8b909b86fda503d4b24e0b84.tar.gz |
Merge branch 'master' of https://github.com/dje29/subsurface
Diffstat (limited to 'core/uemis.c')
-rw-r--r-- | core/uemis.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/uemis.c b/core/uemis.c index 5635d5630..199b69fa1 100644 --- a/core/uemis.c +++ b/core/uemis.c @@ -173,8 +173,8 @@ void uemis_set_divelocation(int divespot, char *text, double longitude, double l struct dive_site *ds = get_dive_site_by_uuid(hp->dive_site_uuid); if (ds) { ds->name = strdup(text); - ds->longitude.udeg = round(longitude * 1000000); - ds->latitude.udeg = round(latitude * 1000000); + ds->longitude.udeg = lrint(longitude * 1000000); + ds->latitude.udeg = lrint(latitude * 1000000); } } hp = hp->next; @@ -329,7 +329,7 @@ void uemis_parse_divelog_binary(char *base64, void *datap) if (template == 0) template = 1; for (i = 0; i < template; i++) { - float volume = *(float *)(data + 116 + 25 * (gasoffset + i)) * 1000.0; + float volume = *(float *)(data + 116 + 25 * (gasoffset + i)) * 1000.0f; /* uemis always assumes a working pressure of 202.6bar (!?!?) - I first thought * it was 3000psi, but testing against all my dives gets me that strange number. * Still, that's of course completely bogus and shows they don't get how @@ -337,7 +337,7 @@ void uemis_parse_divelog_binary(char *base64, void *datap) * we store the incorrect working pressure to get the SAC calculations "close" * but the user will have to correct this manually */ - dive->cylinder[i].type.size.mliter = rint(volume); + dive->cylinder[i].type.size.mliter = lrintf(volume); dive->cylinder[i].type.workingpressure.mbar = 202600; dive->cylinder[i].gasmix.o2.permille = *(uint8_t *)(data + 120 + 25 * (gasoffset + i)) * 10; dive->cylinder[i].gasmix.he.permille = 0; |