mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-29 22:20:37 +00:00
* Updated kbI2cBase.cpp Updated keyboard settings for t-deck to allow a modifier key to trigger 'tab', mute notifications, or quit. To trigger the modifier press the shift key and mic (0) button at the same time. Then press q (quit), m (mute), or t (tab). * Update kbI2cBase.cpp * fixed formatting issues in kbI2cBase.cpp * Removed keyboard shortcut code that doesnt work alt+t does not work on a t-deck so I removed it to avoid confusion. * Updated kbI2cBase.cpp Updated keyboard settings for t-deck to allow a modifier key to trigger 'tab', mute notifications, or quit. To trigger the modifier press the shift key and mic (0) button at the same time. Then press q (quit), m (mute), or t (tab). * Update kbI2cBase.cpp * fixed formatting issues in kbI2cBase.cpp * Removed keyboard shortcut code that doesnt work alt+t does not work on a t-deck so I removed it to avoid confusion. * Changed modifier key to alt+c * Added screen brightness functionality Use modifier key with o(+) to increase brightness or i(-) to decrease. Currently there are 4 levels of brightness, (L, ML, MH, H). I would like to add a popup message to tell you the brightness. * Added checks to disable screen brightness changes on unsupported hardware * Setting the brightness code to work on only applicable devices * Added "function symbol" display to bottom right corner of screen. Now shows when mute is active or modifier key is pressed. Also fixed some other minor issues. * commented out a log * Reworked how modifier functions worked, added I wasn’t happy with my previous implementation, and I think it would have caused issues with other devices. This should work on all devices. * Added back the function I moved causing issue with versions * Fixed the version conflicts, everything seems to work fine now --------- Co-authored-by: Ben Meadors <benmmeadors@gmail.com> Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
51 lines
1.5 KiB
C++
51 lines
1.5 KiB
C++
#pragma once
|
|
|
|
#include <OLEDDisplay.h>
|
|
|
|
/**
|
|
* An adapter class that allows using the LovyanGFX library as if it was an OLEDDisplay implementation.
|
|
*
|
|
* Remaining TODO:
|
|
* optimize display() to only draw changed pixels (see other OLED subclasses for examples)
|
|
* Use the fast NRF52 SPI API rather than the slow standard arduino version
|
|
*
|
|
* turn radio back on - currently with both on spi bus is fucked? or are we leaving chip select asserted?
|
|
*/
|
|
class TFTDisplay : public OLEDDisplay
|
|
{
|
|
public:
|
|
/* constructor
|
|
FIXME - the parameters are not used, just a temporary hack to keep working like the old displays
|
|
*/
|
|
TFTDisplay(uint8_t, int, int, OLEDDISPLAY_GEOMETRY, HW_I2C);
|
|
|
|
// Write the buffer to the display memory
|
|
virtual void display() override { display(false); };
|
|
virtual void display(bool fromBlank);
|
|
|
|
// Turn the display upside down
|
|
virtual void flipScreenVertically();
|
|
|
|
// Touch screen (static handlers)
|
|
static bool hasTouch(void);
|
|
static bool getTouch(int16_t *x, int16_t *y);
|
|
|
|
// Functions for changing display brightness
|
|
void setDisplayBrightness(uint8_t);
|
|
|
|
/**
|
|
* shim to make the abstraction happy
|
|
*
|
|
*/
|
|
void setDetected(uint8_t detected);
|
|
|
|
protected:
|
|
// the header size of the buffer used, e.g. for the SPI command header
|
|
virtual int getBufferOffset(void) override { return 0; }
|
|
|
|
// Send a command to the display (low level function)
|
|
virtual void sendCommand(uint8_t com) override;
|
|
|
|
// Connect to the display
|
|
virtual bool connect() override;
|
|
}; |