Merge pull request #17 from sq8vps/dev

non-aprs switch
pull/22/head
Piotr Wilkoń 2023-07-29 19:10:30 +02:00 zatwierdzone przez GitHub
commit 014057acc6
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
7 zmienionych plików z 53 dodań i 5 usunięć

Wyświetl plik

@ -1,3 +1,21 @@
# 1.2.6 (2023-08-29)
## New features
* Added ```nonaprs [on/off]``` command that enables reception of non-APRS frames, e.g. for full Packet Radio use
## Bug fixes
* Beacons not being send fixed
## Other
* none
## Known bugs
* none
# 1.2.5 (2022-11-05)
## New features
* Added ```dest <address>``` command that enables setting own destination address
## Bug fixes
* none
## Other
* PWM defaulting to 50%
## Known bugs
* none
# 1.2.4 (2022-08-30)
## New features
* Added ```monkiss [on/off]``` command that enables sending own and digipeated frames to KISS ports

Wyświetl plik

@ -38,6 +38,7 @@ typedef struct
uint16_t txDelayLength; //TXDelay length in ms
uint16_t txTailLength; //TXTail length in ms
uint16_t quietTime; //Quiet time in ms
uint8_t allowNonAprs; //allow non-APRS packets
} Ax25_config;

Wyświetl plik

@ -87,7 +87,8 @@ along with VP-Digi. If not, see <http://www.gnu.org/licenses/>.
#define CONFIG_PWM_FLAT 1206
#define CONFIG_KISSMONITOR 1208
#define CONFIG_DEST 1210
#define CONFIG_XXX 1216 //next address (not used)
#define CONFIG_ALLOWNONAPRS 1216
#define CONFIG_XXX 1218 //next address (not used)
/**
* @brief Store configuration from RAM to Flash

Wyświetl plik

@ -140,10 +140,9 @@ void Ax25_bitParse(uint8_t bit, uint8_t modemNo)
break;
}
//check if this frame has control=0x03 and PID=0xF0
//if not, it's not a correct APRS frame, even if it has correct CRC
//if non-APRS frames are not allowed, check if this frame has control=0x03 and PID=0xF0
if(!((rx->frame[i + 1] == 0x03) && (rx->frame[i + 2] == 0xf0)))
if(!ax25Cfg.allowNonAprs && ((rx->frame[i + 1] != 0x03) || (rx->frame[i + 2] != 0xf0)))
{
rx->recByte = 0;
rx->rBitIdx = 0;

Wyświetl plik

@ -27,7 +27,7 @@ uint8_t callSsid = 0;
uint8_t dest[7] = {130, 160, 156, 172, 96, 98, 96}; //destination address: APNV01-0 by default. SSID MUST remain 0.
const uint8_t *versionString = (const uint8_t*)"VP-Digi v. 1.2.5\r\nThe open-source standalone APRS digipeater controller and KISS TNC\r\n";
const uint8_t *versionString = (const uint8_t*)"VP-Digi v. 1.2.6\r\nThe open-source standalone APRS digipeater controller and KISS TNC\r\n";
uint8_t autoReset = 0;
uint32_t autoResetTimer = 0;

Wyświetl plik

@ -191,6 +191,7 @@ void Config_write(void)
flash_write(CONFIG_AUTORST, autoReset);
flash_write(CONFIG_PWM_FLAT, afskCfg.usePWM | (afskCfg.flatAudioIn << 1));
flash_write(CONFIG_KISSMONITOR, kissMonitor);
flash_write(CONFIG_ALLOWNONAPRS, ax25Cfg.allowNonAprs);
flash_write(CONFIG_FLAG, FLAG_CONFIG_WRITTEN);
@ -281,6 +282,7 @@ uint8_t Config_read(void)
afskCfg.usePWM = t & 1;
afskCfg.flatAudioIn = (t & 2) > 0;
kissMonitor = (flash_read(CONFIG_KISSMONITOR) == 1);
ax25Cfg.allowNonAprs = (flash_read(CONFIG_ALLOWNONAPRS) == 1);
return 1;
}

Wyświetl plik

@ -515,6 +515,8 @@ void term_parse(uint8_t *cmd, uint16_t len, Terminal_stream src, Uart_data_type
term_sendBuf(src);
term_sendString((uint8_t*)"monkiss [on/off] - send own and digipeated frames to KISS ports\r\n", 0);
term_sendBuf(src);
term_sendString((uint8_t*)"nonaprs [on/off] - enable reception of non-APRS frames\r\n", 0);
term_sendBuf(src);
return;
}
if(checkcmd(cmd, 7, (uint8_t*)"version"))
@ -723,6 +725,11 @@ void term_parse(uint8_t *cmd, uint16_t len, Terminal_stream src, Uart_data_type
term_sendString((uint8_t*)"On\r\n", 0);
else
term_sendString((uint8_t*)"Off\r\n", 0);
term_sendString((uint8_t*)"Allow non-APRS frames: ", 0);
if(ax25Cfg.allowNonAprs == 1)
term_sendString((uint8_t*)"On\r\n", 0);
else
term_sendString((uint8_t*)"Off\r\n", 0);
term_sendBuf(src);
return;
}
@ -1798,7 +1805,27 @@ void term_parse(uint8_t *cmd, uint16_t len, Terminal_stream src, Uart_data_type
term_sendBuf(src);
return;
}
if(checkcmd(cmd, 8, (uint8_t*)"nonaprs "))
{
uint8_t err = 0;
if(checkcmd(&cmd[8], 2, (uint8_t*)"on"))
ax25Cfg.allowNonAprs = 1;
else if(checkcmd(&cmd[8], 3, (uint8_t*)"off"))
ax25Cfg.allowNonAprs = 0;
else
err = 1;
if(err)
{
term_sendString((uint8_t*)"Incorrect command!\r\n", 0);
}
else
{
term_sendString((uint8_t*)"OK\r\n", 0);
}
term_sendBuf(src);
return;
}
term_sendString((uint8_t*)"Unknown command. For command list type \"help\"\r\n", 0);
term_sendBuf(src);