mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-23 19:20:41 +00:00
Remove all sorts of redundant VEXT_ENABLE ifdefs
This commit is contained in:
@@ -581,10 +581,6 @@ void TFTDisplay::sendCommand(uint8_t com)
|
||||
tft->powerSaveOff();
|
||||
#endif
|
||||
|
||||
#ifdef VTFT_CTRL_V03
|
||||
digitalWrite(VTFT_CTRL_V03, LOW);
|
||||
#endif
|
||||
|
||||
#ifdef VTFT_CTRL
|
||||
digitalWrite(VTFT_CTRL, LOW);
|
||||
#endif
|
||||
@@ -610,9 +606,6 @@ void TFTDisplay::sendCommand(uint8_t com)
|
||||
tft->powerSaveOn();
|
||||
#endif
|
||||
|
||||
#ifdef VTFT_CTRL_V03
|
||||
digitalWrite(VTFT_CTRL_V03, HIGH);
|
||||
#endif
|
||||
#ifdef VTFT_CTRL
|
||||
digitalWrite(VTFT_CTRL, HIGH);
|
||||
#endif
|
||||
|
||||
18
src/main.cpp
18
src/main.cpp
@@ -278,25 +278,9 @@ void setup()
|
||||
digitalWrite(LORA_TCXO_GPIO, HIGH);
|
||||
#endif
|
||||
|
||||
#if defined(VEXT_ENABLE_V03)
|
||||
pinMode(VEXT_ENABLE_V03, OUTPUT);
|
||||
digitalWrite(VEXT_ENABLE_V03, 0); // turn on the display power and antenna boost
|
||||
LOG_DEBUG("HELTEC Detect Tracker V1.0\n");
|
||||
#elif defined(VEXT_ENABLE_V05)
|
||||
pinMode(VEXT_ENABLE_V05, OUTPUT);
|
||||
digitalWrite(VEXT_ENABLE_V05, 1); // turn on the lora antenna boost
|
||||
LOG_DEBUG("HELTEC Detect Tracker V1.1\n");
|
||||
#elif defined(VEXT_ENABLE) && defined(VEXT_ON_VALUE)
|
||||
#if defined(VEXT_ENABLE)
|
||||
pinMode(VEXT_ENABLE, OUTPUT);
|
||||
digitalWrite(VEXT_ENABLE, VEXT_ON_VALUE); // turn on the display power
|
||||
#elif defined(VEXT_ENABLE)
|
||||
pinMode(VEXT_ENABLE, OUTPUT);
|
||||
digitalWrite(VEXT_ENABLE, 0); // turn on the display power
|
||||
#endif
|
||||
|
||||
#if defined(VTFT_CTRL_V03)
|
||||
pinMode(VTFT_CTRL_V03, OUTPUT);
|
||||
digitalWrite(VTFT_CTRL_V03, LOW);
|
||||
#endif
|
||||
|
||||
#if defined(VTFT_CTRL)
|
||||
|
||||
@@ -246,14 +246,8 @@ void doDeepSleep(uint32_t msecToWake, bool skipPreflight = false)
|
||||
digitalWrite(RESET_OLED, 1); // put the display in reset before killing its power
|
||||
#endif
|
||||
|
||||
#if defined(VEXT_ENABLE_V03)
|
||||
digitalWrite(VEXT_ENABLE_V03, 1); // turn off the display power
|
||||
#elif defined(VEXT_ENABLE_V05)
|
||||
digitalWrite(VEXT_ENABLE_V05, 0); // turn off the lora amplifier power
|
||||
#elif defined(VEXT_ENABLE) && defined(VEXT_ON_VALUE)
|
||||
#if defined(VEXT_ENABLE)
|
||||
digitalWrite(VEXT_ENABLE, !VEXT_ON_VALUE); // turn on the display power
|
||||
#elif defined(VEXT_ENABLE)
|
||||
digitalWrite(VEXT_ENABLE, 1); // turn off the display power
|
||||
#endif
|
||||
|
||||
#ifdef ARCH_ESP32
|
||||
|
||||
Reference in New Issue
Block a user