diff options
| author | Tomasz Sterna <tomek@xiaoka.com> | 2015-01-19 01:32:47 +0100 |
|---|---|---|
| committer | Tomasz Sterna <tomek@xiaoka.com> | 2015-01-19 01:32:47 +0100 |
| commit | 56955287bf7ac92e044c3172de925cb80fa1e5eb (patch) | |
| tree | 16a292fc3a4a87df2ea1e8369285b74fcbd37bd1 /daemon/watchconnector.cpp | |
| parent | f3f8309c1c01f555f47721e0be345dc8f11c8b99 (diff) | |
Added HardwareRevision enum and mapping to firmware version
Diffstat (limited to 'daemon/watchconnector.cpp')
| -rw-r--r-- | daemon/watchconnector.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/daemon/watchconnector.cpp b/daemon/watchconnector.cpp index ef032f7..ca45e4e 100644 --- a/daemon/watchconnector.cpp +++ b/daemon/watchconnector.cpp @@ -13,6 +13,16 @@ WatchConnector::WatchConnector(QObject *parent) : reconnectTimer.setSingleShot(true); connect(&reconnectTimer, SIGNAL(timeout()), SLOT(reconnect())); + firmwareMapping.insert(UNKNOWN, "unknown"); + firmwareMapping.insert(PEBBLE_ONE_EV1, "ev1"); + firmwareMapping.insert(PEBBLE_ONE_EV2, "ev2"); + firmwareMapping.insert(PEBBLE_ONE_EV2_3, "ev2_3"); + firmwareMapping.insert(PEBBLE_ONE_EV2_4, "ev2_4"); + firmwareMapping.insert(PEBBLE_ONE_POINT_FIVE, "v1_5"); + firmwareMapping.insert(PEBBLE_TWO_POINT_ZERO, "v2_0"); + firmwareMapping.insert(PEBBLE_ONE_BIGBOARD_2, "bb2"); + firmwareMapping.insert(PEBBLE_ONE_BIGBOARD, "bigboard"); + setEndpointHandler(watchVERSION, [this](const QByteArray &data) { Unpacker u(data); @@ -47,7 +57,8 @@ WatchConnector::WatchConnector(QObject *parent) : qCDebug(l) << "recovery version information" << safe_version << safe_version_string << safe_commit << safe_is_recovery << safe_hw_platform << safe_metadata_version; - qCDebug(l) << "hardware information" << bootLoaderTimestamp << hardwareRevision; + qCDebug(l) << "hardware information" << bootLoaderTimestamp << hardwareRevision + << firmwareMapping.value(HardwareRevision(hw_platform)); qCDebug(l) << "serial number" << serialNumber.left(3) << "..."; qCDebug(l) << "bt address" << address.toHex(); |
