Closed finnjames closed 5 years ago
One idea:
tick()
is the main method called by the clock every 10 ms, and within it it calls the handler methods for all of the other logic, including:
updateStripchart()
updateGui()
readData()
> writeData()
Adding a lot more delegation could really help as well—each individual thing should likely be handled by an encapsulated object and not Threepio
On the same topic, it is important that there is a disconnect between the refresh clock and the actual observation time—with each tick()
there also needs to be a system time check. With that in mind, setting the duration of the observation needs to be implemented.
Clock now based on system time, not the refresh rate (hallelujah)
The current
tick()
system is absolute garbage. I feel okay saying that because I wrote it, but it needs to be standardized. Perhaps some on-a-whiteboard type planning is in order so that we can keep the main logic well abstracted. One way or another, though, this needs to be fixed.