Browse Source

FIXED BEACON

pull/11/head
Rysiek Labus 1 year ago
parent
commit
4461cff0bf
  1. 10
      src/TTGO_T-Beam_LoRa_APRS.ino
  2. 8
      src/TTGO_T-Beam_LoRa_APRS_config.h

10
src/TTGO_T-Beam_LoRa_APRS.ino

@ -112,6 +112,7 @@ int point_avg_speed = 0, point_avg_course = 0;
ulong min_time_to_nextTX=60000L; // minimum time period between TX = 60000ms = 60secs = 1min
ulong nextTX=60000L; // preset time period between TX = 60000ms = 60secs = 1min
ulong time_to_refresh = 0;
ulong next_fixed_beacon = 0;
#define ANGLE 60 // angle to send packet at smart beaconing
#define ANGLE_AVGS 3 // angle averaging - x times
float average_course[ANGLE_AVGS];
@ -480,6 +481,7 @@ void loop() {
gps_state = false;
axp.setPowerOutPut(AXP192_LDO3, AXP202_OFF); // GPS OFF
writedisplaytext("((GPSOFF))","","","","","",1);
next_fixed_beacon = millis() + fix_beacon_interval;
}else{
gps_state = true;
@ -491,6 +493,14 @@ void loop() {
if(digitalRead(BUTTON)==HIGH && key_up == false){
key_up = true;
}
#ifdef FIXED_BEACON_EN
if(millis() >= next_fixed_beacon && gps_state == false){
next_fixed_beacon = millis() + fix_beacon_interval;
writedisplaytext("((AUT TX))","","","","","",1);
sendpacket();
}
#endif
while (gpsSerial.available() > 0) {
gps.encode(gpsSerial.read());

8
src/TTGO_T-Beam_LoRa_APRS_config.h

@ -9,8 +9,9 @@
#define KISS_PROTOCOLL // If enabled send and receive data in SIMPLE KISS format to serial port
#define CALLSIGN "SQ9MDD-11" // enter your callsign here - less then 6 letter callsigns please add "spaces" so total length is 6 (without SSID)
#define DIGI_PATH "WIDE1-1" // one hope please (WIDE1-1)
#define LATIDUDE_PRESET "5215.03N" // please in APRS notation: DDMM.mmN or DDMM.mmS
#define LONGITUDE_PRESET "02055.59E" // please in APRS notation: DDDMM.mmE or DDDMM.mmW
#define FIXED_BEACON_EN // allows cyclic sending of a bicon when GPS is turned off
#define LATIDUDE_PRESET "5215.03N" // please in APRS notation: DDMM.mmN or DDMM.mmS (used for manual or fixed beacon sending)
#define LONGITUDE_PRESET "02055.59E" // please in APRS notation: DDDMM.mmE or DDDMM.mmW (used for manual or fixed beacon sending)
#define APRS_SYMBOL_TABLE "/"
#define APRS_SYMBOL "[" // other symbols are: "[" => RUNNER, "b" => BICYCLE, "<" => MOTORCYCLE, "R" => Recreation Vehicle
#define MY_COMMENT "LoRa tracker" // add your coment here - if empty then no comment is sent
@ -27,4 +28,5 @@
//#define LOCAL_KISS_ECHO // echoing KISS frame back
#define T_BEAM_V1_0 // if enabled t-beam v1.0 disabled t-beam V.0.7
unsigned long max_time_to_nextTX = 360000L; // TRANSMIT INTERVAL set here MAXIMUM time in ms(!) for smart beaconing - minimum time is always 1 min = 60 secs = 60000L !!!
unsigned long max_time_to_nextTX = 360000L; // TRANSMIT INTERVAL set here MAXIMUM time in ms(!) for smart beaconing - minimum time is always 1 min = 60 secs = 60000L !!!
unsigned long fix_beacon_interval = 1800000L; // Fixed beacon interwal (when GPS is disabled and FIXED_BEACON_EN is enabled) 30min default
Loading…
Cancel
Save