rcProtocol  V.0.3.0
A protocol for diy transmitters/receivers
rcSettings.h
Go to the documentation of this file.
1 #ifndef __RCSETTINGS_H__
2 #define __RCSETTINGS_H__
3 
4 #include <RF24.h>
5 
6 class RCSettings {
7 public:
16  RCSettings();
17 
23  void setSettings(const uint8_t* settings);
29  uint8_t* getSettings();
30 
31 
48  void setEnableDynamicPayload(bool enable);
55 
71  void setEnableAck(bool enable);
77  bool getEnableAck();
78 
99  void setEnableAckPayload(bool enable);
105  bool getEnableAckPayload();
106 
123  void setDataRate(rf24_datarate_e datarate);
129  rf24_datarate_e getDataRate();
130 
143  void setStartChannel(uint8_t channel);
149  uint8_t getStartChannel();
150 
166  void setPayloadSize(uint8_t payload);
172  uint8_t getPayloadSize();
173 
188  void setCommsFrequency(uint8_t frequency);
194  uint8_t getCommsFrequency();
195 
219  void setRetryDelay(uint8_t time);
225  uint8_t getRetryDelay();
226 
242  void setNumChannels(uint8_t numChannels);
248  uint8_t getNumChannels();
249 
253  void printSettings();
254 
255 private:
256  uint8_t _settings[32];
257 };
258 
259 #endif
rf24_datarate_e getDataRate()
Definition: rcSettings.cpp:63
void setEnableAck(bool enable)
Definition: rcSettings.cpp:37
void printSettings()
Definition: rcSettings.cpp:118
bool getEnableDynamicPayload()
Definition: rcSettings.cpp:33
void setSettings(const uint8_t *settings)
Definition: rcSettings.cpp:17
void setDataRate(rf24_datarate_e datarate)
Definition: rcSettings.cpp:57
uint8_t getStartChannel()
Definition: rcSettings.cpp:80
uint8_t getCommsFrequency()
Definition: rcSettings.cpp:96
uint8_t * getSettings()
Definition: rcSettings.cpp:23
uint8_t getRetryDelay()
Definition: rcSettings.cpp:106
void setCommsFrequency(uint8_t frequency)
Definition: rcSettings.cpp:92
void setNumChannels(uint8_t numChannels)
Definition: rcSettings.cpp:110
uint8_t getPayloadSize()
Definition: rcSettings.cpp:88
void setEnableAckPayload(bool enable)
Definition: rcSettings.cpp:47
void setPayloadSize(uint8_t payload)
Definition: rcSettings.cpp:84
void setStartChannel(uint8_t channel)
Definition: rcSettings.cpp:76
bool getEnableAck()
Definition: rcSettings.cpp:43
void setRetryDelay(uint8_t time)
Definition: rcSettings.cpp:100
bool getEnableAckPayload()
Definition: rcSettings.cpp:53
void setEnableDynamicPayload(bool enable)
Definition: rcSettings.cpp:27
uint8_t getNumChannels()
Definition: rcSettings.cpp:114