|
|
|
@ -114,12 +114,13 @@ String aprsComment = MY_COMMENT;
|
|
|
|
|
String aprsLatPreset = LATIDUDE_PRESET;
|
|
|
|
|
String aprsLonPreset = LONGITUDE_PRESET;
|
|
|
|
|
|
|
|
|
|
String aprsFreq = TXFREQ;
|
|
|
|
|
//Set params
|
|
|
|
|
double aprsFreq = TXFREQ;
|
|
|
|
|
|
|
|
|
|
#ifdef SPEED_1200
|
|
|
|
|
int aprsMode = 1200;
|
|
|
|
|
ulong aprsMode = 1200;
|
|
|
|
|
#else
|
|
|
|
|
int aprsMode = 300;
|
|
|
|
|
ulong aprsMode = 300;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
boolean gps_state = true;
|
|
|
|
@ -362,7 +363,7 @@ void sendpacket(){
|
|
|
|
|
* @param aprsFreq
|
|
|
|
|
* @param message
|
|
|
|
|
*/
|
|
|
|
|
void loraSend(byte txPower, String aprsFreq, const String &message) {
|
|
|
|
|
void loraSend(byte txPower, float aprsFreq, const String &message) {
|
|
|
|
|
#ifdef TX_RX_LNA
|
|
|
|
|
digitalWrite(TXPIN, HIGH);
|
|
|
|
|
digitalWrite(RXPIN, LOW);
|
|
|
|
@ -383,8 +384,7 @@ void loraSend(byte txPower, String aprsFreq, const String &message) {
|
|
|
|
|
{
|
|
|
|
|
rf95.setModemConfig(BG_RF95::Bw125Cr45Sf4096);
|
|
|
|
|
}
|
|
|
|
|
float aprsFreq2 = aprsFreq.toFloat();
|
|
|
|
|
rf95.setFrequency(aprsFreq2);
|
|
|
|
|
rf95.setFrequency(aprsFreq);
|
|
|
|
|
rf95.setTxPower(txPower);
|
|
|
|
|
rf95.sendAPRS(lora_TXBUFF, messageSize);
|
|
|
|
|
rf95.waitPacketSent();
|
|
|
|
@ -671,9 +671,9 @@ void setup(){
|
|
|
|
|
//Set parameters (freq,mode,txpower)
|
|
|
|
|
if (!preferences.getBool(PREF_APRS_FREQ_INIT)){
|
|
|
|
|
preferences.putBool(PREF_APRS_FREQ_INIT, true);
|
|
|
|
|
preferences.putString(PREF_APRS_FREQ, aprsFreq);
|
|
|
|
|
preferences.putDouble(PREF_APRS_FREQ, aprsFreq);
|
|
|
|
|
}
|
|
|
|
|
aprsFreq = preferences.getString(PREF_APRS_FREQ);
|
|
|
|
|
aprsFreq = preferences.getDouble(PREF_APRS_FREQ);
|
|
|
|
|
|
|
|
|
|
if (!preferences.getBool(PREF_APRS_MODE_INIT)){
|
|
|
|
|
preferences.putBool(PREF_APRS_MODE_INIT, true);
|
|
|
|
@ -838,8 +838,8 @@ void setup(){
|
|
|
|
|
{
|
|
|
|
|
rf95.setModemConfig(BG_RF95::Bw125Cr45Sf4096);
|
|
|
|
|
}
|
|
|
|
|
float aprsFreq2 = aprsFreq.toFloat();
|
|
|
|
|
rf95.setFrequency(aprsFreq2);
|
|
|
|
|
|
|
|
|
|
rf95.setFrequency(aprsFreq);
|
|
|
|
|
rf95.setTxPower(txPower);
|
|
|
|
|
delay(250);
|
|
|
|
|
#ifdef KISS_PROTOCOL
|
|
|
|
|