diff --git a/mobile/main.qml b/mobile/main.qml index a535542e4..bb9dc6a6a 100644 --- a/mobile/main.qml +++ b/mobile/main.qml @@ -439,6 +439,8 @@ ApplicationWindow { Page { id: bmsPage + visible: false + Loader { anchors.fill: parent asynchronous: true @@ -513,7 +515,7 @@ ApplicationWindow { Repeater { id: rep - model: ["Start", "RT Data", "BMS", "Profiles", "Terminal"] + model: ["Start", "RT Data", "Profiles", "Terminal"] TabButton { text: modelData @@ -562,6 +564,13 @@ ApplicationWindow { } } + TabButton { + id: bmsDataButton + visible: bmsPage.visible + text: "BMS" + width: tabBar.buttonWidth + } + TabButton { id: confMotorButton visible: confPageMotor.visible @@ -1146,6 +1155,8 @@ ApplicationWindow { function onUpdated() { confTimer.mcConfRx = true + /* BMS button is visible if BMS Type != None, or if it's not an ESC */ + bmsDataButton.visible = (mMcConf.getParamInt("bms.type") > 0) || (VescIf.getFwSupportsConfiguration() == false) } }