make the N2K source configurable for humidity and temperature

This commit is contained in:
andreas 2023-10-27 19:34:12 +02:00
parent 553f6c0a23
commit 682bbb5bb4
2 changed files with 113 additions and 20 deletions

View File

@ -32,8 +32,8 @@ class SHT3XConfig{
humidActive=config->getBool(GwConfigDefinitions::iicSHT3XHumid);
interval=config->getInt(GwConfigDefinitions::SHT3Xinterval);
interval*=1000;
humiditySource=N2khs_InsideHumidity;
tempSource=N2kts_InsideTemperature;
humiditySource=(tN2kHumiditySource)(config->getInt(GwConfigDefinitions::SHT3XHumSource));
tempSource=(tN2kTempSource)(config->getInt(GwConfigDefinitions::SHT3XTempSource));
}
};

View File

@ -10,6 +10,83 @@
"SHT3X":"true"
}
},
{
"name": "SHT3XTempSource",
"label": "SHT3X Temp Type",
"type": "list",
"default": "2",
"description": "the NMEA2000 source type for the temperature",
"list": [
{
"l": "SeaTemperature",
"v": "0"
},
{
"l": "OutsideTemperature",
"v": "1"
},
{
"l": "InsideTemperature",
"v": "2"
},
{
"l": "EngineRoomTemperature",
"v": "3"
},
{
"l": "MainCabinTemperature",
"v": "4"
},
{
"l": "LiveWellTemperature",
"v": "5"
},
{
"l": "BaitWellTemperature",
"v": "6"
},
{
"l": "RefridgerationTemperature",
"v": "7"
},
{
"l": "HeatingSystemTemperature",
"v": "8"
},
{
"l": "DewPointTemperature",
"v": "9"
},
{
"l": "ApparentWindChillTemperature",
"v": "10"
},
{
"l": "TheoreticalWindChillTemperature",
"v": "11"
},
{
"l": "HeatIndexTemperature",
"v": "12"
},
{
"l": "FreezerTemperature",
"v": "13"
},
{
"l": "ExhaustGasTemperature",
"v": "14"
},
{
"l": "ShaftSealTemperature",
"v": "15"
}
],
"category": "sensors",
"capabilities": {
"SHT3X":"true"
}
},
{
"name": "iicSHT3XHumid",
"label": "SHT3X Humidity",
@ -22,22 +99,16 @@
}
},
{
"name": "SHT3XTempName",
"label": "SHT3X Temp XDR",
"type": "String",
"default": "Temp",
"description": "set the XDR transducer name for the SHT3X Temperature, leave empty to disable ",
"category": "sensors",
"capabilities": {
"SHT3X":"true"
}
},
{
"name": "SHT3XHumidName",
"label": "SHT3X Humid XDR",
"type": "String",
"default": "Humidity",
"description": "set the XDR transducer name for the SHT3X Humidity, leave empty to disable ",
"name": "SHT3XHumSource",
"label": "SHT3X Humid Type",
"type": "list",
"description": "the NMEA2000 source type for the humidity",
"default": "0",
"list":[
{"l":"InsideHumidity","v":"0"},
{"l":"OutsideHumidity","v":"1"},
{"l":"Undef","v":"0xff"}
],
"category": "sensors",
"capabilities": {
"SHT3X":"true"
@ -48,10 +119,10 @@
"label": "SHT3X N2K iid",
"type": "number",
"default": 99,
"description": "the N2K instance id the SHT3X Temperature and Humidity ",
"description": "the N2K instance id for the SHT3X Temperature and Humidity ",
"category": "sensors",
"min": 0,
"max": 255,
"max": 253,
"check": "checkMinMax",
"capabilities": {
"SHT3X":"true"
@ -70,5 +141,27 @@
"capabilities": {
"SHT3X":"true"
}
},
{
"name": "SHT3XTempName",
"label": "SHT3X Temp XDR",
"type": "String",
"default": "Temp",
"description": "set the XDR transducer name for the SHT3X Temperature, leave empty to disable NMEA0183 XDR ",
"category": "sensors",
"capabilities": {
"SHT3X":"true"
}
},
{
"name": "SHT3XHumidName",
"label": "SHT3X Humid XDR",
"type": "String",
"default": "Humidity",
"description": "set the XDR transducer name for the SHT3X Humidity, leave empty to disable NMEA0183 XDR",
"category": "sensors",
"capabilities": {
"SHT3X":"true"
}
}
]