Updating example layout

This commit is contained in:
Rodrigo Alfonso
2025-01-16 08:15:23 -03:00
parent 190dea598e
commit d0d43c797d

View File

@@ -407,7 +407,7 @@ void messageLoop() {
}
// Normal output
std::string altOptionName = "Packet loss check";
std::string altOptionName = "Packet check";
#ifdef LINK_WIRELESS_PROFILING_ENABLED
altOptionName = "Show profiler";
@@ -433,9 +433,15 @@ void messageLoop() {
std::string signalStr = "";
if (linkWireless->getState() == LinkWireless::State::SERVING) {
linkWireless->getSignalLevel(levels);
for (u32 i = 1; i < linkWireless->playerCount(); i++)
signalStr += "P" + std::to_string(i) + ": " +
std::to_string(levels.signalLevels[i] * 100 / 255) + "%";
u32 count = linkWireless->playerCount();
for (u32 i = 1; i < count; i++) {
u32 percentage = levels.signalLevels[i] * 100 / 255;
signalStr +=
"P" + std::to_string(i) + ":" +
(percentage == 100 ? "!!%" : std::to_string(percentage) + "%");
if (i < count - 1)
signalStr += " ";
}
}
std::string output =
@@ -443,7 +449,7 @@ void messageLoop() {
std::to_string(linkWireless->playerCount()) + " total)" +
"\n\n(press A to increment counter)\n(hold B to do it "
"continuously)\n(press RIGHT for more options)\n\n" +
altOptionName + ": " + (altView ? "ON" : "OFF") + " (UP = switch)\n" +
altOptionName + ": " + (altView ? "ON" : "OFF") + " (UP = more)\n" +
signalStr + "\n\n";
for (u32 i = 0; i < linkWireless->playerCount(); i++) {