LoRa_APRS_iGate/lib/LoRa_APRS/LoRa_APRS.h

39 wiersze
896 B
C
Czysty Zwykły widok Historia

2021-01-01 22:23:27 +00:00
#ifndef LORA_H_
#define LORA_H_
#include <Arduino.h>
2021-01-01 22:23:27 +00:00
#include <APRS-Decoder.h>
#include <BoardFinder.h>
#include <LoRa.h>
#include <memory>
2021-01-01 22:23:27 +00:00
#define LORA_RX_FREQUENCY (433775000)
#define LORA_TX_FREQUENCY (433900000)
2021-01-01 22:23:27 +00:00
#define LORA_SPREADING_FACTOR (12)
#define LORA_SIGNAL_BANDWIDTH (125E3)
#define LORA_CODING_RATE4 (5)
2021-01-01 22:23:27 +00:00
class LoRa_APRS : public LoRaClass {
2021-01-01 22:23:27 +00:00
public:
2021-05-18 22:44:37 +00:00
explicit LoRa_APRS(BoardConfig const *const boardConfig);
bool checkMessage();
std::shared_ptr<APRSMessage> getMessage();
2021-01-01 22:23:27 +00:00
void sendMessage(const std::shared_ptr<APRSMessage> msg);
2021-01-01 22:23:27 +00:00
void setRxFrequency(long frequency);
long getRxFrequency() const;
2021-01-01 22:23:27 +00:00
void setTxFrequency(long frequency);
long getTxFrequency() const;
2021-01-01 22:23:27 +00:00
private:
std::shared_ptr<APRSMessage> _LastReceivedMsg;
long _RxFrequency;
long _TxFrequency;
2021-01-01 22:23:27 +00:00
};
#endif