Update rig to serial queue logic

platformio
sh123 2022-12-11 10:57:08 +02:00
rodzic 65c3eb7481
commit 7046309fa6
1 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -49,16 +49,16 @@ void Processor::sendRigToSerial(Cmd cmd, const byte *packet, int packetLength) {
}
void Processor::queueRigToSerial(Cmd cmd, const byte *packet, int packetLength) {
if (!rigToSerialQueueIndex_.unshift(packetLength)) {
LOG_WARN("Rig to serial queue is full!");
return;
}
for (int i = 0; i < packetLength; i++) {
if (!rigToSerialQueue_.unshift(packet[i])) {
LOG_WARN("Rig to serial queue is full!");
return;
}
}
if (!rigToSerialQueueIndex_.unshift(packetLength)) {
LOG_WARN("Rig to serial index queue is full!");
return;
}
}
void Processor::queueSerialToRig(Cmd cmd, const byte *packet, int packetLength) {