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 recvFromVision();
void recvFromCompass();
void updateRSSI();
void emergencyStop();
#pragma endregion
@ -144,6 +145,7 @@ void loop()
recvFromEnergy(); // Update stats from Energy
// recvFromVision(); // Update stats from Vision
recvFromCompass(); // Update stats from Compass
updateRSSI();
switch (Status)
{
case CS_ERROR:
@ -196,7 +198,7 @@ void loop()
case INSTR_WAIT: // Normal wait
{
Status = CS_WAITING; // Set waiting state
waitGoal = millis() + 1000*(instr->time); // Set wait time
waitGoal = millis() + 1000 * (instr->time); // Set wait time
}
break;
case INSTR_COLOUR:
@ -486,6 +488,11 @@ void recvFromCompass()
}
}
void updateRSSI()
{
signalStrength = WiFi.RSSI();
}
void emergencyStop()
{
DynamicJsonDocument tdoc(1024);