lora32 correct name on definitions
This commit is contained in:
parent
29873b4fdc
commit
11e2131e1c
|
|
@ -61,13 +61,13 @@ build_flags = -Werror -Wall -DTTGO_T_Beam_V1_2
|
|||
board = ttgo-t-beam
|
||||
build_flags = -Werror -Wall -DTTGO_T_Beam_V1_0
|
||||
|
||||
[env:ttgo-t-lora-v2_1_TNC]
|
||||
[env:ttgo-t-lora32-v2_1_TNC]
|
||||
board = ttgo-lora32-v21
|
||||
build_flags = -Werror -Wall -DTTGO_T_LORA_V2_1_TNC
|
||||
build_flags = -Werror -Wall -DTTGO_T_LORA32_V2_1_TNC
|
||||
|
||||
[env:ttgo-t-lora-v2_1_GPS]
|
||||
[env:ttgo-t-lora32-v2_1_GPS]
|
||||
board = ttgo-lora32-v21
|
||||
build_flags = -Werror -Wall -DTTGO_T_LORA_V2_1_GPS
|
||||
build_flags = -Werror -Wall -DTTGO_T_LORA32_V2_1_GPS
|
||||
|
||||
[env:ESP32_DIY_LoRa_GPS]
|
||||
board = esp32dev
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ extern uint32_t lastTx;
|
|||
namespace GPS_Utils {
|
||||
|
||||
void setup() {
|
||||
#ifdef TTGO_T_LORA_V2_1_TNC
|
||||
#ifdef TTGO_T_LORA32_V2_1_TNC
|
||||
disableGPS = true;
|
||||
#else
|
||||
disableGPS = Config.disableGPS;
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ namespace LoRa_Utils {
|
|||
while (true);
|
||||
}
|
||||
#endif
|
||||
#if defined(TTGO_T_Beam_V0_7) || defined(TTGO_T_Beam_V1_0) || defined(TTGO_T_LORA_V2_1_TNC) || defined(TTGO_T_Beam_V1_2) || defined(ESP32_DIY_LoRa_GPS) || defined(TTGO_T_LORA_V2_1_GPS)
|
||||
#if defined(TTGO_T_Beam_V0_7) || defined(TTGO_T_Beam_V1_0) || defined(TTGO_T_LORA32_V2_1_TNC) || defined(TTGO_T_Beam_V1_2) || defined(ESP32_DIY_LoRa_GPS) || defined(TTGO_T_LORA32_V2_1_GPS)
|
||||
logger.log(logging::LoggerLevel::LOGGER_LEVEL_INFO, "LoRa", "Set SPI pins!");
|
||||
SPI.begin(LORA_SCK, LORA_MISO, LORA_MOSI, LORA_CS);
|
||||
LoRa.setPins(LORA_CS, LORA_RST, LORA_IRQ);
|
||||
|
|
@ -112,7 +112,7 @@ namespace LoRa_Utils {
|
|||
Serial.println(state);
|
||||
}
|
||||
#endif
|
||||
#if defined(TTGO_T_Beam_V0_7) || defined(TTGO_T_Beam_V1_0) || defined(TTGO_T_LORA_V2_1_TNC) || defined(TTGO_T_Beam_V1_2) || defined(ESP32_DIY_LoRa_GPS) || defined(TTGO_T_LORA_V2_1_GPS)
|
||||
#if defined(TTGO_T_Beam_V0_7) || defined(TTGO_T_Beam_V1_0) || defined(TTGO_T_LORA32_V2_1_TNC) || defined(TTGO_T_Beam_V1_2) || defined(ESP32_DIY_LoRa_GPS) || defined(TTGO_T_LORA32_V2_1_GPS)
|
||||
LoRa.beginPacket();
|
||||
LoRa.write('<');
|
||||
LoRa.write(0xFF);
|
||||
|
|
@ -132,7 +132,7 @@ namespace LoRa_Utils {
|
|||
ReceivedLoRaPacket receivePacket() {
|
||||
ReceivedLoRaPacket receivedLoraPacket;
|
||||
String packet = "";
|
||||
#if defined(TTGO_T_Beam_V0_7) || defined(TTGO_T_Beam_V1_0) || defined(TTGO_T_LORA_V2_1_TNC) || defined(TTGO_T_Beam_V1_2) || defined(ESP32_DIY_LoRa_GPS) || defined(TTGO_T_LORA_V2_1_GPS)
|
||||
#if defined(TTGO_T_Beam_V0_7) || defined(TTGO_T_Beam_V1_0) || defined(TTGO_T_LORA32_V2_1_TNC) || defined(TTGO_T_Beam_V1_2) || defined(ESP32_DIY_LoRa_GPS) || defined(TTGO_T_LORA32_V2_1_GPS)
|
||||
int packetSize = LoRa.parsePacket();
|
||||
if (packetSize) {
|
||||
while (LoRa.available()) {
|
||||
|
|
|
|||
|
|
@ -313,7 +313,7 @@ namespace MENU_Utils {
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef TTGO_T_LORA_V2_1_TNC
|
||||
#ifdef TTGO_T_LORA32_V2_1_TNC
|
||||
secondRowMainMenu = "";
|
||||
thirdRowMainMenu = " LoRa APRS TNC";
|
||||
fourthRowMainMenu = "";
|
||||
|
|
@ -388,7 +388,7 @@ namespace MENU_Utils {
|
|||
if (POWER_Utils::getBatteryInfoIsConnected()) {
|
||||
String batteryVoltage = POWER_Utils::getBatteryInfoVoltage();
|
||||
String batteryCharge = POWER_Utils::getBatteryInfoCurrent();
|
||||
#if defined(TTGO_T_Beam_V0_7) || defined(ESP32_DIY_LoRa_GPS) || defined(TTGO_T_LORA_V2_1_GPS) || defined(TTGO_T_LORA_V2_1_TNC)
|
||||
#if defined(TTGO_T_Beam_V0_7) || defined(ESP32_DIY_LoRa_GPS) || defined(TTGO_T_LORA32_V2_1_GPS) || defined(TTGO_T_LORA32_V2_1_TNC)
|
||||
sixthRowMainMenu = "Bat: " + batteryVoltage + "V";
|
||||
#endif
|
||||
#if defined(TTGO_T_Beam_V1_0) || defined(TTGO_T_Beam_V1_0_SX1268)
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
#define BUTTON_PIN 38 // The middle button GPIO on the T-Beam
|
||||
#endif
|
||||
|
||||
#if defined(ESP32_DIY_LoRa_GPS) || defined(TTGO_T_LORA_V2_1_GPS)
|
||||
#if defined(ESP32_DIY_LoRa_GPS) || defined(TTGO_T_LORA32_V2_1_GPS)
|
||||
#define GPS_RX 12
|
||||
#define GPS_TX 34
|
||||
#define BUTTON_PIN -1
|
||||
|
|
@ -61,7 +61,7 @@
|
|||
#define BUTTON_PIN 39
|
||||
#endif
|
||||
|
||||
#ifdef TTGO_T_LORA_V2_1_TNC
|
||||
#ifdef TTGO_T_LORA32_V2_1_TNC
|
||||
#define GPS_RX -1
|
||||
#define GPS_TX -1
|
||||
#define BUTTON_PIN -1
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ namespace POWER_Utils {
|
|||
String batteryChargeDischargeCurrent = "";
|
||||
|
||||
double getBatteryVoltage() {
|
||||
#if defined(TTGO_T_Beam_V0_7) || defined(ESP32_DIY_LoRa_GPS) || defined(TTGO_T_LORA_V2_1_GPS) || defined(TTGO_T_LORA_V2_1_TNC) || defined(ESP32_DIY_1W_LoRa_GPS)
|
||||
#if defined(TTGO_T_Beam_V0_7) || defined(ESP32_DIY_LoRa_GPS) || defined(TTGO_T_LORA32_V2_1_GPS) || defined(TTGO_T_LORA32_V2_1_TNC) || defined(ESP32_DIY_1W_LoRa_GPS)
|
||||
int adc_value;
|
||||
double voltage;
|
||||
adc_value = analogRead(35);
|
||||
|
|
@ -79,7 +79,7 @@ namespace POWER_Utils {
|
|||
}
|
||||
|
||||
bool isCharging() {
|
||||
#if defined(TTGO_T_Beam_V0_7) || defined(ESP32_DIY_LoRa_GPS) || defined(TTGO_T_LORA_V2_1_GPS) || defined(TTGO_T_LORA_V2_1_TNC) || defined(ESP32_DIY_1W_LoRa_GPS) || defined(HELTEC_V3_GPS)
|
||||
#if defined(TTGO_T_Beam_V0_7) || defined(ESP32_DIY_LoRa_GPS) || defined(TTGO_T_LORA32_V2_1_GPS) || defined(TTGO_T_LORA32_V2_1_TNC) || defined(ESP32_DIY_1W_LoRa_GPS) || defined(HELTEC_V3_GPS)
|
||||
return 0;
|
||||
#endif
|
||||
#if defined(TTGO_T_Beam_V1_0) || defined(TTGO_T_Beam_V1_0_SX1268) || defined(TTGO_T_Beam_V1_2) || defined(TTGO_T_Beam_V1_2_SX1262) || defined(TTGO_T_Beam_S3_SUPREME_V3)
|
||||
|
|
@ -96,7 +96,7 @@ namespace POWER_Utils {
|
|||
}
|
||||
|
||||
double getBatteryChargeDischargeCurrent() {
|
||||
#if defined(TTGO_T_Beam_V0_7) || defined(ESP32_DIY_LoRa_GPS) || defined(TTGO_T_LORA_V2_1_GPS) || defined(TTGO_T_LORA_V2_1_TNC) || defined(ESP32_DIY_1W_LoRa_GPS) || defined(HELTEC_V3_GPS)
|
||||
#if defined(TTGO_T_Beam_V0_7) || defined(ESP32_DIY_LoRa_GPS) || defined(TTGO_T_LORA32_V2_1_GPS) || defined(TTGO_T_LORA32_V2_1_TNC) || defined(ESP32_DIY_1W_LoRa_GPS) || defined(HELTEC_V3_GPS)
|
||||
return 0;
|
||||
#endif
|
||||
#if defined(TTGO_T_Beam_V1_0) || defined(TTGO_T_Beam_V1_0_SX1268)
|
||||
|
|
@ -111,7 +111,7 @@ namespace POWER_Utils {
|
|||
}
|
||||
|
||||
bool isBatteryConnected() {
|
||||
#if defined(TTGO_T_Beam_V0_7) || defined(ESP32_DIY_LoRa_GPS) || defined(TTGO_T_LORA_V2_1_GPS) || defined(TTGO_T_LORA_V2_1_TNC) || defined(ESP32_DIY_1W_LoRa_GPS) || defined(HELTEC_V3_GPS)
|
||||
#if defined(TTGO_T_Beam_V0_7) || defined(ESP32_DIY_LoRa_GPS) || defined(TTGO_T_LORA32_V2_1_GPS) || defined(TTGO_T_LORA32_V2_1_TNC) || defined(ESP32_DIY_1W_LoRa_GPS) || defined(HELTEC_V3_GPS)
|
||||
if(getBatteryVoltage() > 1.0) {
|
||||
return true;
|
||||
} else {
|
||||
|
|
@ -128,7 +128,7 @@ namespace POWER_Utils {
|
|||
if (!(rate_limit_check_battery++ % 60))
|
||||
BatteryIsConnected = isBatteryConnected();
|
||||
if (BatteryIsConnected) {
|
||||
#if defined(TTGO_T_Beam_V0_7) || defined(ESP32_DIY_LoRa_GPS) || defined(TTGO_T_LORA_V2_1_GPS) || defined(TTGO_T_LORA_V2_1_TNC) || defined(TTGO_T_Beam_V1_0) || defined(TTGO_T_Beam_V1_0_SX1268) || defined(ESP32_DIY_1W_LoRa_GPS)
|
||||
#if defined(TTGO_T_Beam_V0_7) || defined(ESP32_DIY_LoRa_GPS) || defined(TTGO_T_LORA32_V2_1_GPS) || defined(TTGO_T_LORA32_V2_1_TNC) || defined(TTGO_T_Beam_V1_0) || defined(TTGO_T_Beam_V1_0_SX1268) || defined(ESP32_DIY_1W_LoRa_GPS)
|
||||
batteryVoltage = String(getBatteryVoltage(), 2);
|
||||
#endif
|
||||
#if defined(TTGO_T_Beam_V1_2) || defined(TTGO_T_Beam_V1_2_SX1262) || defined(TTGO_T_Beam_S3_SUPREME_V3)
|
||||
|
|
@ -210,7 +210,7 @@ namespace POWER_Utils {
|
|||
}
|
||||
|
||||
bool begin(TwoWire &port) {
|
||||
#if defined(TTGO_T_Beam_V0_7) || defined(ESP32_DIY_LoRa_GPS) || defined(TTGO_T_LORA_V2_1_GPS) || defined(TTGO_T_LORA_V2_1_TNC) || defined(ESP32_DIY_1W_LoRa_GPS) || defined(HELTEC_V3_GPS)
|
||||
#if defined(TTGO_T_Beam_V0_7) || defined(ESP32_DIY_LoRa_GPS) || defined(TTGO_T_LORA32_V2_1_GPS) || defined(TTGO_T_LORA32_V2_1_TNC) || defined(ESP32_DIY_1W_LoRa_GPS) || defined(HELTEC_V3_GPS)
|
||||
return true; // nor powerManagment chip for this boards (only a few measure battery voltage).
|
||||
#endif
|
||||
#if defined(TTGO_T_Beam_V1_0) || defined(TTGO_T_Beam_V1_0_SX1268)
|
||||
|
|
@ -325,7 +325,7 @@ namespace POWER_Utils {
|
|||
}
|
||||
|
||||
void lowerCpuFrequency() {
|
||||
#if defined(TTGO_T_Beam_V1_0) || defined(TTGO_T_Beam_V1_0_SX1268) || defined(TTGO_T_Beam_V1_2) || defined(ESP32_DIY_LoRa_GPS) || defined(TTGO_T_LORA_V2_1_GPS) || defined(TTGO_T_LORA_V2_1_TNC) || defined(ESP32_DIY_1W_LoRa_GPS) || defined(TTGO_T_Beam_V1_2_SX1262) || defined(TTGO_T_Beam_S3_SUPREME_V3)
|
||||
#if defined(TTGO_T_Beam_V1_0) || defined(TTGO_T_Beam_V1_0_SX1268) || defined(TTGO_T_Beam_V1_2) || defined(ESP32_DIY_LoRa_GPS) || defined(TTGO_T_LORA32_V2_1_GPS) || defined(TTGO_T_LORA32_V2_1_TNC) || defined(ESP32_DIY_1W_LoRa_GPS) || defined(TTGO_T_Beam_V1_2_SX1262) || defined(TTGO_T_Beam_S3_SUPREME_V3)
|
||||
if (setCpuFrequencyMhz(80)) {
|
||||
logger.log(logging::LoggerLevel::LOGGER_LEVEL_INFO, "Main", "CPU frequency set to 80MHz");
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue