Rodemfr / MicroNav

A Micronet / NMEA bridge for TTGO T-Beam boards
GNU General Public License v3.0
5 stars 4 forks source link

Reorganize configuration update management #5

Open Rodemfr opened 1 year ago

Rodemfr commented 1 year ago

Currently, Configuration and NavigationData classes have public attributes that anyone can modify freely. Some of these attributes trigger dedicated actions like writing configuration to EEPROM or updating MicronetCodec internal configuration. The current way to handle it is messy : it is the responsibility of the user to set some flags or to check for modifications. All Configuration and NavigationData attributes should be private and getters/setters should handle potential flags to trigger EEPROM writes or config update in MicronetCodec or MicroneDevice.