Add missing RSSI / Signal Strength tracking

This commit is contained in:
Aadi Desai 2021-06-15 08:59:11 +01:00
parent 8353103e1f
commit 6ca4be5e11

View file

@ -46,6 +46,7 @@ void recvFromEnergy();
void sendToVision(); void sendToVision();
void recvFromVision(); void recvFromVision();
void recvFromCompass(); void recvFromCompass();
void updateRSSI();
void emergencyStop(); void emergencyStop();
#pragma endregion #pragma endregion
@ -144,6 +145,7 @@ void loop()
recvFromEnergy(); // Update stats from Energy recvFromEnergy(); // Update stats from Energy
// recvFromVision(); // Update stats from Vision // recvFromVision(); // Update stats from Vision
recvFromCompass(); // Update stats from Compass recvFromCompass(); // Update stats from Compass
updateRSSI();
switch (Status) switch (Status)
{ {
case CS_ERROR: case CS_ERROR:
@ -486,6 +488,11 @@ void recvFromCompass()
} }
} }
void updateRSSI()
{
signalStrength = WiFi.RSSI();
}
void emergencyStop() void emergencyStop()
{ {
DynamicJsonDocument tdoc(1024); DynamicJsonDocument tdoc(1024);