Clean up the RSSI code to work with negative values correctly.

This commit is contained in:
Jonathan Naylor
2023-08-05 16:51:55 +01:00
parent fdc917518b
commit 376ff71fea
13 changed files with 228 additions and 249 deletions

View File

@@ -93,12 +93,12 @@ private:
unsigned char* m_lastFrame;
bool m_lastFrameValid;
CRSSIInterpolator* m_rssiMapper;
unsigned char m_rssi;
unsigned char m_maxRSSI;
unsigned char m_minRSSI;
unsigned int m_aveRSSI;
int m_rssi;
int m_maxRSSI;
int m_minRSSI;
int m_aveRSSI;
unsigned int m_rssiCountTotal;
unsigned int m_rssiAccum;
int m_rssiAccum;
unsigned int m_rssiCount;
unsigned int m_bitErrsAccum;
unsigned int m_bitsCount;
@@ -145,7 +145,7 @@ private:
void writeJSONRF(const char* action, const unsigned char* my1, const unsigned char* my2, const unsigned char* your);
void writeJSONRF(const char* action, float duration, float ber);
void writeJSONRF(const char* action, float duration, float ber, unsigned char minRSSI, unsigned char maxRSSI, unsigned int aveRSSI);
void writeJSONRF(const char* action, float duration, float ber, int minRSSI, int maxRSSI, int aveRSSI);
void writeJSONNet(const char* action, const unsigned char* my1, const unsigned char* my2, const unsigned char* your, const unsigned char* reflector = NULL);
void writeJSONNet(const char* action, float duration, float loss);