Persistent memory check value verification, defaulting when fails. (#662)

* Make default constructor for touch calibration

* Add persistent memory check value and access abstraction.

* Add persistent data_t default constructor with reasonable defaults.

* serial_format_t default constructor.

* Tidy up backlight timeout type.

* Add persistent data struct version/checking.

* Make range_t functions constexpr.

* Move ui_config and functions into class.

* Add backlight_config_t struct, separate enable and time settings.
This commit is contained in:
Jared Boone 2022-05-28 13:55:18 -07:00 committed by GitHub
parent 2031a79b34
commit e5a30b4309
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 481 additions and 94 deletions

View file

@ -76,14 +76,6 @@ ui::Point Calibration::translate(const DigitizerPoint& p) const {
return { x_clipped, y_clipped };
}
const Calibration default_calibration() {
/* Values derived from one PortaPack H1 unit. */
return {
{ { { 256, 731 }, { 880, 432 }, { 568, 146 } } },
{ { { 32, 48 }, { 208, 168 }, { 120, 288 } } }
};
};
void Manager::feed(const Frame& frame) {
// touch_debounce.feed(touch_raw);
const auto touch_raw = frame.touch;