testing heltec v2 tnc
This commit is contained in:
parent
5e6c80d8f2
commit
5d06ce3a05
|
|
@ -59,7 +59,7 @@ namespace POWER_Utils {
|
|||
#ifdef HELTEC_WIRELESS_TRACKER
|
||||
digitalWrite(ADC_CTRL, HIGH);
|
||||
#endif
|
||||
#if defined(HELTEC_V3_GPS) || defined(HELTEC_V3_TNC)|| defined(HELTEC_V2_GPS) || defined(HELTEC_V2_GPS_915) || defined(HELTEC_WSL_V3_GPS_DISPLAY)
|
||||
#if defined(HELTEC_V3_GPS) || defined(HELTEC_V3_TNC)|| defined(HELTEC_V2_GPS) || defined(HELTEC_V2_GPS_915) || defined(HELTEC_V2_TNC) || defined(HELTEC_WSL_V3_GPS_DISPLAY)
|
||||
digitalWrite(ADC_CTRL, LOW);
|
||||
#endif
|
||||
#endif
|
||||
|
|
@ -68,7 +68,7 @@ namespace POWER_Utils {
|
|||
#ifdef HELTEC_WIRELESS_TRACKER
|
||||
digitalWrite(ADC_CTRL, LOW);
|
||||
#endif
|
||||
#if defined(HELTEC_V3_GPS) || defined(HELTEC_V3_TNC) || defined(HELTEC_V2_GPS) || defined(HELTEC_V2_GPS_915) || defined(HELTEC_WSL_V3_GPS_DISPLAY)
|
||||
#if defined(HELTEC_V3_GPS) || defined(HELTEC_V3_TNC) || defined(HELTEC_V2_GPS) || defined(HELTEC_V2_GPS_915) || defined(HELTEC_V2_TNC) || defined(HELTEC_WSL_V3_GPS_DISPLAY)
|
||||
digitalWrite(ADC_CTRL, HIGH);
|
||||
#endif
|
||||
batteryMeasurmentTime = millis();
|
||||
|
|
@ -84,7 +84,7 @@ namespace POWER_Utils {
|
|||
double inputDivider = (1.0 / (390.0 + 100.0)) * 100.0; // The voltage divider is a 390k + 100k resistor in series, 100k on the low side.
|
||||
return (voltage / inputDivider) + 0.285; // Yes, this offset is excessive, but the ADC on the ESP32s3 is quite inaccurate and noisy. Adjust to own measurements.
|
||||
#endif
|
||||
#if defined(HELTEC_V2_GPS) || defined(HELTEC_V2_GPS_915)
|
||||
#if defined(HELTEC_V2_GPS) || defined(HELTEC_V2_GPS_915) || defined(HELTEC_V2_TNC)
|
||||
double inputDivider = (1.0 / (220.0 + 100.0)) * 100.0; // The voltage divider is a 390k + 100k resistor in series, 100k on the low side.
|
||||
return (voltage / inputDivider) + 0.285; // Yes, this offset is excessive, but the ADC on the ESP32s3 is quite inaccurate and noisy. Adjust to own measurements.
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[env:heltec-lora32-v2_GPS]
|
||||
extends = env:esp32
|
||||
board = ttgo-lora32-v21
|
||||
board = heltec_wifi_lora_32_V2
|
||||
build_flags =
|
||||
${common.build_flags}
|
||||
-D HELTEC_V2_GPS
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[env:heltec-lora32-v2_GPS_915]
|
||||
extends = env:esp32
|
||||
board = ttgo-lora32-v21
|
||||
board = heltec_wifi_lora_32_V2
|
||||
build_flags =
|
||||
${common.build_flags}
|
||||
-D HELTEC_V2_GPS_915
|
||||
|
|
|
|||
|
|
@ -0,0 +1,34 @@
|
|||
#ifndef BOARD_PINOUT_H_
|
||||
#define BOARD_PINOUT_H_
|
||||
|
||||
// LoRa Radio
|
||||
#define HAS_SX1278
|
||||
#define RADIO_SCLK_PIN 5
|
||||
#define RADIO_MISO_PIN 19
|
||||
#define RADIO_MOSI_PIN 27
|
||||
#define RADIO_CS_PIN 18
|
||||
#define RADIO_RST_PIN 14
|
||||
#define RADIO_BUSY_PIN 26
|
||||
|
||||
// Display
|
||||
#undef OLED_SDA
|
||||
#undef OLED_SCL
|
||||
#undef OLED_RST
|
||||
|
||||
#define OLED_SDA 4
|
||||
#define OLED_SCL 15
|
||||
#define OLED_RST 16
|
||||
|
||||
// GPS
|
||||
#define HAS_NO_GPS
|
||||
#define GPS_RX -1
|
||||
#define GPS_TX -1
|
||||
|
||||
// OTHER
|
||||
#define BATTERY_PIN 37
|
||||
#define BUTTON_PIN 0
|
||||
#define ADC_CTRL 21
|
||||
|
||||
#define HAS_BT_CLASSIC
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
[env:heltec-lora32-v2_TNC]
|
||||
extends = env:esp32
|
||||
board = heltec_wifi_lora_32_V2
|
||||
build_flags =
|
||||
${common.build_flags}
|
||||
-D HELTEC_V2_TNC
|
||||
lib_deps =
|
||||
${common.lib_deps}
|
||||
${common.display_libs}
|
||||
Loading…
Reference in New Issue