Adding SHT3X Driver (#607)

Co-authored-by: openshwprojects <85486843+openshwprojects@users.noreply.github.com>
This commit is contained in:
Dheenhasty
2023-01-15 20:06:06 +01:00
committed by GitHub
parent 5428f29393
commit d42c1652d6
8 changed files with 258 additions and 6 deletions

View File

@ -2678,7 +2678,7 @@ int http_fn_cfg_pins(http_request_t* request) {
poststr(request, "</select>");
// Primary linked channel
// Some roles do not need any channels
if (si != IOR_CHT8305_CLK && si != IOR_Button_ToggleAll && si != IOR_Button_ToggleAll_n
if (si != IOR_SHT3X_CLK && si != IOR_CHT8305_CLK && si != IOR_Button_ToggleAll && si != IOR_Button_ToggleAll_n
&& si != IOR_BL0937_CF && si != IOR_BL0937_CF1 && si != IOR_BL0937_SEL
&& si != IOR_LED_WIFI && si != IOR_LED_WIFI_n && si != IOR_LED_WIFI_n
&& !(si >= IOR_IRRecv && si <= IOR_DHT11)
@ -2688,7 +2688,7 @@ int http_fn_cfg_pins(http_request_t* request) {
}
// Secondary linked channel
// For button, is relay index to toggle on double click
if (si == IOR_Button || si == IOR_Button_n || IS_PIN_DHT_ROLE(si) || si == IOR_CHT8305_DAT)
if (si == IOR_Button || si == IOR_Button_n || IS_PIN_DHT_ROLE(si) || si == IOR_CHT8305_DAT || si == IOR_SHT3X_DAT )
{
hprintf255(request, "<input class=\"hele\" name=\"e%i\" type=\"text\" value=\"%i\"/>", i, ch2);
}

View File

@ -418,6 +418,8 @@ const char* htmlPinRoleNames[] = {
"DHT22",
"CHT8305_SDA",
"CHT8305_SCK",
"SHT3X_SDA",
"SHT3X_SCK",
"error",
"error",
"error",