Various fixes
This commit is contained in:
parent
ef36e43e96
commit
a4ce3fca41
7
device.h
7
device.h
|
@ -8,7 +8,8 @@
|
||||||
#define F_CPU 16000000
|
#define F_CPU 16000000
|
||||||
#define FREQUENCY_CORRECTION 0
|
#define FREQUENCY_CORRECTION 0
|
||||||
|
|
||||||
// ADC Reference settings
|
// ADC settings
|
||||||
|
#define OPEN_SQUELCH false
|
||||||
#define ADC_REFERENCE REF_3V3
|
#define ADC_REFERENCE REF_3V3
|
||||||
// OR
|
// OR
|
||||||
//#define ADC_REFERENCE REF_5V
|
//#define ADC_REFERENCE REF_5V
|
||||||
|
@ -17,9 +18,9 @@
|
||||||
#define CONFIG_AFSK_DAC_SAMPLERATE 9600
|
#define CONFIG_AFSK_DAC_SAMPLERATE 9600
|
||||||
|
|
||||||
// Serial protocol settings
|
// Serial protocol settings
|
||||||
//#define SERIAL_PROTOCOL PROTOCOL_KISS
|
#define SERIAL_PROTOCOL PROTOCOL_KISS
|
||||||
// OR
|
// OR
|
||||||
#define SERIAL_PROTOCOL PROTOCOL_SIMPLE_SERIAL
|
//#define SERIAL_PROTOCOL PROTOCOL_SIMPLE_SERIAL
|
||||||
|
|
||||||
// AX25 settings
|
// AX25 settings
|
||||||
#if SERIAL_PROTOCOL == PROTOCOL_SIMPLE_SERIAL
|
#if SERIAL_PROTOCOL == PROTOCOL_SIMPLE_SERIAL
|
||||||
|
|
|
@ -201,7 +201,9 @@ static bool hdlcParse(Hdlc *hdlc, bool bit, FIFOBuffer *fifo) {
|
||||||
// on the RX LED.
|
// on the RX LED.
|
||||||
fifo_push(fifo, HDLC_FLAG);
|
fifo_push(fifo, HDLC_FLAG);
|
||||||
hdlc->receiving = true;
|
hdlc->receiving = true;
|
||||||
|
#if OPEN_SQUELCH == false
|
||||||
LED_RX_ON();
|
LED_RX_ON();
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
// If the buffer is full, we have a problem
|
// If the buffer is full, we have a problem
|
||||||
// and abort by setting the return value to
|
// and abort by setting the return value to
|
||||||
|
|
|
@ -61,6 +61,9 @@ void ax25_poll(AX25Ctx *ctx) {
|
||||||
if (!ctx->escape && c == HDLC_FLAG) {
|
if (!ctx->escape && c == HDLC_FLAG) {
|
||||||
if (ctx->frame_len >= AX25_MIN_FRAME_LEN) {
|
if (ctx->frame_len >= AX25_MIN_FRAME_LEN) {
|
||||||
if (ctx->crc_in == AX25_CRC_CORRECT) {
|
if (ctx->crc_in == AX25_CRC_CORRECT) {
|
||||||
|
#if OPEN_SQUELCH == true
|
||||||
|
LED_RX_ON();
|
||||||
|
#endif
|
||||||
ax25_decode(ctx);
|
ax25_decode(ctx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#define AX25_CTRL_UI 0x03
|
#define AX25_CTRL_UI 0x03
|
||||||
#define AX25_PID_NOLAYER3 0xF0
|
#define AX25_PID_NOLAYER3 0xF0
|
||||||
|
|
||||||
struct AX25Ctx; // Forward declaration
|
struct AX25Ctx; // Forward declarations
|
||||||
struct AX25Msg;
|
struct AX25Msg;
|
||||||
|
|
||||||
#if SERIAL_PROTOCOL == PROTOCOL_KISS
|
#if SERIAL_PROTOCOL == PROTOCOL_KISS
|
||||||
|
|
|
@ -206,8 +206,10 @@ void ss_messageCallback(struct AX25Msg *msg) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PRINT_DATA) {
|
if (PRINT_DATA) {
|
||||||
if (PRINT_INFO) printf_P(PSTR("DATA: "));
|
if (PRINT_INFO) printf_P(PSTR("DATA: "), msg->len);
|
||||||
printf_P(PSTR("%.*s"), msg->len, msg->info);
|
for (int i = 0; i < msg->len; i++) {
|
||||||
|
putchar(msg->info[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
printf_P(PSTR("\r\n"));
|
printf_P(PSTR("\r\n"));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue