Added channel 40 to RX channel list

This commit is contained in:
Thomas Basler 2022-06-19 12:53:33 +02:00
parent 865d00d3d0
commit 5221c80d36
2 changed files with 3 additions and 5 deletions

View File

@ -155,14 +155,14 @@ void ARDUINO_ISR_ATTR HoymilesRadio::handleIntr()
uint8_t HoymilesRadio::getRxNxtChannel() uint8_t HoymilesRadio::getRxNxtChannel()
{ {
if (++_rxChIdx >= 4) if (++_rxChIdx >= sizeof(_rxChLst))
_rxChIdx = 0; _rxChIdx = 0;
return _rxChLst[_rxChIdx]; return _rxChLst[_rxChIdx];
} }
uint8_t HoymilesRadio::getTxNxtChannel() uint8_t HoymilesRadio::getTxNxtChannel()
{ {
if (++_txChIdx >= 1) if (++_txChIdx >= sizeof(_txChLst))
_txChIdx = 0; _txChIdx = 0;
return _txChLst[_txChIdx]; return _txChLst[_txChIdx];
} }

View File

@ -11,8 +11,6 @@
// number of fragments hold in buffer // number of fragments hold in buffer
#define FRAGMENT_BUFFER_SIZE 30 #define FRAGMENT_BUFFER_SIZE 30
class HoymilesRadio { class HoymilesRadio {
public: public:
void init(); void init();
@ -42,7 +40,7 @@ private:
void u32CpyLittleEndian(uint8_t dest[], uint32_t src); void u32CpyLittleEndian(uint8_t dest[], uint32_t src);
std::unique_ptr<RF24> _radio; std::unique_ptr<RF24> _radio;
uint8_t _rxChLst[4] = { 3, 23, 61, 75 }; uint8_t _rxChLst[5] = { 3, 23, 40, 61, 75 };
uint8_t _rxChIdx; uint8_t _rxChIdx;
uint8_t _txChLst[1] = { 40 }; uint8_t _txChLst[1] = { 40 };