Trackball Pointer Mode & driver rewrite (#453)
This commit is contained in:
@@ -7,10 +7,6 @@
|
||||
#include <Tactility/Logger.h>
|
||||
#include <Tactility/LogMessages.h>
|
||||
#include <Tactility/service/gps/GpsService.h>
|
||||
#include <Tactility/settings/KeyboardSettings.h>
|
||||
#include <Trackball/Trackball.h>
|
||||
|
||||
#include <KeyboardBacklight/KeyboardBacklight.h>
|
||||
|
||||
static const auto LOGGER = tt::Logger("T-Deck");
|
||||
|
||||
@@ -89,21 +85,6 @@ bool initBoot() {
|
||||
LOGGER.error("{} start failed", trackball->getName());
|
||||
}
|
||||
}
|
||||
|
||||
// Backlight doesn't seem to turn on until toggled on and off from keyboard settings...
|
||||
// Or let the display and backlight sleep then wake it up.
|
||||
// Then it works fine...until reboot, then you need to toggle again.
|
||||
// The current keyboard firmware sets backlight duty to 0 on boot.
|
||||
// https://github.com/Xinyuan-LilyGO/T-Deck/blob/master/firmware/T-Keyboard_Keyboard_ESP32C3_250620.bin
|
||||
// https://github.com/Xinyuan-LilyGO/T-Deck/blob/master/examples/Keyboard_ESP32C3/Keyboard_ESP32C3.ino#L25
|
||||
// https://github.com/Xinyuan-LilyGO/T-Deck/blob/master/examples/Keyboard_ESP32C3/Keyboard_ESP32C3.ino#L217
|
||||
auto kbSettings = tt::settings::keyboard::loadOrGetDefault();
|
||||
bool result = keyboardbacklight::setBrightness(kbSettings.backlightEnabled ? kbSettings.backlightBrightness : 0);
|
||||
if (!result) {
|
||||
LOGGER.warn("Failed to set keyboard backlight brightness");
|
||||
}
|
||||
|
||||
trackball::setEnabled(kbSettings.trackballEnabled);
|
||||
});
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user