|
|
|
@ -113,7 +113,9 @@ String relay_path;
|
|
|
|
|
String aprsComment = MY_COMMENT;
|
|
|
|
|
String aprsLatPreset = LATIDUDE_PRESET;
|
|
|
|
|
String aprsLonPreset = LONGITUDE_PRESET;
|
|
|
|
|
float aprsFreq;
|
|
|
|
|
|
|
|
|
|
//temporary hack for setfreq
|
|
|
|
|
String aprsFreq = TXFREQ;
|
|
|
|
|
String aprsMode = "1200";
|
|
|
|
|
|
|
|
|
|
boolean gps_state = true;
|
|
|
|
@ -356,7 +358,7 @@ void sendpacket(){
|
|
|
|
|
* @param aprsFreq
|
|
|
|
|
* @param message
|
|
|
|
|
*/
|
|
|
|
|
void loraSend(byte lora_LTXPower, float aprsFreq, const String &message) {
|
|
|
|
|
void loraSend(byte lora_LTXPower, String aprsFreq, const String &message) {
|
|
|
|
|
#ifdef TX_RX_LNA
|
|
|
|
|
digitalWrite(TXPIN, HIGH);
|
|
|
|
|
digitalWrite(RXPIN, LOW);
|
|
|
|
@ -374,7 +376,8 @@ void loraSend(byte lora_LTXPower, float aprsFreq, const String &message) {
|
|
|
|
|
#else
|
|
|
|
|
rf95.setModemConfig(BG_RF95::Bw125Cr45Sf4096);
|
|
|
|
|
#endif
|
|
|
|
|
rf95.setFrequency(aprsFreq);
|
|
|
|
|
float aprsFreq2 = aprsFreq.toFloat();
|
|
|
|
|
rf95.setFrequency(aprsFreq2);
|
|
|
|
|
rf95.setTxPower(lora_LTXPower);
|
|
|
|
|
rf95.sendAPRS(lora_TXBUFF, messageSize);
|
|
|
|
|
rf95.waitPacketSent();
|
|
|
|
@ -661,9 +664,9 @@ void setup(){
|
|
|
|
|
//Set parameters (freq,mode,txpower)
|
|
|
|
|
if (!preferences.getBool(PREF_APRS_FREQ_INIT)){
|
|
|
|
|
preferences.putBool(PREF_APRS_FREQ_INIT, true);
|
|
|
|
|
preferences.putFloat(PREF_APRS_FREQ, aprsFreq);
|
|
|
|
|
preferences.putString(PREF_APRS_FREQ, aprsFreq);
|
|
|
|
|
}
|
|
|
|
|
aprsFreq = preferences.getFloat(PREF_APRS_FREQ);
|
|
|
|
|
aprsFreq = preferences.getString(PREF_APRS_FREQ);
|
|
|
|
|
|
|
|
|
|
if (!preferences.getBool(PREF_APRS_MODE_INIT)){
|
|
|
|
|
preferences.putBool(PREF_APRS_MODE_INIT, true);
|
|
|
|
@ -825,7 +828,8 @@ void setup(){
|
|
|
|
|
#else
|
|
|
|
|
rf95.setModemConfig(BG_RF95::Bw125Cr45Sf4096);
|
|
|
|
|
#endif
|
|
|
|
|
rf95.setFrequency(aprsFreq);
|
|
|
|
|
float aprsFreq2 = aprsFreq.toFloat();
|
|
|
|
|
rf95.setFrequency(aprsFreq2);
|
|
|
|
|
rf95.setTxPower(txPower);
|
|
|
|
|
delay(250);
|
|
|
|
|
#ifdef KISS_PROTOCOL
|
|
|
|
@ -951,6 +955,7 @@ void loop() {
|
|
|
|
|
writedisplaytext("((KISSTX))","","","","","");
|
|
|
|
|
time_to_refresh = millis() + showRXTime;
|
|
|
|
|
loraSend(txPower, aprsFreq, *TNC2DataFrame);
|
|
|
|
|
Serial.print(aprsFreq);
|
|
|
|
|
delete TNC2DataFrame;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|