this is the working code for the xdot to read in serial from the pi and send it over LoRa

Revision:
14:f0c24ce93427
Parent:
11:be2a6466d680
Child:
16:4a382fe8f51b
--- a/ChannelPlan.h	Thu Jul 27 11:08:40 2017 -0500
+++ b/ChannelPlan.h	Thu Aug 23 14:21:20 2018 -0500
@@ -74,6 +74,11 @@
              * ChannelPlan destructor
              */
             virtual ~ChannelPlan();
+            
+            /**
+             * Checks that at least one channel exist for the data rate
+             */
+            virtual uint8_t ValidateAdrDatarate(uint8_t status);
 
             /**
              * Initialize channels, datarates and duty cycle bands according to current channel plan in settings
@@ -312,6 +317,16 @@
             virtual uint8_t HandleNewChannel(const uint8_t* payload, uint8_t index, uint8_t size, uint8_t& status) = 0;
 
             /**
+             * Callback to for downlink channel request ServerCommand
+             * @param payload packet data
+             * @param index of start of command buffer
+             * @param size number of bytes in command buffer
+             * @param[out] status to be returned in MoteCommand answer
+             * @return LORA_OK
+             */
+            virtual uint8_t HandleDownlinkChannelReq(const uint8_t* payload, uint8_t index, uint8_t size, uint8_t& status);
+
+            /**
              * Callback to for ping slot channel request ServerCommand
              * @param payload packet data
              * @param index of start of command buffer
@@ -441,7 +456,7 @@
             /**
              * Update duty cycle with current settings
              */
-            virtual void UpdateDutyCycle(uint8_t bytes);
+            void UpdateDutyCycle(uint8_t bytes);
 
             /**
              * Update duty cycle with at given frequency and time on air
@@ -536,7 +551,12 @@
             virtual void DefaultLBT();
 
             virtual bool ListenBeforeTalk();
-
+        
+            /**
+             * use to clear downlink channels on join
+             */
+            virtual void ClearChannels();
+    
         protected:
 
             SxRadio* GetRadio();                //!< Get pointer to the SxRadio object or assert if it is null