From a774d58190c5b3dbf7900cf81a60b1a50f478f0f Mon Sep 17 00:00:00 2001
From: Luca Erbetta <luca.erbetta105@gmail.com>
Date: Mon, 1 Apr 2019 21:56:29 +0200
Subject: [PATCH] Fix warnings

---
 src/shared/Sensors/CurrentSensor.h               | 2 ++
 src/shared/Sensors/MPU9255.h                     | 2 +-
 src/shared/SystemDiagnostics/SystemData.h        | 2 +-
 src/shared/SystemDiagnostics/SystemDiagnostics.h | 2 +-
 4 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/shared/Sensors/CurrentSensor.h b/src/shared/Sensors/CurrentSensor.h
index 4615e54..de60574 100644
--- a/src/shared/Sensors/CurrentSensor.h
+++ b/src/shared/Sensors/CurrentSensor.h
@@ -38,6 +38,8 @@ class CurrentSensor : public Sensor
 public:
     CurrentSensor() { memset(&current_data, 0, sizeof(CurrentSenseData)); }
 
+    virtual ~CurrentSensor() {}
+    
     bool init() override { return true; }
 
     bool selfTest() override { return true; }
diff --git a/src/shared/Sensors/MPU9255.h b/src/shared/Sensors/MPU9255.h
index 3ad3ea6..74f6ecc 100644
--- a/src/shared/Sensors/MPU9255.h
+++ b/src/shared/Sensors/MPU9255.h
@@ -178,7 +178,7 @@ private:
     // ACCELEROMETER
     const float axel_x_offset = 0;     // offset in g, it's to be filled by hand
     const float axel_y_offset = 0;     // offset in g, it's to be filled by hand
-    const float axel_z_offset = 0;     // offset in g, it's to be filled by hand
+    const float axel_z_offset = 0.11;  // offset in g, it's to be filled by hand
 
     // GYROSCOPE
     const float gyro_x_offset = 0;  // default offset in LSB, it will be
diff --git a/src/shared/SystemDiagnostics/SystemData.h b/src/shared/SystemDiagnostics/SystemData.h
index 3d4b1c3..f8e3359 100644
--- a/src/shared/SystemDiagnostics/SystemData.h
+++ b/src/shared/SystemDiagnostics/SystemData.h
@@ -28,7 +28,7 @@
 
 struct SystemData
 {
-    uint32_t timestamp;
+    long long timestamp;
     float cpuUsage;
     unsigned int currentFreeHeap;
     unsigned int absoluteFreeHeap;
diff --git a/src/shared/SystemDiagnostics/SystemDiagnostics.h b/src/shared/SystemDiagnostics/SystemDiagnostics.h
index f9194ee..f3fab40 100644
--- a/src/shared/SystemDiagnostics/SystemDiagnostics.h
+++ b/src/shared/SystemDiagnostics/SystemDiagnostics.h
@@ -69,7 +69,7 @@ public:
     {
         if (threadData.empty())
         {
-            return StackData{THREAD_INVALID, 0, 0};
+            return StackData{THREAD_INVALID, 0, 0, 0};
         }
 
         Lock<FastMutex> l(mtxMap);
-- 
GitLab