Skip to content

Commit

Permalink
Handle unknown RSSI
Browse files Browse the repository at this point in the history
  • Loading branch information
JelleBakker authored Nov 28, 2024
1 parent a91975f commit 5a25610
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion x-IMU3-GUI/Source/Widgets/ConnectionsTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ juce::Component* ConnectionsTable::refreshComponentForCell(int rowNumber, int co
existingComponentToUpdate = new RssiIcon(0.65f);
}

if (const auto percentage = rows[(size_t) rowNumber].rssiPercentage)
if (const auto percentage = rows[(size_t) rowNumber].rssiPercentage; percentage.has_value() && (percentage != -1))
{
static_cast<RssiIcon*>(existingComponentToUpdate)->update(*percentage);
}
Expand Down

0 comments on commit 5a25610

Please sign in to comment.