123

Revision:
30:da4ea47f552a
Parent:
29:b72ac28d59e9
Child:
33:4b9fd8969428
--- a/sx127x.cpp	Thu Apr 20 11:14:00 2017 -0700
+++ b/sx127x.cpp	Fri Apr 21 14:54:24 2017 -0700
@@ -213,7 +213,8 @@
     RegOpMode.bits.Mode = mode;
     
     // callback to control antenna switch and PaSelect (PABOOST/RFO) for TX
-    rf_switch.call();
+    if (rf_switch)
+        rf_switch.call();
     
     write_reg(REG_OPMODE, RegOpMode.octet);
 }