From 7e287a607951deb87500d8c344cf7c7c03701ae1 Mon Sep 17 00:00:00 2001 From: Micke Prag Date: Fri, 20 Apr 2012 14:33:44 +0200 Subject: [PATCH] Check the current firmware version --- telldus-gui/Plugins/Controllers/tellstick.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/telldus-gui/Plugins/Controllers/tellstick.cpp b/telldus-gui/Plugins/Controllers/tellstick.cpp index 093ac3e1..f013cb69 100644 --- a/telldus-gui/Plugins/Controllers/tellstick.cpp +++ b/telldus-gui/Plugins/Controllers/tellstick.cpp @@ -43,7 +43,21 @@ void TellStick::setAvailable(bool available) { } bool TellStick::isUpgradable() const { - return true; //TODO: check version + QString fw = firmware(); + if (fw == "?") { + return false; + } + int firmware = fw.toInt(); + if (type() == 1) { + //TellStick + if (firmware <= 3) { + return false; + } + if (firmware < 6) { + return true; + } + } + return false; } void TellStick::aquireTellStick() {