mirror of
https://github.com/markqvist/RNode_Firmware.git
synced 2024-12-27 00:19:43 -05:00
Merge pull request #90 from jacobeva/transmit-fix
Improve checks around split packet handling in transmit()
This commit is contained in:
commit
711f9c6eac
@ -609,8 +609,14 @@ void transmit(uint16_t size) {
|
|||||||
|
|
||||||
written++;
|
written++;
|
||||||
|
|
||||||
if (written == 255) {
|
if (written == 255 && header & 0x0F) {
|
||||||
LoRa->endPacket(); add_airtime(written);
|
if (!LoRa->endPacket()) {
|
||||||
|
kiss_indicate_error(ERROR_MODEM_TIMEOUT);
|
||||||
|
kiss_indicate_error(ERROR_TXFAILED);
|
||||||
|
led_indicate_error(5);
|
||||||
|
hard_reset();
|
||||||
|
}
|
||||||
|
add_airtime(written);
|
||||||
LoRa->beginPacket();
|
LoRa->beginPacket();
|
||||||
LoRa->write(header);
|
LoRa->write(header);
|
||||||
written = 1;
|
written = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user