#ifndef LORAHANDLER_H
#define LORAHANDLER_H

#include "config.hpp"
#include <RadioLib.h>

struct ReceivedLoRaPacket {
    String  text;
    int     rssi;
    float   snr;
    int     freqError;
};

class LoraHandler {
    public:
        LoraHandler();
        void setup();
        void sendPacket(const String& data);
        ReceivedLoRaPacket receivePacket();
    private:
        SX1268* radio;
        SPIClass* spi;
};

#endif /* LORAHANDLER_H */