mirror of
https://github.com/lumapu/ahoy.git
synced 2025-08-04 00:48:24 +02:00
Update hmSystem.h
This commit is contained in:
parent
6159c07559
commit
9638414ce2
1 changed files with 4 additions and 12 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue