mini propulsion test stand util code
-
cd into the directory where you clone/downloaded this code
-
run
python(3) run_gui.py
(use python or python3 as appropriate for your configuration)
- ensure you are connected to the pi, if you are not or the ecs is not running, you will see an error message about websockets.
-
make sure tkinter is installed
-
open the window by running
python(3) ecs_logger.py
-
choose a save directory for the logs, make sure you're connected to the pi (or sim) and update the address accordingly
-
click
start logging
to begin, and make sure the number of json reports increases if you are expecting data; the csv should also show up immediately and will be timestamped with epoch time -
click
stop logging
when done
NB: To split the file mid-run (for analysis, etc.) click the split new file button. This will break off a new log csv file starting at the time of the click, and stop logging to the original file
To add more states and batches for future tests, update the STATE_SETS.json
file, following the existing format. The web GUI will automatically populate the dropdowns from this information after restarting the page.
If you wish to simulate JSON that would come in from the pi locally, run the json_dummy_server.py
file and update the socket address (set to const socket = new WebSocket('ws://localhost:9002/ws');
) in the script.js
file accordingly. You can also edit the sample json file or add your own to change which values come in.