nuevamejora1

This commit is contained in:
richonguzman 2023-01-28 20:21:20 -03:00
parent 72414cd40d
commit 6e869b89ee
2 changed files with 8 additions and 3 deletions

View File

@ -144,6 +144,8 @@ void loop() {
static uint32_t txInterval = 60000L;
//static int speed_zero_sent = 0;
String mensaje_test = "0";
if (!send_update && gps_loc_update) {
uint32_t lastTx = millis() - lastTxTime;
int MinimumDistanceTx = CurrentUser[6].toInt();
@ -156,6 +158,7 @@ void loop() {
if (lastTx >= txInterval) {
if (lastTxDistance > MinimumDistanceTx) {
send_update = true;
mensaje_test = "D:" + String(lastTxDistance) + " I:" + String(txInterval);
}
}
if (!send_update) {
@ -163,6 +166,7 @@ void loop() {
if (lastTx > MinimumTimeDeltaBeacon * 1000) {
if (headingDelta > TurnDegrees && lastTxDistance > MinimumDistanceTx) {
send_update = true;
mensaje_test = "C:" + String(headingDelta) + " D:" + String(lastTxDistance) + " I:" + String(txInterval);
}
}
}
@ -228,7 +232,8 @@ void loop() {
}
if (SendComment) {
AprsPacketMsg += APRS_COMMENT;
//AprsPacketMsg += APRS_COMMENT;
AprsPacketMsg += mensaje_test;
}
Serial.print(F("GPS coordinates: ")); // Only for Serial Monitor

View File

@ -10,7 +10,7 @@
//#define MinimumTimeDeltaBeacon 5 // Seg between Tx
#define SendAltitude true // "true" adds Altitude to the APRS packet/message, "false" add Course+Speed
#define SendComment false // "true" adds comment to the APRS packet/message
#define SendComment true // "true" adds comment to the APRS packet/message
#define APRS_COMMENT "Lora Tracker 1W" // if you want to send any comment change the APRS_COMMENT
// and also beacon_config.h > SendComment = true
@ -24,7 +24,7 @@
#define User1_SlowSpeed 3
#define User1_FastRate 60
#define User1_FastSpeed 20
#define User1_MinDistTx 50
#define User1_MinDistTx 5 // debe ser 50 pero esta 5 por pruebas
#define User1_MinDeltaBcn 20
#define User1_TurnMin 8
#define User1_TurnSlope 60