X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=server%2Fsensor.c;h=98896e8b44aaac34002fefdd6eb88081b3a22921;hb=0ef0945e8d83258400fabc61fa81725c5e8e533f;hp=e429958168019beb5c8e90320e90efc9d30a41eb;hpb=9fd77a6c5fdf277d6d5c17e3ced66f65f94a36f4;p=matches%2FMCTX3420.git diff --git a/server/sensor.c b/server/sensor.c index e429958..98896e8 100644 --- a/server/sensor.c +++ b/server/sensor.c @@ -144,13 +144,13 @@ void Sensor_CheckData(SensorId id, double value) { if( value > thresholds[id].max_error || value < thresholds[id].min_error) { - Log(LOGERR, "Sensor %s is above or below its safety value of %f or %f\n", g_sensor_names[id],thresholds[id].max_error, thresholds[id].min_error); + Log(LOGERR, "Sensor %s at %f is above or below its safety value of %f or %f\n", value, g_sensor_names[id],thresholds[id].max_error, thresholds[id].min_error); //new function that stops actuators? //Control_SetMode(CONTROL_EMERGENCY, NULL) } else if( value > thresholds[id].max_warn || value < thresholds[id].min_warn) { - Log(LOGWARN, "Sensor %s is above or below its warning value of %f or %f\n", g_sensor_names[id],thresholds[id].max_warn, thresholds[id].min_warn); + Log(LOGWARN, "Sensor %s at %f is above or below its warning value of %f or %f\n", value, g_sensor_names[id],thresholds[id].max_warn, thresholds[id].min_warn); } } @@ -180,7 +180,7 @@ bool Sensor_Read(Sensor * s, DataPoint * d) static bool set = false; GPIO_Set(GPIO0_30, true); - d->value = (double)ADC_Read(ADC0); //ADC #0 on the Beaglebone + d->value = 0;//(double)ADC_Read(ADC0); //ADC #0 on the Beaglebone //Log(LOGDEBUG, "Got value %f from ADC0", d->value); GPIO_Set(GPIO0_30, false); set = !set;