2021-01-01 23:23:27 +01:00
|
|
|
#ifndef LORA_H_
|
|
|
|
|
#define LORA_H_
|
|
|
|
|
|
|
|
|
|
#include <Arduino.h>
|
2021-03-12 23:21:45 +01:00
|
|
|
|
2021-01-01 23:23:27 +01:00
|
|
|
#include <APRS-Decoder.h>
|
2021-03-12 23:21:45 +01:00
|
|
|
#include <LoRa.h>
|
|
|
|
|
#include <memory>
|
2021-01-01 23:23:27 +01:00
|
|
|
|
2021-03-12 23:21:45 +01:00
|
|
|
class LoRa_APRS : public LoRaClass {
|
2021-01-01 23:23:27 +01:00
|
|
|
public:
|
2021-05-25 21:26:22 +02:00
|
|
|
LoRa_APRS();
|
|
|
|
|
|
2021-03-12 23:21:45 +01:00
|
|
|
bool checkMessage();
|
|
|
|
|
std::shared_ptr<APRSMessage> getMessage();
|
2021-01-01 23:23:27 +01:00
|
|
|
|
2021-03-12 23:21:45 +01:00
|
|
|
void sendMessage(const std::shared_ptr<APRSMessage> msg);
|
2021-01-01 23:23:27 +01:00
|
|
|
|
2021-03-12 23:21:45 +01:00
|
|
|
void setRxFrequency(long frequency);
|
|
|
|
|
long getRxFrequency() const;
|
2021-01-01 23:23:27 +01:00
|
|
|
|
2021-03-12 23:21:45 +01:00
|
|
|
void setTxFrequency(long frequency);
|
|
|
|
|
long getTxFrequency() const;
|
2021-01-01 23:23:27 +01:00
|
|
|
|
2021-08-30 21:15:47 +02:00
|
|
|
void setRxSpreadingFactor(int spreadingFactor);
|
|
|
|
|
long getRxSpreadingFactor() const;
|
|
|
|
|
|
|
|
|
|
void setRxSignalBandwidth(long signalBandwidth);
|
|
|
|
|
long getRxSignalBandwidth() const;
|
|
|
|
|
|
|
|
|
|
void setRxCodingRate4(int codingRate);
|
|
|
|
|
long getRxCodingRate4() const;
|
|
|
|
|
|
|
|
|
|
void setTxSpreadingFactor(int spreadingFactor);
|
|
|
|
|
long getTxSpreadingFactor() const;
|
|
|
|
|
|
|
|
|
|
void setTxSignalBandwidth(long signalBandwidth);
|
|
|
|
|
long getTxSignalBandwidth() const;
|
|
|
|
|
|
|
|
|
|
void setTxCodingRate4(int codingRate);
|
|
|
|
|
long getTxCodingRate4() const;
|
|
|
|
|
|
2021-01-01 23:23:27 +01:00
|
|
|
private:
|
2021-03-12 23:21:45 +01:00
|
|
|
std::shared_ptr<APRSMessage> _LastReceivedMsg;
|
2021-09-02 19:16:44 +02:00
|
|
|
long _rxFrequency;
|
|
|
|
|
int _rxSpreadingFactor;
|
|
|
|
|
long _rxSignalBandwidth;
|
|
|
|
|
int _rxCodingRate4;
|
|
|
|
|
long _txFrequency;
|
|
|
|
|
int _txSpreadingFactor;
|
|
|
|
|
long _txSignalBandwidth;
|
|
|
|
|
int _txCodingRate4;
|
2021-01-01 23:23:27 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|