From 76c0f3f350a86731de27f3a9f55f52948cec27ad Mon Sep 17 00:00:00 2001
From: Laurent Lalanne
Date: Mon, 5 Dec 2016 15:22:05 +0100
Subject: [PATCH] LP-444 Update SystemHealth for I2C alarms and more.
---
flight/modules/System/systemmod.c | 3 ---
.../systemhealth/html/Attitude-Critical.html | 5 +++--
.../systemhealth/html/Attitude-Error.html | 3 ++-
.../systemhealth/html/Attitude-Warning.html | 16 ++++++++++++++++
.../plugins/systemhealth/html/GPS-Error.html | 6 +++---
.../systemhealth/html/I2C-Critical.html | 13 +++++++++++++
.../plugins/systemhealth/html/I2C-Error.html | 18 ++++++++++++++++++
.../systemhealth/html/Sensors-Critical.html | 7 +++----
.../html/Stabilization-Critical.html | 6 ++++--
.../systemhealth/html/Stabilization-Error.html | 17 +++++++++++++++++
.../html/Stabilization-Warning.html | 8 ++++++--
.../html/fr/Attitude-Critical.html | 5 +++--
.../systemhealth/html/fr/Attitude-Error.html | 1 +
.../systemhealth/html/fr/Attitude-Warning.html | 16 ++++++++++++++++
.../systemhealth/html/fr/GPS-Error.html | 6 +++---
.../systemhealth/html/fr/GPS-Warning.html | 2 +-
.../systemhealth/html/fr/I2C-Critical.html | 13 +++++++++++++
.../systemhealth/html/fr/I2C-Error.html | 18 ++++++++++++++++++
.../systemhealth/html/fr/Sensors-Critical.html | 4 ++--
.../html/fr/Stabilization-Critical.html | 6 ++++--
.../html/fr/Stabilization-Error.html | 17 +++++++++++++++++
.../html/fr/Stabilization-Warning.html | 8 ++++++--
.../src/plugins/systemhealth/systemhealth.qrc | 10 ++++++++++
23 files changed, 179 insertions(+), 29 deletions(-)
create mode 100644 ground/gcs/src/plugins/systemhealth/html/Attitude-Warning.html
create mode 100644 ground/gcs/src/plugins/systemhealth/html/I2C-Critical.html
create mode 100644 ground/gcs/src/plugins/systemhealth/html/I2C-Error.html
create mode 100644 ground/gcs/src/plugins/systemhealth/html/Stabilization-Error.html
create mode 100644 ground/gcs/src/plugins/systemhealth/html/fr/Attitude-Warning.html
create mode 100644 ground/gcs/src/plugins/systemhealth/html/fr/I2C-Critical.html
create mode 100644 ground/gcs/src/plugins/systemhealth/html/fr/I2C-Error.html
create mode 100644 ground/gcs/src/plugins/systemhealth/html/fr/Stabilization-Error.html
diff --git a/flight/modules/System/systemmod.c b/flight/modules/System/systemmod.c
index 4a629f301..2cf86e751 100644
--- a/flight/modules/System/systemmod.c
+++ b/flight/modules/System/systemmod.c
@@ -124,11 +124,8 @@ static void updateWDGstats();
#endif
#ifdef PIOS_INCLUDE_I2C
-
#define I2C_ERROR_ACTIVITY_TIMEOUT_SECONDS 2
-
#define I2C_ERROR_ACTIVITY_TIMEOUT (I2C_ERROR_ACTIVITY_TIMEOUT_SECONDS * 1000 / SYSTEM_UPDATE_PERIOD_MS)
-
static uint8_t i2c_error_activity[PIOS_I2C_ERROR_COUNT_NUMELEM];
#endif
diff --git a/ground/gcs/src/plugins/systemhealth/html/Attitude-Critical.html b/ground/gcs/src/plugins/systemhealth/html/Attitude-Critical.html
index b7676c6dd..3a763a567 100644
--- a/ground/gcs/src/plugins/systemhealth/html/Attitude-Critical.html
+++ b/ground/gcs/src/plugins/systemhealth/html/Attitude-Critical.html
@@ -9,8 +9,9 @@
One of the following conditions may be present:
- - No data is received from the accelerometer
- - Waiting for good data from Magnetometer or GPS lock to perform module initialization.
+ - Waiting for the board to be steady before gyro init.
+ - No data is being received from the accelerometer.
+ - Waiting for good data from magnetometer or GPS lock to perform module initialization.
+ Attitude : Warning
+
+ One of the following conditions may be present:
+
+ - Waiting for the board to be steady before gyro init.
+
+
+
diff --git a/ground/gcs/src/plugins/systemhealth/html/Attitude-Error.html b/ground/gcs/src/plugins/systemhealth/html/Attitude-Error.html
index d1cbb4982..7ebc6ce75 100644
--- a/ground/gcs/src/plugins/systemhealth/html/Attitude-Error.html
+++ b/ground/gcs/src/plugins/systemhealth/html/Attitude-Error.html
@@ -9,8 +9,9 @@
One of the following conditions may be present:
+ - Waiting for the board to be steady before gyro init.
- Failed to get an update from the accelerometer or gyros.
- - Attitude Estimation Algorithm set to "GPS Navigation (INS13)" and no Magnetometer : please set HomeLocation.
+ - Attitude Estimation Algorithm set to "GPS Navigation (INS13)" and no magnetometer : please set HomeLocation.
diff --git a/ground/gcs/src/plugins/systemhealth/html/Attitude-Warning.html b/ground/gcs/src/plugins/systemhealth/html/Attitude-Warning.html
new file mode 100644
index 000000000..61ab7f9a3
--- /dev/null
+++ b/ground/gcs/src/plugins/systemhealth/html/Attitude-Warning.html
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+