From a66c03cafc8da9b6c50f19085b7b8f001ad0c6a2 Mon Sep 17 00:00:00 2001 From: jflyper Date: Fri, 22 Feb 2019 10:58:16 +0900 Subject: [PATCH] Display a message if band or power count is zero --- src/main/cms/cms_menu_vtx_tramp.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/cms/cms_menu_vtx_tramp.c b/src/main/cms/cms_menu_vtx_tramp.c index f49e7ba420..95cb5472b0 100644 --- a/src/main/cms/cms_menu_vtx_tramp.c +++ b/src/main/cms/cms_menu_vtx_tramp.c @@ -21,6 +21,7 @@ #include #include #include +#include #include "platform.h" @@ -47,6 +48,12 @@ char trampCmsStatusString[31] = "- -- ---- ----"; void trampCmsUpdateStatusString(void) { vtxDevice_t *vtxDevice = vtxCommonDevice(); + + if (vtxDevice->capability.bandCount == 0 || vtxDevice->capability.powerCount) { + strncpy(trampCmsStatusString, "PLEASE CONFIGURE VTXTABLE", sizeof(trampCmsStatusString)); + return; + } + trampCmsStatusString[0] = '*'; trampCmsStatusString[1] = ' '; trampCmsStatusString[2] = vtxCommonLookupBandLetter(vtxDevice, trampBand);