MCPcopy Create free account
hub / github.com/attermann/microReticulum / LoRaInterface

Method LoRaInterface

examples/common/lora_interface/LoRaInterface.cpp:82–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80*/
81
82LoRaInterface::LoRaInterface(const char* name /*= "LoRaInterface"*/) : RNS::InterfaceImpl(name) {
83
84 _IN = true;
85 _OUT = true;
86 //p self.bitrate = self.r_sf * ( (4.0/self.r_cr) / (math.pow(2,self.r_sf)/(self.r_bandwidth/1000)) ) * 1000
87 // bandwidth is in kHz here (RadioLib units), formula unchanged
88 _bitrate = (double)spreading * ( (4.0/coding) / (pow(2, spreading)/bandwidth) ) * 1000.0;
89 // CBA alternate bitrate calculation from RNode
90 //_bitrate = (uint32_t)(spreading * ( (4.0/(float)coding) / ((float)(pow(2, spreading))/((float)bandwidth/1000.0)) ) * 1000.0);
91 _HW_MTU = 508;
92
93}
94
95/*virtual*/ LoRaInterface::~LoRaInterface() {
96 stop();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected