Просмотр исходного кода

* companion: temp fix: logRxRaw() is blowing the MAX_FRAME_SIZE

Scott Powell 1 год назад
Родитель
Сommit
ba93867037
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      examples/companion_radio/main.cpp

+ 1 - 1
examples/companion_radio/main.cpp

@@ -484,7 +484,7 @@ protected:
   }
 
   void logRxRaw(float snr, float rssi, const uint8_t raw[], int len) override {
-    if (_serial->isConnected()) {
+    if (_serial->isConnected() && len+3 <= MAX_FRAME_SIZE) {
       int i = 0;
       out_frame[i++] = PUSH_CODE_LOG_RX_DATA;
       out_frame[i++] = (int8_t)(snr * 4);