From cfba2790f40a529cf015a29e31da7cbb594bc23b Mon Sep 17 00:00:00 2001 From: Yann Locatelli Date: Mon, 18 Sep 2023 17:52:10 +0200 Subject: [PATCH] :children_crossing: (LekaUpdater): Estimate version based on version Only for versions 1.0.0, 1.1.0 and 1.2.0 --- .../Sources/View/ConnectionView/RobotDiscoveryView.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Apps/LekaUpdater/Sources/View/ConnectionView/RobotDiscoveryView.swift b/Apps/LekaUpdater/Sources/View/ConnectionView/RobotDiscoveryView.swift index e08468da85..17630d9737 100644 --- a/Apps/LekaUpdater/Sources/View/ConnectionView/RobotDiscoveryView.swift +++ b/Apps/LekaUpdater/Sources/View/ConnectionView/RobotDiscoveryView.swift @@ -112,6 +112,14 @@ struct RobotDiscoveryView: View { private var osVersionText: String { guard let osVersion = discovery.osVersion else { + if discovery.name == "Leka" { + return "LekaOS-v1.0.0" + } else if discovery.name.contains("LK-") && discovery.name.contains("xx") { + return "LekaOS-v1.1.0" + } else if discovery.name.contains("LK-") { + return "LekaOS-v1.2.0" + } + return "n/a" } return "LekaOS-v\(osVersion)"