mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-22 16:56:53 +00:00
Remove all sorts of redundant VEXT_ENABLE ifdefs
This commit is contained in:
parent
3ae8aadaf0
commit
5ccb6df142
@ -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
|
||||
|
@ -31,7 +31,8 @@
|
||||
// GPS UC6580: GPS V_DET(8), VDD_IO(7), DCDC_IN(21), pulls up RESETN(17), D_SEL(33) and BOOT_MODE(34) through 10kR
|
||||
// GPS LNA SW7125DE: VCC(4), pulls up SHDN(5) through 10kR
|
||||
// LED: VDD, LEDA (through diode)
|
||||
#define VEXT_ENABLE_V05 3 // active HIGH - powers the GPS, GPS LNA and OLED VDD/anode
|
||||
#define VEXT_ENABLE 3 // active HIGH - powers the GPS, GPS LNA and OLED VDD/anode
|
||||
#define VEXT_ON_VALUE HIGH
|
||||
#define BUTTON_PIN 0
|
||||
|
||||
#define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
||||
|
@ -24,11 +24,12 @@
|
||||
#define TFT_WIDTH DISPLAY_HEIGHT
|
||||
#define TFT_OFFSET_X 26
|
||||
#define TFT_OFFSET_Y -1
|
||||
#define VTFT_CTRL_V03 46 // Heltec Tracker needs this pulled low for TFT
|
||||
#define VTFT_CTRL 46 // Heltec Tracker needs this pulled low for TFT
|
||||
#define SCREEN_TRANSITION_FRAMERATE 3 // fps
|
||||
#define DISPLAY_FORCE_SMALL_FONTS
|
||||
|
||||
#define VEXT_ENABLE_V03 Vext // active low, powers the oled display and the lora antenna boost
|
||||
#define VEXT_ENABLE Vext // active low, powers the oled display and the lora antenna boost
|
||||
#define VEXT_ON_VALUE LOW
|
||||
#define BUTTON_PIN 0
|
||||
|
||||
#define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
||||
|
@ -29,7 +29,8 @@
|
||||
#define SCREEN_TRANSITION_FRAMERATE 3 // fps
|
||||
#define DISPLAY_FORCE_SMALL_FONTS
|
||||
|
||||
#define VEXT_ENABLE_V05 3 // active HIGH, powers the lora antenna boost
|
||||
#define VEXT_ENABLE 3 // active HIGH, powers the lora antenna boost
|
||||
#define VEXT_ON_VALUE HIGH
|
||||
#define BUTTON_PIN 0
|
||||
|
||||
#define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
||||
|
@ -53,7 +53,8 @@
|
||||
#define SCREEN_TRANSITION_FRAMERATE 3 // fps
|
||||
// #define DISPLAY_FORCE_SMALL_FONTS
|
||||
|
||||
#define VEXT_ENABLE_V05 3 // active HIGH, powers the lora antenna boost
|
||||
#define VEXT_ENABLE 3 // active HIGH, powers the lora antenna boost
|
||||
#define VEXT_ON_VALUE HIGH
|
||||
#define BUTTON_PIN 0
|
||||
|
||||
#define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
||||
|
@ -31,7 +31,8 @@
|
||||
#define SCREEN_TRANSITION_FRAMERATE 3 // fps
|
||||
// #define DISPLAY_FORCE_SMALL_FONTS
|
||||
|
||||
#define VEXT_ENABLE_V05 3 // active HIGH, powers the lora antenna boost
|
||||
#define VEXT_ENABLE 3 // active HIGH, powers the lora antenna boost
|
||||
#define VEXT_ON_VALUE HIGH
|
||||
#define BUTTON_PIN 0
|
||||
|
||||
#define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
||||
@ -90,4 +91,4 @@
|
||||
{ \
|
||||
26, 37, 17, 16, 15, 7 \
|
||||
}
|
||||
// #end keyboard
|
||||
// #end keyboard
|
Loading…
Reference in New Issue
Block a user