|
|
|
@ -88,17 +88,21 @@
|
|
|
|
|
#elif HELTEC_V2 |
|
|
|
|
#define I2C_SDA 4 |
|
|
|
|
#define I2C_SCL 15 |
|
|
|
|
#define BUTTON 2 //pin number for BUTTO
|
|
|
|
|
#define BUTTON 0 //pin number for BUTTO
|
|
|
|
|
#define BUZZER 13 // enter your buzzer pin gpio
|
|
|
|
|
const byte TXLED = 25; //pin number for LED on TX Tracker
|
|
|
|
|
const byte TXLED = 25; //pin number for LED on TX Tracker
|
|
|
|
|
#elif ESP32_DEV_V1 |
|
|
|
|
#define I2C_SDA 21 |
|
|
|
|
#define I2C_SCL 22 |
|
|
|
|
#define BUTTON 0 //pin number for BUTTO
|
|
|
|
|
#define BUZZER 13 |
|
|
|
|
const byte TXLED = 2; // enter your buzzer pin gpio
|
|
|
|
|
const byte TXPIN = 17; //pin number for TX on 1W Modules
|
|
|
|
|
const byte RXPIN = 16; //pin number for RX on 1W Modules
|
|
|
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
#ifdef TX_RX_LNA |
|
|
|
|
const byte TXPIN = 17; //pin number for TX on 1W Modules
|
|
|
|
|
const byte RXPIN = 16; //pin number for RX on 1W Modules
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
// Variables for APRS packaging
|
|
|
|
@ -338,7 +342,7 @@ void sendpacket(){
|
|
|
|
|
* @param message |
|
|
|
|
*/ |
|
|
|
|
void loraSend(byte lora_LTXPower, float lora_FREQ, const String &message) { |
|
|
|
|
#ifdef ESP32_DEV_V1 |
|
|
|
|
#ifdef TX_RX_LNA |
|
|
|
|
digitalWrite(TXPIN, HIGH); |
|
|
|
|
digitalWrite(RXPIN, LOW); |
|
|
|
|
#endif |
|
|
|
@ -359,7 +363,7 @@ void loraSend(byte lora_LTXPower, float lora_FREQ, const String &message) {
|
|
|
|
|
rf95.setTxPower(lora_LTXPower); |
|
|
|
|
rf95.sendAPRS(lora_TXBUFF, messageSize); |
|
|
|
|
rf95.waitPacketSent(); |
|
|
|
|
#ifdef ESP32_DEV_V1 |
|
|
|
|
#ifdef TX_RX_LNA |
|
|
|
|
digitalWrite(TXPIN, LOW); |
|
|
|
|
digitalWrite(RXPIN, HIGH); |
|
|
|
|
#endif |
|
|
|
@ -662,7 +666,7 @@ void setup(){
|
|
|
|
|
average_course[i]=0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#ifdef ESP32_DEV_V1 |
|
|
|
|
#ifdef TX_RX_LNA |
|
|
|
|
pinMode(TXPIN, OUTPUT); |
|
|
|
|
pinMode(RXPIN, OUTPUT); |
|
|
|
|
#endif |
|
|
|
@ -675,7 +679,7 @@ void setup(){
|
|
|
|
|
#else |
|
|
|
|
pinMode(BUTTON, INPUT_PULLUP); |
|
|
|
|
#endif |
|
|
|
|
#ifdef ESP32_DEV_V1 |
|
|
|
|
#ifdef TX_RX_LNA |
|
|
|
|
digitalWrite(TXPIN, LOW); // turn blue LED off
|
|
|
|
|
digitalWrite(RXPIN, HIGH); // turn blue LED off
|
|
|
|
|
#endif |
|
|
|
@ -791,7 +795,7 @@ void setup(){
|
|
|
|
|
writedisplaytext("","","","","",""); |
|
|
|
|
time_to_refresh = millis() + showRXTime; |
|
|
|
|
displayInvalidGPS(); |
|
|
|
|
#ifdef ESP32_DEV_V1 |
|
|
|
|
#ifdef TX_RX_LNA |
|
|
|
|
digitalWrite(TXPIN, LOW); |
|
|
|
|
digitalWrite(RXPIN, HIGH); |
|
|
|
|
#endif |
|
|
|
|