Closed nkdem closed 1 month ago
As it stands the main.py file is not very useful when wanting to test this from a local machine (remotely), since it imports GPIO stuff that isn't really needed. We could either sort out the imports depending on the flags passed in to main.py or look into using gpiozero 'mock' factory (https://gpiozero.readthedocs.io/en/stable/api_pins.html#mock-pins), and it should in theory be a one liner here https://github.com/SysDevProj-18/BrailleAssistant/blob/ca644ef0fa74634f0baf0437d3185f63a7aa3881/software/data_structures/Rail.py#L6 and any other files that call this.
main.py
I like the second approach as it seems to be fit exactly with the intended use of this (in the docs).
That's one program flag I can think of, and a suitable name would be --test i.e. to run this in test mode python main.py --test
--test
python main.py --test
Any other flags that are needed ?
Only other thing I can think of is a mode to spoof the speaker similarly to the gpio pins. System doesn't really work without the mic, right? So we can't spoof that
As it stands the main.py file is not very useful when wanting to test this from a local machine (remotely), since it imports GPIO stuff that isn't really needed. We could either sort out the imports depending on the flags passed in to
main.py
or look into using gpiozero 'mock' factory (https://gpiozero.readthedocs.io/en/stable/api_pins.html#mock-pins), and it should in theory be a one liner here https://github.com/SysDevProj-18/BrailleAssistant/blob/ca644ef0fa74634f0baf0437d3185f63a7aa3881/software/data_structures/Rail.py#L6 and any other files that call this.I like the second approach as it seems to be fit exactly with the intended use of this (in the docs).
That's one program flag I can think of, and a suitable name would be
--test
i.e. to run this in test modepython main.py --test
Any other flags that are needed ?