+/** Array of sensors, initialised by Sensor_Init **/
+static Sensor g_sensors[NUMSENSORS]; //global to this file
+
+/** Array of sensor threshold structures defining the safety values of each sensor**/
+const SensorThreshold thresholds[NUMSENSORS]= {
+ //Max Safety, Min safety, Max warning, Min warning
+ {1,-1,1,-1}, // ANALOG_TEST0
+ {500,0,499,0}, // ANALOG_TEST1
+ {5,-5,4,-4}, // ANALOG_FAIL0
+ {1,0,1,0}, // DIGITAL_TEST0
+ {1,0,1,0}, // DIGITAL_TEST1
+ {1,0,1,0} // DIGITAL_FAIL0
+};
+
+/** Human readable names for the sensors **/
+const char * g_sensor_names[NUMSENSORS] = {
+ "analog_test0", "analog_test1",
+ "analog_fail0", "digital_test0",
+ "digital_test1", "digital_fail0"
+};
+
+/**
+ * One off initialisation of *all* sensors
+ */
+void Sensor_Init()
+{
+ for (int i = 0; i < NUMSENSORS; ++i)
+ {
+ g_sensors[i].id = i;
+ Data_Init(&(g_sensors[i].data_file));
+ g_sensors[i].record_data = false;
+ }
+}
+