mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-13 20:16:14 +00:00
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:
@@ -137,6 +137,15 @@ struct Calibration {
|
||||
{
|
||||
}
|
||||
|
||||
constexpr Calibration() :
|
||||
Calibration(
|
||||
/* Values derived from one PortaPack H1 unit. */
|
||||
{ { { 256, 731 }, { 880, 432 }, { 568, 146 } } },
|
||||
{ { { 32, 48 }, { 208, 168 }, { 120, 288 } } }
|
||||
)
|
||||
{
|
||||
}
|
||||
|
||||
ui::Point translate(const DigitizerPoint& p) const;
|
||||
|
||||
private:
|
||||
@@ -149,8 +158,6 @@ private:
|
||||
int32_t f;
|
||||
};
|
||||
|
||||
const Calibration default_calibration();
|
||||
|
||||
template<size_t N>
|
||||
class Filter {
|
||||
public:
|
||||
|
Reference in New Issue
Block a user