X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=server%2Fcontrol.c;h=1f33eeab9ae3b17cf7dfea5730c55d3dae57d747;hb=52db446b6e39d5b56f09114d647923e933ae9d4a;hp=4da1f7507718de6c90e7517efa1b9542a06a6f10;hpb=84282dc8bd6b84d23284742741fab5664ffb25a6;p=matches%2FMCTX3420.git diff --git a/server/control.c b/server/control.c index 4da1f75..1f33eea 100644 --- a/server/control.c +++ b/server/control.c @@ -5,13 +5,10 @@ #include "common.h" #include "control.h" -const char * g_actuator_names[NUMACTUATORS] = { - "Pressure regulator", "Solenoid 1" -}; /** * Handles control of the actuators. - */ + * void ActuatorHandler(FCGIContext *context, ActuatorId id, const char *set_value) { char *ptr; @@ -49,6 +46,7 @@ void ActuatorHandler(FCGIContext *context, ActuatorId id, const char *set_value) STATUS_ERROR, "Invalid actuator id specified."); } } +*/ /** * System control handler. This covers control over all aspects of the system. @@ -79,6 +77,7 @@ void Control_Handler(FCGIContext *context, char *params) { set_value = value; } } + Log(LOGDEBUG, "Id %d", id); // to stop compiler complaining for now if (action == NULL) { //Must have an action FCGI_RejectJSON(context, "No action specified"); @@ -99,8 +98,9 @@ void Control_Handler(FCGIContext *context, char *params) { if (set_value == NULL || *set_value == '\0') { FCGI_RejectJSONEx(context, STATUS_ERROR, "Set called but no value specified."); - } else { - ActuatorHandler(context, id, set_value); + } else + { +// ActuatorHandler(context, id, set_value); } } }