Browse Source

Вынес в отдельный параметр для управления внешним Усилителем и МШУ

pull/1/head
US1GHQ 11 months ago
parent
commit
218ec99234
  1. 10
      platformio.ini
  2. 22
      src/TTGO_T-Beam_LoRa_APRS.ino

10
platformio.ini

@ -43,15 +43,16 @@ build_flags =
-D 'SHOW_BATT'
-D 'SHOW_RX_PACKET'
-D 'SHOW_RX_TIME=10000'
-D 'TXFREQ=433.766'
; -D 'SPEED_1200' ; comment out to set 300baud
-D 'TXFREQ=433.775'
-D 'SPEED_1200' ; comment out to set 300baud
-D 'TXdbmW=17'
-D 'ENABLE_OLED'
-D 'ENABLE_LED_SIGNALING'
-D 'NETWORK_TNC_PORT=8001'
-D 'MAX_TIME_TO_NEXT_TX=360000L'
-D 'FIX_BEACON_INTERVAL=1800000L'
-D 'RSSI_SNR_REPORT' ; RSSI and snr report in the KISS PACKET
; -D 'RSSI_SNR_REPORT' ; RSSI and snr report in the KISS PACKET
; -D 'TX_RX_LNA' ; Set external pins for 1W modules
[env:ttgo-t-beam-v1.0]
platform = espressif32 @ 3.0.0
@ -105,6 +106,7 @@ build_flags =
[env:Heltec-WiFi-v2]
platform = espressif32 @ 3.2.1
board = heltec_wifi_kit_32_v2
board_build.f_cpu = 80000000L
build_flags =
${env.build_flags}
-D ENABLE_WIFI
@ -112,7 +114,7 @@ build_flags =
[env:Esp32-Dev-v1]
platform = espressif32 @ 3.2.1
board = esp32doit-devkit-v1
board = esp32dev
; change MCU frequency
;board_build.f_cpu = 80000000L
build_flags =

22
src/TTGO_T-Beam_LoRa_APRS.ino

@ -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

Loading…
Cancel
Save