| 80 | */ |
| 81 | |
| 82 | LoRaInterface::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(); |
nothing calls this directly
no outgoing calls
no test coverage detected