From 7e14a35a42665d201b85941bea9fbdeb94214483 Mon Sep 17 00:00:00 2001 From: Mario Mariete <11509521+melkati@users.noreply.github.com> Date: Fri, 2 Feb 2024 12:23:39 +0100 Subject: [PATCH 1/2] Limit tempOffset to 0-30 degrees on HTML config menu (only positive numbers) --- data/preferences.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/preferences.html b/data/preferences.html index d0d2f18c..96205728 100644 --- a/data/preferences.html +++ b/data/preferences.html @@ -86,8 +86,8 @@

CO2 Gadget Preferences

Temperature Sensor
- - + +
From 00b1b1edb62fdf7c2cc821f325a92db484401886 Mon Sep 17 00:00:00 2001 From: Mario Mariete <11509521+melkati@users.noreply.github.com> Date: Fri, 2 Feb 2024 12:25:15 +0100 Subject: [PATCH 2/2] Limit tempOffset to 0-30 degrees on embeded menu (only positive numbers). Fixes #155 --- CO2_Gadget_Menu.h | 2 +- platformio.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CO2_Gadget_Menu.h b/CO2_Gadget_Menu.h index 73316e3c..60d4c519 100644 --- a/CO2_Gadget_Menu.h +++ b/CO2_Gadget_Menu.h @@ -623,7 +623,7 @@ TOGGLE(showFahrenheit, showFahrenheitMenu, "Units: ", doNothing,noEvent, wrapSty MENU(temperatureConfigMenu, "Temp Config", doNothing, noEvent, wrapStyle ,FIELD(temp, "Temp", " deg C", 0, 9, 0, 0, doNothing, noEvent, noStyle) - ,altFIELD(decPlaces<1>::menuField,tempOffset,"Offset"," deg C",-50,50,1,0.1,doSetTempOffset,(eventMask)(enterEvent | exitEvent | updateEvent),wrapStyle) + ,altFIELD(decPlaces<1>::menuField,tempOffset,"Offset"," deg C",0,30,1,0.1,doSetTempOffset,(eventMask)(enterEvent | exitEvent | updateEvent),wrapStyle) ,SUBMENU(showFahrenheitMenu) ,EXIT("