From 6f2e6fa8ff45f23b1878aed76f14a464d18eac33 Mon Sep 17 00:00:00 2001 From: Peter Eriksson Date: Thu, 31 Oct 2024 23:11:32 +0100 Subject: [PATCH 1/2] Removed unused functions --- .../quandify/cubicmeter-1.1-copper/uplink.js | 20 ------------------- .../quandify/cubicmeter-1.1-plastic/uplink.js | 20 ------------------- 2 files changed, 40 deletions(-) diff --git a/types/quandify/cubicmeter-1.1-copper/uplink.js b/types/quandify/cubicmeter-1.1-copper/uplink.js index 4d37bef2..e8b92295 100644 --- a/types/quandify/cubicmeter-1.1-copper/uplink.js +++ b/types/quandify/cubicmeter-1.1-copper/uplink.js @@ -257,26 +257,6 @@ const parseErrorCode = function (errorCode) { } }; -// Convert a hex string to decimal array -const hexToDecArray = function (hexString) { - const size = 2; - const length = Math.ceil(hexString.length / size); - const decimalList = new Array(length); - - for (let i = 0, o = 0; i < length; ++i, o += size) { - decimalList[i] = parseInt(hexString.substr(o, size), 16); - } - - return decimalList; -}; - -const base64ToDecArray = function (base64String) { - const buffer = Buffer.from(base64String, "base64"); - const bufString = buffer.toString("hex"); - - return hexToDecArray(bufString); -}; - const decArrayToStr = function (byteArray) { return Array.from(byteArray, (byte) => (`0${(byte & 0xff).toString(16)}`).slice(-2).toUpperCase()).join(""); }; diff --git a/types/quandify/cubicmeter-1.1-plastic/uplink.js b/types/quandify/cubicmeter-1.1-plastic/uplink.js index 4d37bef2..e8b92295 100644 --- a/types/quandify/cubicmeter-1.1-plastic/uplink.js +++ b/types/quandify/cubicmeter-1.1-plastic/uplink.js @@ -257,26 +257,6 @@ const parseErrorCode = function (errorCode) { } }; -// Convert a hex string to decimal array -const hexToDecArray = function (hexString) { - const size = 2; - const length = Math.ceil(hexString.length / size); - const decimalList = new Array(length); - - for (let i = 0, o = 0; i < length; ++i, o += size) { - decimalList[i] = parseInt(hexString.substr(o, size), 16); - } - - return decimalList; -}; - -const base64ToDecArray = function (base64String) { - const buffer = Buffer.from(base64String, "base64"); - const bufString = buffer.toString("hex"); - - return hexToDecArray(bufString); -}; - const decArrayToStr = function (byteArray) { return Array.from(byteArray, (byte) => (`0${(byte & 0xff).toString(16)}`).slice(-2).toUpperCase()).join(""); }; From 71ebf57707cc543e44df5912635078dc505e756c Mon Sep 17 00:00:00 2001 From: Peter Eriksson Date: Tue, 12 Nov 2024 09:49:46 +0100 Subject: [PATCH 2/2] Update product description --- types/quandify/cubicmeter-1.1-copper/meta.json | 2 +- types/quandify/cubicmeter-1.1-plastic/meta.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/types/quandify/cubicmeter-1.1-copper/meta.json b/types/quandify/cubicmeter-1.1-copper/meta.json index f735a555..b706c722 100644 --- a/types/quandify/cubicmeter-1.1-copper/meta.json +++ b/types/quandify/cubicmeter-1.1-copper/meta.json @@ -3,7 +3,7 @@ "version": "1.0.0", "manufacturer": "Quandify", "url": "https://quandify.com/cubicmeter", - "description": "The CubicMeter 1.1 is a non-invasive water flow meter with leakage detection capabilities that communicates over LoRaWAN.", + "description": "Clamp-on water flow meter and leak sensor.", "author": "Quandify AB", "firmwareVersion": "V1.0.0", "loraDeviceClass": "A", diff --git a/types/quandify/cubicmeter-1.1-plastic/meta.json b/types/quandify/cubicmeter-1.1-plastic/meta.json index 889e6e9f..924ef3a1 100644 --- a/types/quandify/cubicmeter-1.1-plastic/meta.json +++ b/types/quandify/cubicmeter-1.1-plastic/meta.json @@ -3,7 +3,7 @@ "version": "1.0.0", "manufacturer": "Quandify", "url": "https://quandify.com/cubicmeter", - "description": "The CubicMeter 1.1 is a non-invasive water flow meter with leakage detection capabilities that communicates over LoRaWAN.", + "description": "Clamp-on water flow meter and leak sensor.", "author": "Quandify AB", "firmwareVersion": "V1.0.0", "loraDeviceClass": "A",