6 #include "CRSFHandset.h"
8 #include "devHandset.h"
10 #if defined(PLATFORM_ESP32)
11 #include "AutoDetect.h"
16 static void initialize()
18 #if defined(PLATFORM_ESP32)
19 if (GPIO_PIN_RCSIGNAL_RX
== GPIO_PIN_RCSIGNAL_TX
)
21 handset
= new AutoDetect();
25 handset
= new CRSFHandset();
31 #if defined(DEBUG_TX_FREERUN)
32 handset
->forceConnection();
34 return DURATION_IMMEDIATELY
;
39 handset
->handleInput();
40 return DURATION_IMMEDIATELY
;
45 // An event should be generated every time the TX power changes
46 CRSF::LinkStatistics
.uplink_TX_Power
= powerToCrsfPower(PowerLevelContainer::currPower());
47 return DURATION_IGNORE
;
50 device_t Handset_device
= {
51 .initialize
= initialize
,