beegee3
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
12 deletions
-
src/hm/hmSystem.h
|
|
@ -8,19 +8,11 @@ |
|
|
|
|
|
|
|
#include "hmInverter.h" |
|
|
|
#include "hmRadio.h" |
|
|
|
#include "CircularBuffer.h" |
|
|
|
|
|
|
|
typedef CircularBuffer<packet_t, PACKET_BUFFER_SIZE> BufferType; |
|
|
|
typedef HmRadio<BufferType> RadioType; |
|
|
|
|
|
|
|
template <uint8_t MAX_INVERTER=3, class RADIO = RadioType, class BUFFER = BufferType, class INVERTERTYPE=Inverter<float>> |
|
|
|
template <uint8_t MAX_INVERTER=3, class INVERTERTYPE=Inverter<float>> |
|
|
|
class HmSystem { |
|
|
|
public: |
|
|
|
typedef RADIO RadioType; |
|
|
|
RadioType Radio; |
|
|
|
typedef BUFFER BufferType; |
|
|
|
BufferType BufCtrl; |
|
|
|
//DevControlCmdType DevControlCmd;
|
|
|
|
HmRadio<> Radio; |
|
|
|
|
|
|
|
HmSystem() { |
|
|
|
mNumInv = 0; |
|
|
@ -30,11 +22,11 @@ class HmSystem { |
|
|
|
} |
|
|
|
|
|
|
|
void setup() { |
|
|
|
Radio.setup(&BufCtrl); |
|
|
|
Radio.setup(); |
|
|
|
} |
|
|
|
|
|
|
|
void setup(uint8_t ampPwr, uint8_t irqPin, uint8_t cePin, uint8_t csPin) { |
|
|
|
Radio.setup(&BufCtrl, ampPwr, irqPin, cePin, csPin); |
|
|
|
Radio.setup(ampPwr, irqPin, cePin, csPin); |
|
|
|
} |
|
|
|
|
|
|
|
void addInverters(cfgInst_t *config) { |
|
|
|