first user selection
This commit is contained in:
parent
d7ed78e2a1
commit
50417e1d6d
Binary file not shown.
|
|
@ -18,7 +18,7 @@ https://github.com/sh123/esp32_loraprs
|
||||||
#include "lora_config.h"
|
#include "lora_config.h"
|
||||||
#include "beacon_config.h"
|
#include "beacon_config.h"
|
||||||
|
|
||||||
#define VERSION "2023.01.28-2" // BETA!!!
|
#define VERSION "2023.01.29-1" // BETA!!!
|
||||||
|
|
||||||
SX1268 radio = new Module(NSS, DIO1, NRST, BUSY);
|
SX1268 radio = new Module(NSS, DIO1, NRST, BUSY);
|
||||||
HardwareSerial neo6m_gps(1);
|
HardwareSerial neo6m_gps(1);
|
||||||
|
|
@ -58,9 +58,19 @@ void setup_gps_module() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void setup_first_user() {
|
void setup_first_user() {
|
||||||
for (int i = 0; i<10; i++ ) {
|
if (FirstUser == 1) {
|
||||||
|
for (int i = 0; i<10; i++) {
|
||||||
CurrentUser[i] = CALLSIGN_CONFIG_1[i];
|
CurrentUser[i] = CALLSIGN_CONFIG_1[i];
|
||||||
}
|
}
|
||||||
|
} else if (FirstUser == 2) {
|
||||||
|
for (int i = 0; i<10; i++) {
|
||||||
|
CurrentUser[i] = CALLSIGN_CONFIG_2[i];
|
||||||
|
}
|
||||||
|
} else if (FirstUser == 3) {
|
||||||
|
for (int i = 0; i<10; i++) {
|
||||||
|
CurrentUser[i] = CALLSIGN_CONFIG_3[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
Serial.print("Current User --> ");
|
Serial.print("Current User --> ");
|
||||||
Serial.println(CurrentUser[0]);
|
Serial.println(CurrentUser[0]);
|
||||||
}
|
}
|
||||||
|
|
@ -71,22 +81,20 @@ static void ForcedBeaconTx() {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void HandleNextBeacon() {
|
static void HandleNextBeacon() {
|
||||||
if (CurrentUser[0] == CALLSIGN_CONFIG_1[0]){
|
|
||||||
Serial.print("Changing CALLSIGN to --> ");
|
Serial.print("Changing CALLSIGN to --> ");
|
||||||
|
if (CurrentUser[0] == CALLSIGN_CONFIG_1[0]) {
|
||||||
Serial.println(CALLSIGN_CONFIG_2[0]);
|
Serial.println(CALLSIGN_CONFIG_2[0]);
|
||||||
for (int i = 0; i<10; i++ ) {
|
for (int i = 0; i<10; i++) {
|
||||||
CurrentUser[i] = CALLSIGN_CONFIG_2[i];
|
CurrentUser[i] = CALLSIGN_CONFIG_2[i];
|
||||||
}
|
}
|
||||||
} else if (CurrentUser[0] == CALLSIGN_CONFIG_2[0]){
|
} else if (CurrentUser[0] == CALLSIGN_CONFIG_2[0]) {
|
||||||
Serial.print("Changing CALLSIGN to --> ");
|
|
||||||
Serial.println(CALLSIGN_CONFIG_3[0]);
|
Serial.println(CALLSIGN_CONFIG_3[0]);
|
||||||
for (int i = 0; i<10; i++ ) {
|
for (int i = 0; i<10; i++) {
|
||||||
CurrentUser[i] = CALLSIGN_CONFIG_3[i];
|
CurrentUser[i] = CALLSIGN_CONFIG_3[i];
|
||||||
}
|
}
|
||||||
} else if (CurrentUser[0] == CALLSIGN_CONFIG_3[0]){
|
} else if (CurrentUser[0] == CALLSIGN_CONFIG_3[0]) {
|
||||||
Serial.print("Changing CALLSIGN to --> ");
|
|
||||||
Serial.println(CALLSIGN_CONFIG_1[0]);
|
Serial.println(CALLSIGN_CONFIG_1[0]);
|
||||||
for (int i = 0; i<10; i++ ) {
|
for (int i = 0; i<10; i++) {
|
||||||
CurrentUser[i] = CALLSIGN_CONFIG_1[i];
|
CurrentUser[i] = CALLSIGN_CONFIG_1[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,36 +1,34 @@
|
||||||
#ifndef BEACON_CONFIG_H_
|
#ifndef BEACON_CONFIG_H_
|
||||||
#define BEACON_CONFIG_H_
|
#define BEACON_CONFIG_H_
|
||||||
|
|
||||||
#define SendAltitude true // "true" adds Altitude to the APRS packet/message, "false" add Course+Speed
|
#define FirstUser 3 // Select the First User at Tracker Start Up (Example: 1 means User1)
|
||||||
#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
|
|
||||||
|
|
||||||
#define AprsPath "AP" // APRS Destination (could be also "WIDE1-1")
|
#define AprsPath "AP" // APRS Destination (could be also "WIDE1-1")
|
||||||
#define AprsOverlay "/"
|
#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 "Lora Tracker 1W" // To send this comment --> SendComment = true (edit the comment as you like)
|
||||||
|
|
||||||
#define User1_Callsign "CD2RXU-7"
|
#define User1_Callsign "CD2RXU-7"
|
||||||
#define User1_Symbol "[" // Runner
|
#define User1_Symbol "[" // Runner
|
||||||
#define User1_SlowRate 120
|
#define User1_SlowRate 120
|
||||||
#define User1_SlowSpeed 3
|
#define User1_SlowSpeed 3
|
||||||
#define User1_FastRate 60
|
#define User1_FastRate 60
|
||||||
#define User1_FastSpeed 20
|
#define User1_FastSpeed 15
|
||||||
#define User1_MinDistTx 5 // debe ser 50 pero esta 5 por pruebas
|
#define User1_MinDistTx 5 // debe ser 50 pero esta 5 por pruebas
|
||||||
#define User1_MinDeltaBcn 20
|
#define User1_MinDeltaBcn 20
|
||||||
#define User1_TurnMin 8
|
#define User1_TurnMin 8
|
||||||
#define User1_TurnSlope 60
|
#define User1_TurnSlope 50
|
||||||
|
|
||||||
#define User2_Callsign "CD2RXU-8"
|
#define User2_Callsign "CD2RXU-8"
|
||||||
#define User2_Symbol "b" // Bike
|
#define User2_Symbol "b" // Bicycle
|
||||||
#define User2_SlowRate 180
|
#define User2_SlowRate 120
|
||||||
#define User2_SlowSpeed 5
|
#define User2_SlowSpeed 5
|
||||||
#define User2_FastRate 60
|
#define User2_FastRate 60
|
||||||
#define User2_FastSpeed 40
|
#define User2_FastSpeed 40
|
||||||
#define User2_MinDistTx 70
|
#define User2_MinDistTx 70
|
||||||
#define User2_MinDeltaBcn 12
|
#define User2_MinDeltaBcn 12
|
||||||
#define User2_TurnMin 12
|
#define User2_TurnMin 12
|
||||||
#define User2_TurnSlope 80
|
#define User2_TurnSlope 70
|
||||||
|
|
||||||
#define User3_Callsign "CD2RXU-9"
|
#define User3_Callsign "CD2RXU-9"
|
||||||
#define User3_Symbol ">" // Car
|
#define User3_Symbol ">" // Car
|
||||||
|
|
@ -44,4 +42,7 @@
|
||||||
#define User3_TurnSlope 80
|
#define User3_TurnSlope 80
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
Loading…
Reference in New Issue