Closed Ymit24 closed 5 months ago
Picking this up.
Realized Voltage
isn't Eq
due to f32
. Going to change from Voltage
to Percentage
to better model PWM / activation concept.
Added Percentage
and started using it in Packets/embedded/controls. Starting to try and use RPM too.
Picking this back up.
Now using Percentage
for control packets and Rpm
for sensor report packets. Should be done with this. Could always improve of course. Design isn't perfect and definitely suffers from some early questionable decisions. Doesn't effect functionality for now however so it isn't important. Going to close this. (All tests passing, important to note since CI isn't currently setup.)
Going to make PR
Merged.
What?
Update the packets and associated control/embedded code to properly use physically based values such as RPM and Voltage.
Why?
Using physical unit based types makes it easier to verify valid states and catch weird bugs like a sensor malfunctioning. It also provides more security, if you have access to an instance of a Temperature, then you know, for example, that it must not be negative.
How?
Update existing packet definitions in the
common
module. Updated associatedembedded_firmware(_core)
andcontrol_system
code.