From 8bee022b0ff7659cb5b0bd35febae09826d8d298 Mon Sep 17 00:00:00 2001 From: Philipp Andreas Date: Sat, 10 Oct 2015 20:01:37 +0200 Subject: Added support for pebble-time appstore fixes #79 --- daemon/watchconnector.cpp | 13 +++++++++++++ daemon/watchconnector.h | 1 + 2 files changed, 14 insertions(+) (limited to 'daemon') diff --git a/daemon/watchconnector.cpp b/daemon/watchconnector.cpp index 2890712..5961913 100644 --- a/daemon/watchconnector.cpp +++ b/daemon/watchconnector.cpp @@ -53,6 +53,7 @@ QVariantMap WatchConnector::WatchVersions::toMap() const map.insert("bootloader", this->bootLoaderBuild.toTime_t()); map.insert("serial", this->serialNumber); map.insert("address", this->address.toHex()); + map.insert("platform", this->hardwarePlatform); map.insertMulti("firmware", this->main.toMap()); map.insertMulti("firmware", this->safe.toMap()); } @@ -126,6 +127,18 @@ WatchConnector::WatchConnector(QObject *parent) : platform = hardwareMapping.value(_versions.safe.hw_revision).first; + switch (this->platform) { + case APLITE: + _versions.hardwarePlatform = "aplite"; + break; + case BASALT: + _versions.hardwarePlatform = "basalt"; + break; + case CHALK: + _versions.hardwarePlatform = "chalk"; + break; + } + if (u.bad()) { qCWarning(l) << "short read while reading firmware version"; } else { diff --git a/daemon/watchconnector.h b/daemon/watchconnector.h index 27555a3..83e065c 100644 --- a/daemon/watchconnector.h +++ b/daemon/watchconnector.h @@ -197,6 +197,7 @@ public: SoftwareVersion safe; QDateTime bootLoaderBuild; QString hardwareRevision; + QString hardwarePlatform; QString serialNumber; QByteArray address; -- cgit v1.2.3