Added KISS flow control

This commit is contained in:
Mark Qvist 2018-04-26 10:34:39 +02:00
parent 8a35afbebe
commit 978800aaf9
4 changed files with 24 additions and 0 deletions

View file

@ -146,6 +146,13 @@ void kiss_indicate_random(uint8_t byte) {
Serial.write(FEND);
}
void kiss_indicate_ready() {
Serial.write(FEND);
Serial.write(CMD_READY);
Serial.write(0x01);
Serial.write(FEND);
}
bool isSplitPacket(uint8_t header) {
return (header & FLAG_SPLIT);
}
@ -165,6 +172,10 @@ void setSpreadingFactor() {
if (radio_online) LoRa.setSpreadingFactor(lora_sf);
}
void setCodingRate() {
if (radio_online) LoRa.setCodingRate4(lora_cr);
}
void setTXPower() {
if (radio_online) LoRa.setTxPower(lora_txp);
}