+ if (abs(old - new) > 1000)
+ depth->mm = new;
+ }
+}
+
+static void update_pressure(pressure_t *pressure, int new)
+{
+ if (new) {
+ int old = pressure->mbar;
+
+ if (abs(old - new) > 1000)
+ pressure->mbar = new;
+ }
+}
+
+static void update_duration(duration_t *duration, int new)
+{
+ if (new)
+ duration->seconds = new;
+}
+
+static void update_temperature(temperature_t *temperature, int new)
+{
+ if (new) {
+ int old = temperature->mkelvin;
+
+ if (abs(old - new) > 1000)
+ temperature->mkelvin = new;
+ }