diff --git a/crossbow/radio_node.cpp b/crossbow/radio_node.cpp index 39fa248..0e7110e 100644 --- a/crossbow/radio_node.cpp +++ b/crossbow/radio_node.cpp @@ -50,15 +50,15 @@ uint32_t RadioNode::getChannelEntryMillis(void) { return _channelEntryMillis; } -static uint32_t RadioNode::getFrequencyForChannel(uint8_t channel) { +uint32_t RadioNode::getFrequencyForChannel(uint8_t channel) { return RADIO_FREQUENCY_MIN + (RADIO_CHANNEL_WIDTH * channel); } -static uint8_t RadioNode::getNextChannel(uint8_t channel) { +uint8_t RadioNode::getNextChannel(uint8_t channel) { return (channel + RADIO_HOP_OFFSET) % RADIO_CHANNEL_COUNT; } -static uint8_t RadioNode::getPrevChannel(uint8_t channel) { +uint8_t RadioNode::getPrevChannel(uint8_t channel) { return (RADIO_CHANNEL_COUNT + channel - RADIO_HOP_OFFSET) % RADIO_CHANNEL_COUNT; } diff --git a/crossbow/radio_node.h b/crossbow/radio_node.h index 736c862..43b1dd6 100644 --- a/crossbow/radio_node.h +++ b/crossbow/radio_node.h @@ -21,9 +21,9 @@ class RadioNode { void init(uint8_t ss, uint8_t rst, uint8_t di0, void(*callback)(int)); void readRssi(void); void readSnr(void); - static uint32_t getFrequencyForChannel(uint8_t channel); - static uint8_t getNextChannel(uint8_t channel); - static uint8_t getPrevChannel(uint8_t channel); + uint32_t getFrequencyForChannel(uint8_t channel); + uint8_t getNextChannel(uint8_t channel); + uint8_t getPrevChannel(uint8_t channel); void hopFrequency(bool forward, uint8_t fromChannel, uint32_t timestamp); void readAndDecode( QspConfiguration_t *qsp,