From 4db8c38845ed915657c3dc7ff87dcf09b7efcf6d Mon Sep 17 00:00:00 2001 From: Tennessee Carmel-Veilleux Date: Thu, 7 Dec 2023 00:34:24 -0500 Subject: [PATCH] Fix range of temperature-measurement sample to be reasonable (#30861) * Fix range of temperature-measurement sample to be reasonable - Prior range defaults were invalid (min was -327.68C which is impossible) - Prior default temperature was also -327.68C which broke on several ecosystems that deny bogus temperatures. - Changing default range to be -85C to 99C - Change default temp to be 24.51C This makes the sample work better out of the box. Tested on ESP32-S3 w/ Google ecosystem * Update .matter --- .../temperature-measurement.matter | 6 +++--- .../temperature-measurement.zap | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter index dc6239ff7d8caf..3c26f6e21e44f8 100644 --- a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter +++ b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter @@ -1596,9 +1596,9 @@ endpoint 1 { } server cluster TemperatureMeasurement { - ram attribute measuredValue default = 0x8000; - ram attribute minMeasuredValue default = 0x8000; - ram attribute maxMeasuredValue default = 0x8000; + ram attribute measuredValue default = 2451; + ram attribute minMeasuredValue default = -8500; + ram attribute maxMeasuredValue default = 9900; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; } diff --git a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap index 45ffa4b9d32fa6..9803e8d34ec36a 100644 --- a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap +++ b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap @@ -3135,7 +3135,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x8000", + "defaultValue": "2451", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -3151,7 +3151,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x8000", + "defaultValue": "-8500", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -3167,7 +3167,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x8000", + "defaultValue": "9900", "reportable": 1, "minInterval": 0, "maxInterval": 65344,