Feature additions (#434)
Lots of things "ported" over from the "enhanced" fork. With some adjustments here and there. KeyboardBacklight driver (for T-Deck only currently) Trackball driver (for T-Deck only currently) Keyboard backlight sleep/wake (for T-Deck only currently...also requires keyboard firmware update) Display sleep/wake Files - create file/folder Keyboard settings (for T-Deck only currently) Time & Date settings tweaks Locale settings tweaks Systeminfo additions Espnow wifi coexist initI2cDevices - moved to T-deck init.cpp / initBoot KeyboardInitService - removed, moved to T-deck init.cpp / initBoot Adjusted TIMER_UPDATE_INTERVAL to 2 seconds. Added lock to ActionCreateFolder Maybe missed some things in the list. Display wake could do with some kind of block on wake first touch to prevent UI elements being hit when waking device with touch. Same with encoder/trackball/keyboard press i guess. The original code was written by @cscott0108 at https://github.com/cscott0108/tactility-enhanced-t-deck
This commit is contained in:
@@ -21,7 +21,8 @@ public:
|
||||
Keyboard,
|
||||
Encoder,
|
||||
Power,
|
||||
Gps
|
||||
Gps,
|
||||
Other
|
||||
};
|
||||
|
||||
typedef uint32_t Id;
|
||||
|
||||
@@ -16,6 +16,8 @@ struct DisplaySettings {
|
||||
Orientation orientation;
|
||||
uint8_t gammaCurve;
|
||||
uint8_t backlightDuty;
|
||||
bool backlightTimeoutEnabled;
|
||||
uint32_t backlightTimeoutMs; // 0 = Never
|
||||
};
|
||||
|
||||
/** Compares default settings with the function parameter to return the difference */
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace tt::settings::keyboard {
|
||||
|
||||
struct KeyboardSettings {
|
||||
bool backlightEnabled;
|
||||
uint8_t backlightBrightness; // 0-255
|
||||
bool trackballEnabled;
|
||||
bool backlightTimeoutEnabled;
|
||||
uint32_t backlightTimeoutMs; // Timeout in milliseconds
|
||||
};
|
||||
|
||||
bool load(KeyboardSettings& settings);
|
||||
|
||||
KeyboardSettings loadOrGetDefault();
|
||||
|
||||
KeyboardSettings getDefault();
|
||||
|
||||
bool save(const KeyboardSettings& settings);
|
||||
|
||||
}
|
||||
@@ -7,6 +7,8 @@ namespace tt::settings {
|
||||
struct SystemSettings {
|
||||
Language language;
|
||||
bool timeFormat24h;
|
||||
std::string dateFormat; // MM/DD/YYYY, DD/MM/YYYY, YYYY-MM-DD, YYYY/MM/DD
|
||||
std::string region; // (US, EU, JP, etc.)
|
||||
};
|
||||
|
||||
bool loadSystemSettings(SystemSettings& properties);
|
||||
|
||||
Reference in New Issue
Block a user