mirror of
https://github.com/markqvist/RNode_Firmware.git
synced 2024-10-01 03:15:39 -04:00
Added querying packet buffer state as KISS command
This commit is contained in:
parent
b3b87bd7c5
commit
2b25762060
2
Config.h
2
Config.h
@ -4,7 +4,7 @@
|
||||
#define CONFIG_H
|
||||
|
||||
#define MAJ_VERS 0x01
|
||||
#define MIN_VERS 0x0B
|
||||
#define MIN_VERS 0x0C
|
||||
|
||||
#define MCU_328P 0x90
|
||||
#define MCU_1284P 0x91
|
||||
|
@ -468,6 +468,12 @@ void serialCallback(uint8_t sbyte) {
|
||||
promisc_disable();
|
||||
}
|
||||
kiss_indicate_promisc();
|
||||
} else if (command == CMD_READY) {
|
||||
if (!queueFull()) {
|
||||
kiss_indicate_ready();
|
||||
} else {
|
||||
kiss_indicate_not_ready();
|
||||
}
|
||||
} else if (command == CMD_UNLOCK_ROM) {
|
||||
if (sbyte == ROM_UNLOCK_BYTE) {
|
||||
unlock_rom();
|
||||
|
@ -207,6 +207,13 @@ void kiss_indicate_ready() {
|
||||
Serial.write(FEND);
|
||||
}
|
||||
|
||||
void kiss_indicate_not_ready() {
|
||||
Serial.write(FEND);
|
||||
Serial.write(CMD_READY);
|
||||
Serial.write(0x00);
|
||||
Serial.write(FEND);
|
||||
}
|
||||
|
||||
void kiss_indicate_promisc() {
|
||||
Serial.write(FEND);
|
||||
Serial.write(CMD_PROMISC);
|
||||
|
Loading…
Reference in New Issue
Block a user