EasternEdgeRobotics / Software_2017

The control software for 2017
MIT License
3 stars 0 forks source link

Separate power into individual Value objects #295

Closed cal-pratt closed 7 years ago

cal-pratt commented 7 years ago

Now that we want to add in new sliders for Aft and Fore power levels I decided it was time to modularize the power components into their own classes. This makes all the logic for maintaining multiple views much easier.

The method SourceController#manageMultiViewModel is now responsible for taking an "external" (values that come from the network) and "internal" (values that come from a component) and manages when the internal is able to update the external and vice versa.

I haven't completely removed the MotionPowerValue because I wasn't ready to update the MotionPowerProfile logic yet, however, MotionPowerValue is isolated to just that code. Should be an easy fix eventually.