From 891204402e7b7b1f4c1e14fb0d215b21960aad41 Mon Sep 17 00:00:00 2001 From: Christian OE3CJB Bauer Date: Sun, 30 Aug 2020 12:42:15 +0200 Subject: [PATCH] added base91 coding in other modes, comments selectable --- src/TTGO_T-Beam_LoRa_APRS.ino | 216 +++++++++++++++++++++-------- src/TTGO_T-Beam_LoRa_APRS_config.h | 4 +- 2 files changed, 160 insertions(+), 60 deletions(-) diff --git a/src/TTGO_T-Beam_LoRa_APRS.ino b/src/TTGO_T-Beam_LoRa_APRS.ino index 36c7ffb..33bb104 100644 --- a/src/TTGO_T-Beam_LoRa_APRS.ino +++ b/src/TTGO_T-Beam_LoRa_APRS.ino @@ -219,6 +219,8 @@ float avg_c_y, avg_c_x; float millis_angle[ANGLE_AVGS]; #endif +#define TX_BASE91 // if BASE91 is set, packets will be sent compressed (in TRACKER-mode only) + static const adc_atten_t atten = ADC_ATTEN_DB_6; static const adc_unit_t unit = ADC_UNIT_1; @@ -791,6 +793,10 @@ void recalcGPS(){ if(Tlon < 0) { Tlon= -Tlon; } unsigned int Deg_Lon = Tlon; Lon = 100*(Deg_Lon) + (Tlon - Deg_Lon)*60; + aprs_lat = 900000000 - Tlat * 10000000; + aprs_lat = aprs_lat / 26 - aprs_lat / 2710 + aprs_lat / 15384615; + aprs_lon = 900000000 + Tlon * 10000000 / 2; + aprs_lon = aprs_lon / 26 - aprs_lon / 2710 + aprs_lon / 15384615; } outString = ""; @@ -816,6 +822,10 @@ switch(tracker_mode) { outString += wxTable; outString += LongFixed; outString += wxSymbol; + + + + outString += ".../...g...t"; if (tempf < 0) { // negative Werte erstellen outString += "-"; @@ -834,6 +844,7 @@ switch(tracker_mode) { helper.trim(); outString += helper; outString += "b......DHT22"; + outString += MY_COMMENT; break; case WX_TRACKER: if (wx) { @@ -845,22 +856,46 @@ switch(tracker_mode) { hum = dht.getHumidity(); tempf = dht.getTemperature()*9/5+32; #endif - for (i=0; i BICYCLE // "<" => MOTORCYCLE // "R" => Recreation Vehicle +// #define HW_COMMENT // send Alt und Battery Voltage, UNcomment if don't want to send it +#define MY_COMMENT "" // add your coment here - if empty then no comment is sent +// #define MY_COMMENT "TTGO by OE3CJB" // add your coment here - if empty then no comment is sent // TRANSMIT INTERVAL unsigned long max_time_to_nextTX = 180000L; // set here MAXIMUM time in ms(!) for smart beaconing - minimum time is always 1 min = 60 secs = 60000L !!!