Update dilatometer.c
authorCallum <[email protected]>
Thu, 31 Oct 2013 22:33:07 +0000 (06:33 +0800)
committerCallum <[email protected]>
Thu, 31 Oct 2013 22:33:07 +0000 (06:33 +0800)
server/sensors/dilatometer.c

index 8d04fb5..60532a2 100644 (file)
@@ -263,8 +263,8 @@ bool Dilatometer_GetExpansion( int id, double * value, int samples)
                                {       
                                        // Find the rate of expansion and convert to mm. Will give a negative result for compression.
                                        *value = (average - lastPosition) * SCALE *2;
-                                       lastPosition = average; // Current position now becomes the last position
                                }
+                               lastPosition = average; // Current position now becomes the last position
                                return result;
                        default:
                                return false;           }

UCC git Repository :: git.ucc.asn.au