Move packet building and sending logic out of main.cpp
This commit is contained in:
20
lib/packet_sender/PacketSender.h
Normal file
20
lib/packet_sender/PacketSender.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#ifndef PACKET_SENDER_H
|
||||
#define PACKET_SENDER_H
|
||||
|
||||
#include <RFPowerView.h>
|
||||
#include <PacketTypes.h>
|
||||
|
||||
class PacketSender {
|
||||
public:
|
||||
PacketSender(RFPowerView& powerView);
|
||||
|
||||
bool send(Packet packet);
|
||||
void setLastRollingCodes(uint8_t code1, uint8_t code2);
|
||||
private:
|
||||
RFPowerView& powerView;
|
||||
|
||||
uint8_t lastRollingCode1 = 0x3D;
|
||||
uint8_t lastRollingCode2 = 0x96;
|
||||
};
|
||||
|
||||
#endif // PACKET_SENDER_H
|
||||
Reference in New Issue
Block a user