supermileage / dynamometer-firmware

0 stars 0 forks source link

Add State Transition Data #53

Closed cosparks closed 1 year ago

cosparks commented 1 year ago

Notes

This was a necessary design step that I skipped earlier because I first wanted to build out a class which requires passing data between states. The PR for that isn't up yet, as its implementation also depends on this code. This PR renames a bunch of the 'data' structs 'info' structs, as that's what they really were in the first place.

The most important addition is the config field in the StateInfo (formerly StateData) struct. This field is a map (or dictionary if you'd like) which takes a property id in the form of a uint8 and returns info associated with that key, if it exists. This allows Controller classes to check for data they might want or need when setting up their UI elements or displaying data.

Changes

Application Context

ControllerBase

ControllerFactory

ControllerMenu

closes #52