Initial ability to send a packet from RFPowerView

This commit is contained in:
2023-12-31 10:21:23 +11:00
parent 09fd491fdc
commit 2ccbbd18dd
4 changed files with 247 additions and 14 deletions

View File

@@ -5,6 +5,7 @@
#include <RF24.h>
#include "PacketReceiver.h"
#include "PacketParser.h"
#include "BufferFiller.h"
#include "PacketTypes.h"
#define DEFAULT_RF_CHANNEL (7) //this is the channel HD shades use
@@ -21,19 +22,25 @@ public:
bool begin();
void loop();
void startListening();
void setPacketCallback(std::function<void(const Packet*)> callback);
void sendPacket(const Packet* packet);
private:
RF24 radio;
PacketReceiver packetReceiver;
PacketParser packetParser;
BufferFiller bufferFiller;
uint8_t irqPin;
uint8_t rfID[2];
std::function<void(const Packet*)> packetCallback;
uint8_t sendBuffer[32];
void startListening();
void startTransmitting();
void interruptHandler();
void processBuffer(const uint8_t *buffer);