mirror of
https://github.com/lumapu/ahoy.git
synced 2025-08-06 09:58:23 +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 "hmInverter.h"
|
||||||
#include "hmRadio.h"
|
#include "hmRadio.h"
|
||||||
#include "CircularBuffer.h"
|
|
||||||
|
|
||||||
typedef CircularBuffer<packet_t, PACKET_BUFFER_SIZE> BufferType;
|
template <uint8_t MAX_INVERTER=3, class INVERTERTYPE=Inverter<float>>
|
||||||
typedef HmRadio<BufferType> RadioType;
|
|
||||||
|
|
||||||
template <uint8_t MAX_INVERTER=3, class RADIO = RadioType, class BUFFER = BufferType, class INVERTERTYPE=Inverter<float>>
|
|
||||||
class HmSystem {
|
class HmSystem {
|
||||||
public:
|
public:
|
||||||
typedef RADIO RadioType;
|
HmRadio<> Radio;
|
||||||
RadioType Radio;
|
|
||||||
typedef BUFFER BufferType;
|
|
||||||
BufferType BufCtrl;
|
|
||||||
//DevControlCmdType DevControlCmd;
|
|
||||||
|
|
||||||
HmSystem() {
|
HmSystem() {
|
||||||
mNumInv = 0;
|
mNumInv = 0;
|
||||||
|
@ -30,11 +22,11 @@ class HmSystem {
|
||||||
}
|
}
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
Radio.setup(&BufCtrl);
|
Radio.setup();
|
||||||
}
|
}
|
||||||
|
|
||||||
void setup(uint8_t ampPwr, uint8_t irqPin, uint8_t cePin, uint8_t csPin) {
|
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) {
|
void addInverters(cfgInst_t *config) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue