Closed MJoosep closed 2 years ago
Created a new main script with most functionality pulled out. New script has an on/off handler to detect power button presses. Currently while the status is set to on, first apa led turns green, if status is off the led turns off aswell.
Added Timing to the main script with automatic result saving. Results are saved as tuples in a list of results, tuples contain five time values (in milliseconds) which are:
The list is then saved in Data/_boot_time_analysis.py and can be either exported using export_boot_time_analysis() command in REPL or copying the data directly from the file.
Created a sample test data overview in Google Colab, where the exported values can be pasted to see boot times on a graph. Google Colab Link: https://colab.research.google.com/drive/1BnqW0UsUutiGC1ryNl1bdpl6BUBHhxwW?usp=sharing
While testing the times manually without automatic data exporting, interesting patterns emerged.
Saving data takes 38-59 milliseconds. With each save the time increases about 0.5ms until it reaches 59. When 59 milliseconds is reached and a new save is initiated it takes around 2500ms to complete a save, after which the save time goes back down to 38.
Loading has taken anywhere from 110 to 140ms (figures that could probably be improved)
Total boot time (when the script end is reached) has taken anywhere from 2586ms to 2853ms based on initial testing
Create a new main python script with most functionality discarded. New main should only have apa led control and an on_off handler and should become a new base to build upon. The purpose of this is to try to shorten current boot times (8 seconds) to avoid user frustration when setting up lamps.
Testing should follow these steps:
User supplies power to lamp
Lamp checks last status (on/off)
Based on previous check lamp turns apa leds either black or green
[x] Write new main script functionality
[x] Test new main script functionality