overthesun / simoc-sam

Back-end system to support SIMOC Live air quality monitor sensor array as used at the SAM Mars habitat analog.
https://samb2.space/
2 stars 1 forks source link

Make server delay configurable. #55

Closed ezio-melotti closed 1 year ago

ezio-melotti commented 1 year ago

This PR recycles the sensor arg parser in order to read the -d option for the delay. This can be refactored later to a better server-specific arg parser, but for now it's good enough and allows us to set the broadcast delay from the cmdline. It also allows float delays (useful for testing).

Note that eventually we should create rooms where data are broadcasted at different intervals (possibly requested by the clients themselves), so that we could have e.g. the csv logger in the 1s room reading and logging all the data, but the dashboard in the 10s room getting a reading every 10s.