pez-globo / pufferfish-software

All software for the Pufferfish ventilator.
Apache License 2.0
0 stars 1 forks source link

Implement adjustment of system time from the backend #435

Closed ethanjli closed 2 years ago

ethanjli commented 2 years ago

This PR:

This PR also does some refactoring of the backend:

Things to be aware of:

@rohanpurohit If you're able to make sure you can run everything and change the system time on your RPi, that would be helpful. Since this PR did a big rename and also some refactoring of important parts of the backend, it'd be helpful if you could also test the backend to look for any possible issues with responsiveness or timing. I will perform an end-to-end test of whether everything works with a complete RPi deployment installation and a hardware RTC (so far I've just probed the state of the system using the timedatectl status command and looking at the time in the frontend after doing an "Apply Changes" on the frontend's settings screen).

ethanjli commented 2 years ago

I've changed the backend and deployment scripts to try to run the date command using sudo, because it turns out that the pufferfish_backentd.service is configured to run in systemd as the pi user rather than root.

I've also been encountering some issues with the deployment scripts which require some workarounds and should be fixed in future PRs:

rohanpurohit commented 2 years ago

Observations from testing:

on my wsl windows when i tried to run this branch without zenity:

If you don't have zenity installed, the program will simply log its failure to open the dialog box but otherwise continue as normal.

it did not continue as normal and infact terminated with failure: FileNotFoundError: [Errno 2] No such file or directory: 'zenity': 'zenity'

installing zenity on my wsl seems to have a lot of unmet dependencies, for now, I'll just use it by removing await processes.make_dialog

ethanjli commented 2 years ago

it did not continue as normal and infact terminated with failure: FileNotFoundError: [Errno 2] No such file or directory: 'zenity': 'zenity'

Oops, I hadn't tested that error-handling behavior! I've fixed it and tested it on my own system now (running Ubuntu, with Zenity uninstalled).

ethanjli commented 2 years ago

For records-keeping:

  1. This project is licensed under Apache License v2.0 for any software, and Solderpad Hardware License v2.1 for any hardware - do you agree that your contributions to this project will be under these licenses, too? Yes
  2. Were any of these contributions also part of work you did for an employer or a client? No
  3. Does this work include, or is it based on, any third-party work which you did not create? No