Refactor Actuators
Done fairly similar to Sensors now. Included the LED test and a new test that just writes to a file.
`tail -f` the file and change the control to see how Actuator_Loop automagically does its job.
New features / Notes:
- ActuatorControl is a simple step increase (not just a single value) which Actuator_Loop automatically follows
- That required very small changes :)
- Control_Handler no longer checks for key (since that's passed as a cookie)
- Will want to look at preventing different users from stopping an experiment in progress (by preventing them from logging in entirely?)
- Will probably want to look at implementing "admin" and "regular" users, or at least providing the basis for it in the server
- Can change sensor sampling rate through api
- May want to look at implementing an "average over time period" to reduce the load on the client
- eg: Sensor records at a sampling rate << 1s, but only records a DataPoint (average) every second
- Actuators have a Sanity Check function; do something similar for Sensors?
- Will want to look at safety stuff more carefully, since at the moment things just call "Fatal"
- This should in turn call "Cleanup" which should in turn deinitialise any active Sensors/Actuators
- Perhaps we need "Fatal" and "Reset" to give different return codes, and then ./run.sh will restart depending on the return code
Looking at getting values plotted against values (instead of time).
- For each time stamp on the dependent variable, take the independent variable with time stamps between it and the next, then average
- Seems reasonable, not sure whether to do in server or client though, will write something to test the algorithm first.
Things are getting there, but still a lot to do.
I just realised I temporarily uncommented security in fastcgi.c
... It's a good thing the system still hasn't been deployed, because I can't be bothered changing it back at the moment.
16 files changed:
UCC git Repository :: git.ucc.asn.au