mirror of
https://github.com/lumapu/ahoy.git
synced 2025-04-30 18:56:27 +02:00
add channel 2440 to RX_CHANNELS 5 in hmRadio.h
This commit is contained in:
parent
9e5105a98b
commit
ea9ab4601a
1 changed files with 10 additions and 6 deletions
|
@ -13,12 +13,12 @@
|
||||||
#define DTU_RADIO_ID ((uint64_t)0x1234567801ULL)
|
#define DTU_RADIO_ID ((uint64_t)0x1234567801ULL)
|
||||||
#define DUMMY_RADIO_ID ((uint64_t)0xDEADBEEF01ULL)
|
#define DUMMY_RADIO_ID ((uint64_t)0xDEADBEEF01ULL)
|
||||||
|
|
||||||
|
#define RX_CHANNELS 5
|
||||||
#define RX_LOOP_CNT 400
|
#define RX_LOOP_CNT 400
|
||||||
|
|
||||||
const char* const rf24AmpPower[] = {"MIN", "LOW", "HIGH", "MAX"};
|
const char* const rf24AmpPower[] = {"MIN", "LOW", "HIGH", "MAX"};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// MACROS
|
// MACROS
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@ -48,13 +48,17 @@ template <uint8_t CE_PIN, uint8_t CS_PIN, uint8_t IRQ_PIN, class BUFFER, uint64_
|
||||||
class HmRadio {
|
class HmRadio {
|
||||||
public:
|
public:
|
||||||
HmRadio() : mNrf24(CE_PIN, CS_PIN, SPI_SPEED) {
|
HmRadio() : mNrf24(CE_PIN, CS_PIN, SPI_SPEED) {
|
||||||
|
DPRINTLN(F("hmRadio.h : HmRadio():mNrf24(CE_PIN: ") + String(CE_PIN) + F(", CS_PIN: ") + String(CS_PIN) + F(", SPI_SPEED: ") + String(SPI_SPEED) + ")");
|
||||||
mTxChLst[0] = 40;
|
mTxChLst[0] = 40;
|
||||||
//mTxChIdx = 1;
|
//mTxChIdx = 1;
|
||||||
|
|
||||||
mRxChLst[0] = 3;
|
// Depending on the program, the module can work on 2403, 2423, 2440, 2461 or 2475MHz.
|
||||||
|
// Channel List 2403, 2423, 2440, 2461, 2475MHz
|
||||||
|
mRxChLst[0] = 03;
|
||||||
mRxChLst[1] = 23;
|
mRxChLst[1] = 23;
|
||||||
mRxChLst[2] = 61;
|
mRxChLst[2] = 40;
|
||||||
mRxChLst[3] = 75;
|
mRxChLst[3] = 61;
|
||||||
|
mRxChLst[4] = 75;
|
||||||
mRxChIdx = 0;
|
mRxChIdx = 0;
|
||||||
mRxLoopCnt = RX_LOOP_CNT;
|
mRxLoopCnt = RX_LOOP_CNT;
|
||||||
|
|
||||||
|
@ -263,7 +267,7 @@ class HmRadio {
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t getRxNxtChannel(void) {
|
uint8_t getRxNxtChannel(void) {
|
||||||
if(++mRxChIdx >= 4)
|
if(++mRxChIdx >= RX_CHANNELS)
|
||||||
mRxChIdx = 0;
|
mRxChIdx = 0;
|
||||||
return mRxChLst[mRxChIdx];
|
return mRxChLst[mRxChIdx];
|
||||||
}
|
}
|
||||||
|
@ -272,7 +276,7 @@ class HmRadio {
|
||||||
uint8_t mTxChLst[1];
|
uint8_t mTxChLst[1];
|
||||||
//uint8_t mTxChIdx;
|
//uint8_t mTxChIdx;
|
||||||
|
|
||||||
uint8_t mRxChLst[4];
|
uint8_t mRxChLst[RX_CHANNELS];
|
||||||
uint8_t mRxChIdx;
|
uint8_t mRxChIdx;
|
||||||
uint16_t mRxLoopCnt;
|
uint16_t mRxLoopCnt;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue