From 1913d65b103184266d9e9954a90bfa58a391cb7a Mon Sep 17 00:00:00 2001 From: Neil Horne Date: Mon, 13 Feb 2023 21:42:47 +1100 Subject: [PATCH] fix(cpn): Update firmware mapping of firmware id to repo (#3160) * fix(cpn): Update firmware mapping of firmware id to repo bin file * typo --- companion/src/updates/updateinterface.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/companion/src/updates/updateinterface.cpp b/companion/src/updates/updateinterface.cpp index 1c1bc9f0e..1f8664e17 100644 --- a/companion/src/updates/updateinterface.cpp +++ b/companion/src/updates/updateinterface.cpp @@ -406,7 +406,17 @@ void UpdateInterface::setFlavourLanguage() if (currVariant.size() > 1) { params->fwFlavour = currVariant.at(1); - params->fwFlavour = params->fwFlavour.replace('+', 'p'); + // Companion registered firmware identities (refer opentxinterface.cpp) do not always match the EdgeTX repo fw.json file + const QMap map = { + { "x7access", "x7-access" }, + { "x9d+", "x9dp" }, + { "x9d+2019", "x9dp2019" }, + { "x9ehall", "x9e-hall" }, + { "x10express", "x10-access" } + }; + QString repofw = map[params->fwFlavour]; + if (!repofw.isEmpty()) + params->fwFlavour = repofw; } params->language = "";