Skip to content

Commit

Permalink
Minor TFT branch synch
Browse files Browse the repository at this point in the history
  • Loading branch information
fifieldt authored and caveman99 committed Dec 31, 2024
1 parent 8b34c4f commit b4b8238
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/graphics/Screen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1506,7 +1506,7 @@ Screen::Screen(ScanI2C::DeviceAddress address, meshtastic_Config_DisplayConfig_O
#elif defined(USE_ST7567)
dispdev = new ST7567Wire(address.address, -1, -1, geometry,
(address.port == ScanI2C::I2CPort::WIRE1) ? HW_I2C::I2C_TWO : HW_I2C::I2C_ONE);
#elif ARCH_PORTDUINO
#elif ARCH_PORTDUINO && !HAS_TFT
if (settingsMap[displayPanel] != no_screen) {
LOG_DEBUG("Make TFTDisplay!");
dispdev = new TFTDisplay(address.address, -1, -1, geometry,
Expand Down Expand Up @@ -2756,4 +2756,4 @@ int Screen::handleAdminMessage(const meshtastic_AdminMessage *arg)
} // namespace graphics
#else
graphics::Screen::Screen(ScanI2C::DeviceAddress, meshtastic_Config_DisplayConfig_OledType, OLEDDISPLAY_GEOMETRY) {}
#endif // HAS_SCREEN
#endif // HAS_SCREEN
2 changes: 2 additions & 0 deletions src/modules/CannedMessageModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -982,6 +982,7 @@ bool CannedMessageModule::interceptingKeyboardInput()
}
}

#if !HAS_TFT
void CannedMessageModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)
{
char buffer[50];
Expand Down Expand Up @@ -1140,6 +1141,7 @@ void CannedMessageModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *st
}
}
}
#endif //! HAS_TFT

ProcessMessage CannedMessageModule::handleReceived(const meshtastic_MeshPacket &mp)
{
Expand Down
5 changes: 4 additions & 1 deletion src/sleep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ RTC_DATA_ATTR int bootCount = 0;
*/
void setCPUFast(bool on)
{
#if defined(ARCH_ESP32) && HAS_WIFI
#if defined(ARCH_ESP32) && HAS_WIFI && !HAS_TFT

if (isWifiAvailable()) {
/*
Expand Down Expand Up @@ -391,6 +391,9 @@ esp_sleep_wakeup_cause_t doLightSleep(uint64_t sleepMsec) // FIXME, use a more r
gpio_wakeup_enable(pin, GPIO_INTR_LOW_LEVEL);
esp_sleep_enable_gpio_wakeup();
#endif
#ifdef INPUTDRIVER_ENCODER_BTN
gpio_wakeup_enable((gpio_num_t)INPUTDRIVER_ENCODER_BTN, GPIO_INTR_LOW_LEVEL);
#endif
#ifdef T_WATCH_S3
gpio_wakeup_enable((gpio_num_t)SCREEN_TOUCH_INT, GPIO_INTR_LOW_LEVEL);
#endif
Expand Down
4 changes: 2 additions & 2 deletions variants/seeed-sensecap-indicator/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ build_flags = ${esp32_base.build_flags}

lib_deps = ${esp32s3_base.lib_deps}
https://github.com/mverch67/LovyanGFX#develop
earlephilhower/ESP8266Audio@^1.9.7
earlephilhower/ESP8266SAM@^1.0.1
earlephilhower/ESP8266Audio@^1.9.9
earlephilhower/ESP8266SAM@^1.0.1
3 changes: 1 addition & 2 deletions variants/seeed-sensecap-indicator/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
#define ST7701_BL 45
#define ST7701_SPI_HOST SPI2_HOST
#define ST7701_BACKLIGHT_EN 45
#define SPI_FREQUENCY 20000000
#define SPI_READ_FREQUENCY 16000000
#define SPI_FREQUENCY 12000000
#define TFT_HEIGHT 480
#define TFT_WIDTH 480
#define TFT_OFFSET_X 0
Expand Down
4 changes: 2 additions & 2 deletions variants/t-deck/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ board_check = true
upload_protocol = esptool
#upload_port = COM29

build_flags = ${esp32_base.build_flags}
build_flags = ${esp32s3_base.build_flags}
-DT_DECK
-DBOARD_HAS_PSRAM
-DMAX_THREADS=40
Expand All @@ -16,4 +16,4 @@ build_flags = ${esp32_base.build_flags}
lib_deps = ${esp32s3_base.lib_deps}
lovyan03/LovyanGFX@^1.1.9
earlephilhower/ESP8266Audio@^1.9.9
earlephilhower/ESP8266SAM@^1.0.1
earlephilhower/ESP8266SAM@^1.0.1
6 changes: 4 additions & 2 deletions variants/t-deck/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@

#define SLEEP_TIME 120

#ifndef HAS_TFT
#define BUTTON_PIN 0
// #define BUTTON_NEED_PULLUP
#endif
#define GPS_DEFAULT_NOT_PRESENT 1
#define GPS_RX_PIN 44
#define GPS_TX_PIN 43
Expand Down Expand Up @@ -60,7 +62,7 @@
#define TB_DOWN 15
#define TB_LEFT 1
#define TB_RIGHT 2
#define TB_PRESS BUTTON_PIN
#define TB_PRESS 0 // BUTTON_PIN

// microphone
#define ES7210_SCK 47
Expand Down Expand Up @@ -98,4 +100,4 @@
#define SX126X_DIO2_AS_RF_SWITCH
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
// Internally the TTGO module hooks the SX1262-DIO2 in to control the TX/RX switch (which is the default for the sx1262interface
// code)
// code)

0 comments on commit b4b8238

Please sign in to comment.