diff --git a/src/TTGO_T-Beam_LoRa_APRS.ino b/src/TTGO_T-Beam_LoRa_APRS.ino index 9fb6df3..196d319 100644 --- a/src/TTGO_T-Beam_LoRa_APRS.ino +++ b/src/TTGO_T-Beam_LoRa_APRS.ino @@ -99,6 +99,7 @@ float average_speed[5] = {0,0,0,0,0}, average_speed_final=0, max_speed=30, min_s float old_course = 0, new_course = 0; int point_avg_speed = 0, point_avg_course = 0; ulong min_time_to_nextTX=60000L; // minimum time period between TX = 60000ms = 60secs = 1min +ulong max_time_to_nextTX= MAX_TIME_TO_NEXT_TX; ulong nextTX=60000L; // preset time period between TX = 60000ms = 60secs = 1min #define ANGLE 60 // angle to send packet at smart beaconing #define ANGLE_AVGS 3 // angle averaging - x times diff --git a/src/TTGO_T-Beam_LoRa_APRS_config.h b/src/TTGO_T-Beam_LoRa_APRS_config.h index 6ca0379..688d021 100644 --- a/src/TTGO_T-Beam_LoRa_APRS_config.h +++ b/src/TTGO_T-Beam_LoRa_APRS_config.h @@ -23,4 +23,4 @@ #define T_BEAM_V1_0 // if enabled t-beam v1.0 disabled t-beam V.0.7 //#define KISS_DEBUG -unsigned long max_time_to_nextTX = 180000L; // TRANSMIT INTERVAL set here MAXIMUM time in ms(!) for smart beaconing - minimum time is always 1 min = 60 secs = 60000L !!! \ No newline at end of file +#define MAX_TIME_TO_NEXT_TX 180000L // TRANSMIT INTERVAL set here MAXIMUM time in ms(!) for smart beaconing - minimum time is always 1 min = 60 secs = 60000L !!! \ No newline at end of file diff --git a/src/taskGPS.cpp b/src/taskGPS.cpp index ec98df1..bcf4a80 100644 --- a/src/taskGPS.cpp +++ b/src/taskGPS.cpp @@ -1,7 +1,12 @@ #include +#include "TTGO_T-Beam_LoRa_APRS_config.h" // Pins for GPS -static const int RXPin = 12, TXPin = 34; // changed BG A3 A2 +#ifdef T_BEAM_V1_0 +static const int RXPin = 12, TXPin = 34; +#else +static const int RXPin = 15, TXPin = 12; +#endif static const uint32_t GPSBaud = 9600; //GPS HardwareSerial gpsSerial(1); // TTGO has HW serial TinyGPSPlus gps; // The TinyGPS++ object