From f9343534f45a85d5df3babf4d1f0948ba8bc8b8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Tue, 14 Aug 2018 11:31:37 +0200 Subject: [PATCH] Add new units and bump json api version --- doc/typeutils.qdoc | 8 ++++++++ libnymea/typeutils.h | 4 +++- nymea.pri | 2 +- tests/auto/api.json | 6 ++++-- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/doc/typeutils.qdoc b/doc/typeutils.qdoc index ce521856..06cc79a1 100644 --- a/doc/typeutils.qdoc +++ b/doc/typeutils.qdoc @@ -301,6 +301,14 @@ \li Types::UnitAmpereHour \li 48 \li The value of the \l{Param} has unit \tt {[Ah]} \unicode{0x2192} ampere hour. + \row + \li Types::UnitMicroSiemensPerCentimeter + \li 49 + \li The value of the \l{Param} has unit \tt {[μS/cm]} \unicode{0x2192} microsiemens per centimeter (conductivity). + \row + \li Types::UnitDuration + \li 50 + \li The value of the \l{Param} has unit \tt {[ms]} \unicode{0x2192} milliseconds and represents a duration. \endtable \chapter UUID Types diff --git a/libnymea/typeutils.h b/libnymea/typeutils.h index 1a83b51f..d7c91dfc 100644 --- a/libnymea/typeutils.h +++ b/libnymea/typeutils.h @@ -129,7 +129,9 @@ public: UnitMilliVolt, UnitVoltAmpere, UnitVoltAmpereReactive, - UnitAmpereHour + UnitAmpereHour, + UnitMicroSiemensPerCentimeter, + UnitDuration }; Q_ENUM(Unit) diff --git a/nymea.pri b/nymea.pri index f6356cfa..718a0f9c 100644 --- a/nymea.pri +++ b/nymea.pri @@ -6,7 +6,7 @@ NYMEA_PLUGINS_PATH=/usr/lib/$$system('dpkg-architecture -q DEB_HOST_MULTIARCH')/ # define protocol versions JSON_PROTOCOL_VERSION_MAJOR=1 -JSON_PROTOCOL_VERSION_MINOR=7 +JSON_PROTOCOL_VERSION_MINOR=8 REST_API_VERSION=1 DEFINES += NYMEA_VERSION_STRING=\\\"$${NYMEA_VERSION_STRING}\\\" \ diff --git a/tests/auto/api.json b/tests/auto/api.json index be5b4be2..1563bd43 100644 --- a/tests/auto/api.json +++ b/tests/auto/api.json @@ -1,4 +1,4 @@ -1.7 +1.8 { "methods": { "Actions.ExecuteAction": { @@ -1565,7 +1565,9 @@ "UnitMilliVolt", "UnitVoltAmpere", "UnitVoltAmpereReactive", - "UnitAmpereHour" + "UnitAmpereHour", + "UnitMicroSiemensPerCentimeter", + "UnitDuration" ], "UserError": [ "UserErrorNoError",