SQ9MDD / TTGO-T-Beam-LoRa-APRS

Use TTGO T-Beam as LoRa APRS Tracker
64 stars 23 forks source link

Feature request: message text only in every tenth's transmission #90

Closed dl9sau closed 2 years ago

dl9sau commented 2 years ago

Another airtime saving feature: send message text only in every tenth's frame. To be discussed: could also be added for battery voltage information.

In TTGO_T-Beam_LoRa_APRS.ino:

@@ -326,15 +352,21 @@ void prepareAPRSFrame(){
   }

   if(show_cmt){
-    outString += aprsComment;
+    static uint8_t n;
+    static uint32_t last_sent = 0L;
+    if (!rate_limit_message_text || (n++ % 10) == 0 || (last_sent + sb_max_interval) < millis())
+      outString += aprsComment;
+    last_sent = millis();
   }

   if(showBattery){
dl9sau commented 2 years ago

Feature is stable in my development version