From 616ec0b56d9e4a8c2a019da073a70fb19de74b91 Mon Sep 17 00:00:00 2001 From: Wolfgang Hoenig Date: Thu, 27 Jul 2023 07:51:25 +0200 Subject: [PATCH] Add proper broadcast version check to support Crazyradio 2.0 broadcasting Tested with ./example_broadcast --- src/CrazyradioThread.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/CrazyradioThread.cpp b/src/CrazyradioThread.cpp index b6b1036..dbd7212 100644 --- a/src/CrazyradioThread.cpp +++ b/src/CrazyradioThread.cpp @@ -119,7 +119,9 @@ void CrazyradioThread::run() { Crazyradio radio(dev_); const auto version = radio.version(); - bool supports_broadcasts = version.second >= 0x55; + bool supports_broadcasts = + (version.first == 0x99 && version.second >= 0x55) // Crazyradio PA with latest official firmware + || (version.first == 3 && version.second >= 2); // Crazyradio 2.0; const uint8_t enableSafelink[] = {0xFF, 0x05, 1}; const uint8_t ping[] = {0xFF};