From d1cd7db449ef9c68bb7a334dbaf67442190aca84 Mon Sep 17 00:00:00 2001 From: Peter Feerick Date: Sat, 1 Jan 2022 10:29:52 +1000 Subject: [PATCH] Formatting --- radio/src/gui/colorlcd/radio_version.cpp | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/radio/src/gui/colorlcd/radio_version.cpp b/radio/src/gui/colorlcd/radio_version.cpp index 7a8d16dff..25b0a8667 100644 --- a/radio/src/gui/colorlcd/radio_version.cpp +++ b/radio/src/gui/colorlcd/radio_version.cpp @@ -24,13 +24,14 @@ #include "options.h" #include "libopenui.h" -char * getVersion(char * str, PXX2Version version) +char *getVersion(char *str, PXX2Version version) { - if (version.major == 0xFF && version.minor == 0x0F && version.revision == 0x0F) { + if (version.major == 0xFF && version.minor == 0x0F && + version.revision == 0x0F) { return strAppend(str, "---", 4); - } - else { - sprintf(str, "%u.%u.%u", (1 + version.major) % 0xFF, version.minor, version.revision); + } else { + sprintf(str, "%u.%u.%u", (1 + version.major) % 0xFF, version.minor, + version.revision); return str; } } @@ -250,16 +251,21 @@ void RadioVersionPage::build(FormWindow * window) #if defined(AFHDS2) new StaticText(window, grid.getLabelSlot(), "RF FW:"); - sprintf(reusableBuffer.moduleSetup.msg, "%d.%d.%d", (int)((NV14internalModuleFwVersion >> 16) & 0xFF), (int)((NV14internalModuleFwVersion >> 8) & 0xFF), (int)(NV14internalModuleFwVersion & 0xFF)); + sprintf(reusableBuffer.moduleSetup.msg, "%d.%d.%d", + (int)((NV14internalModuleFwVersion >> 16) & 0xFF), + (int)((NV14internalModuleFwVersion >> 8) & 0xFF), + (int)(NV14internalModuleFwVersion & 0xFF)); new StaticText(window, grid.getFieldSlot(), reusableBuffer.moduleSetup.msg); grid.nextLine(); #endif + #if defined(PXX2) // Module and receivers versions - auto moduleVersions = new TextButton(window, grid.getLineSlot(), STR_MODULES_RX_VERSION); + auto moduleVersions = + new TextButton(window, grid.getLineSlot(), STR_MODULES_RX_VERSION); moduleVersions->setPressHandler([=]() -> uint8_t { - new versionDialog(window, {50, 30, LCD_W - 100, 0}); - return 0; + new versionDialog(window, {50, 30, LCD_W - 100, 0}); + return 0; }); #endif }