comments update

This commit is contained in:
richonguzman 2023-02-11 17:45:44 -03:00
parent f44ae9f398
commit 51dadb64e3
2 changed files with 12 additions and 4 deletions

View File

@ -115,7 +115,8 @@ void setup() {
}
uint8_t tx_buffer[256];
uint32_t lastTxTime = 0;
uint32_t lastTxTime = 0;
uint32_t lastCommentTxTime = 0;
char *ax25_base91enc(char *s, uint8_t n, uint32_t v) {
/* Creates a Base-91 representation of the value in v in the string */
@ -144,6 +145,7 @@ void loop() {
static double lastTxLongitude = 0.0;
static double lastTxDistance = 0.0;
static uint32_t txInterval = 60000L;
uint32_t txCommentInterval = 15*60*1000;
int CurrentSpeed = (int)gps.speed.kmph();
//static int speed_zero_sent = 0;
@ -241,8 +243,14 @@ void loop() {
}
if (SendComment) {
//AprsPacketMsg += APRS_COMMENT;
AprsPacketMsg += mensaje_test;
uint32_t lastCommentTx = millis() - lastCommentTxTime;
if (lastCommentTx >= txCommentInterval) {
AprsPacketMsg += AprsComment;
lastCommentTxTime = millis();
} else {
AprsPacketMsg += mensaje_test; //esto es solo para validar giro distancia y otras cosas
}
}
Serial.print(F("GPS coordinates: ")); // Only for Serial Monitor

View File

@ -6,7 +6,7 @@
#define AprsOverlay "/"
#define SendAltitude true // "true" adds Altitude to the APRS packet/message, "false" add Course+Speed
#define SendComment true // "true" adds comment to the APRS packet/message
#define APRS_COMMENT "https://github.com/richonguzman/LoRa_1W_APRS_Tracker" // To send this comment --> SendComment = true (edit the comment as you like)
#define AprsComment "https://github.com/richonguzman/LoRa_1W_APRS_Tracker" // To send this comment --> SendComment = true (edit the comment as you like)
#define User1_Callsign "CD2RXU-7" // This is my Callsign , so go on and change it to yours!!!
#define User1_Symbol "[" // Runner