<div dir="ltr">I intentionally stripped out the second patch which is the "Cleaned-up-file-list-in-open-and-import-dialogs" Patch.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 7, 2014 at 12:51 PM, John Van Ostrand <span dir="ltr"><<a href="mailto:john@vanostrand.com" target="_blank">john@vanostrand.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Fixed rounding of temperatures<br>
Fixed compile warnings<br>
---<br>
 file.h        | 1 +<br>
 liquivision.c | 8 ++++----<br>
 2 files changed, 5 insertions(+), 4 deletions(-)<br>
<br>
diff --git a/file.h b/file.h<br>
index 8c5b48b..d4c52fd 100644<br>
--- a/file.h<br>
+++ b/file.h<br>
@@ -7,6 +7,7 @@ struct memblock {<br>
 };<br>
<br>
 extern int try_to_open_cochran(const char *filename, struct memblock *mem);<br>
+extern int try_to_open_liquivision(const char *filename, struct memblock *mem);<br>
<br>
 #ifdef __cplusplus<br>
 extern "C" {<br>
diff --git a/liquivision.c b/liquivision.c<br>
index bb71bfd..2ba9b2d 100644<br>
--- a/liquivision.c<br>
+++ b/liquivision.c<br>
@@ -215,15 +215,15 @@ parse_dives (int log_version, const unsigned char *buf, unsigned int buf_size) {<br>
                                // Get sample times<br>
                                sample_time = d * sample_interval;<br>
                                depth_mm = array_uint16_le(ds + d * 2) * 10; // cm->mm<br>
-                               temp_mk = C_to_mkelvin(array_uint16_le(ts + d * 2) / 10); // dC->mK<br>
+                               temp_mk = C_to_mkelvin((float)array_uint16_le(ts + d * 2) / 10); // dC->mK<br>
                                next_time = (d < sample_count - 1 ? (d + 1) * sample_interval : sample_time);<br>
                                last_time = (d ? (d - 1) * sample_interval : 0);<br>
<br>
                                if (d == sample_count) {<br>
                                        // We still have events to record<br>
                                        sample->time.seconds = event_time;<br>
-                                       sample-><a href="http://depth.mm" target="_blank">depth.mm</a> == array_uint16_le(ds + (d - 1) * 2) * 10; // cm->mm<br>
-                                       sample->temperature.mkelvin = C_to_mkelvin(array_uint16_le(ts + (d - 1) * 2) / 10); // dC->mK<br>
+                                       sample-><a href="http://depth.mm" target="_blank">depth.mm</a> = array_uint16_le(ds + (d - 1) * 2) * 10; // cm->mm<br>
+                                       sample->temperature.mkelvin = C_to_mkelvin((float) array_uint16_le(ts + (d - 1) * 2) / 10); // dC->mK<br>
                                        sample->sensor = sensor;<br>
                                        sample->cylinderpressure.mbar = mbar;<br>
                                        finish_sample(dc);<br>
@@ -257,7 +257,7 @@ parse_dives (int log_version, const unsigned char *buf, unsigned int buf_size) {<br>
                                        } else {<br>
                                                // Extrapolate<br>
                                                last_depth = array_uint16_le(ds + (d - 1) * 2) * 10; // cm->mm<br>
-                                               last_temp = C_to_mkelvin(array_uint16_le(ts + (d - 1) * 2) / 10); // dC->mK<br>
+                                               last_temp = C_to_mkelvin((float) array_uint16_le(ts + (d - 1) * 2) / 10); // dC->mK<br>
                                                sample-><a href="http://depth.mm" target="_blank">depth.mm</a> = last_depth + (depth_mm - last_depth)<br>
                                                        * (event_time - last_time) / sample_interval;<br>
                                                sample->temperature.mkelvin = last_temp + (temp_mk - last_temp)<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.8.3.1<br>
<br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div>John Van Ostrand<br></div><div>At large on sabbatical<br></div><br></div></div>
</div>