mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
* Heltec Wireless Tracker fixes: getTextWidth() missing, PIN_BOARD_SDA/SCL
This commit is contained in:
parent
0e208f01cd
commit
7a7f436921
3 changed files with 10 additions and 0 deletions
|
|
@ -118,6 +118,13 @@ void ST7735Display::drawXbm(int x, int y, const uint8_t* bits, int w, int h) {
|
|||
display.drawBitmap(x, y, bits, w, h, _color);
|
||||
}
|
||||
|
||||
uint16_t ST7735Display::getTextWidth(const char* str) {
|
||||
int16_t x1, y1;
|
||||
uint16_t w, h;
|
||||
display.getTextBounds(str, 0, 0, &x1, &y1, &w, &h);
|
||||
return w;
|
||||
}
|
||||
|
||||
void ST7735Display::endFrame() {
|
||||
// display.display();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,5 +32,6 @@ public:
|
|||
void fillRect(int x, int y, int w, int h) override;
|
||||
void drawRect(int x, int y, int w, int h) override;
|
||||
void drawXbm(int x, int y, const uint8_t* bits, int w, int h) override;
|
||||
uint16_t getTextWidth(const char* str) override;
|
||||
void endFrame() override;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -196,6 +196,8 @@ build_flags =
|
|||
; -D ARDUINO_USB_CDC_ON_BOOT=1 ; need for debugging
|
||||
-D ST7735
|
||||
-D PIN_ADC_CTRL=2 ; redefines the V3 pin
|
||||
-D PIN_BOARD_SDA=45
|
||||
-D PIN_BOARD_SCL=46
|
||||
-D DISPLAY_ROTATION=1
|
||||
-D DISPLAY_CLASS=ST7735Display
|
||||
-D USE_PIN_TFT=1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue