From a5e439f03b458b26c96780363401db39441568e0 Mon Sep 17 00:00:00 2001 From: openshwprojects <85486843+openshwprojects@users.noreply.github.com> Date: Mon, 6 Jan 2025 23:06:31 +0100 Subject: [PATCH] separate defines for some old drivers * test * Update obk_config.h * Update obk_config.h * Update obk_config.h * Update obk_config.h * Update obk_config.h * Update obk_config.h * tr --- src/driver/drv_main.c | 12 +++++++++++- src/obk_config.h | 7 +++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/driver/drv_main.c b/src/driver/drv_main.c index 631176cea..05d7b69b0 100644 --- a/src/driver/drv_main.c +++ b/src/driver/drv_main.c @@ -343,32 +343,42 @@ static driver_t g_drivers[] = { //drvdetail:"requires":""} { "CHT83XX", CHT83XX_Init, CHT83XX_OnEverySecond, CHT83XX_AppendInformationToHTTPIndexPage, NULL, NULL, NULL, false }, #endif -#if defined(PLATFORM_BEKEN) || defined(WINDOWS) || defined(PLATFORM_ESPIDF) +#if ENABLE_DRIVER_MCP9808 //drvdetail:{"name":"MCP9808", //drvdetail:"title":"TODO", //drvdetail:"descr":"MCP9808 is a Temperature sensor with I2C interface and an external wakeup pin, see [docs](https://www.elektroda.pl/rtvforum/topic3988466.html).", //drvdetail:"requires":""} { "MCP9808", MCP9808_Init, MCP9808_OnEverySecond, MCP9808_AppendInformationToHTTPIndexPage, NULL, NULL, NULL, false }, +#endif +#if ENABLE_DRIVER_KP18058 //drvdetail:{"name":"KP18058", //drvdetail:"title":"TODO", //drvdetail:"descr":"KP18058 I2C LED driver. Supports also KP18068. Working, see reverse-engineering [topic](https://www.elektroda.pl/rtvforum/topic3991620.html)", //drvdetail:"requires":""} { "KP18058", KP18058_Init, NULL, NULL, NULL, NULL, NULL, false }, +#endif +#if ENABLE_DRIVER_ADCSMOOTHER //drvdetail:{"name":"ADCSmoother", //drvdetail:"title":"TODO", //drvdetail:"descr":"ADCSmoother is used for 3-way stairs switches synchronized via extra wire.", //drvdetail:"requires":""} { "ADCSmoother", DRV_ADCSmoother_Init, NULL, NULL, DRV_ADCSmoother_RunFrame, NULL, NULL, false }, +#endif +#if ENABLE_DRIVER_SHT3X //drvdetail:{"name":"SHT3X", //drvdetail:"title":"TODO", //drvdetail:"descr":"Humidity/temperature sensor. See [SHT Sensor tutorial topic here](https://www.elektroda.com/rtvforum/topic3958369.html), also see [this sensor teardown](https://www.elektroda.com/rtvforum/topic3945688.html)", //drvdetail:"requires":""} { "SHT3X", SHT3X_Init, SHT3X_OnEverySecond, SHT3X_AppendInformationToHTTPIndexPage, NULL, SHT3X_StopDriver, NULL, false }, +#endif +#if ENABLE_DRIVER_SGP //drvdetail:{"name":"SGP", //drvdetail:"title":"TODO", //drvdetail:"descr":"SGP Air Quality sensor with I2C interface. See [this DIY sensor](https://www.elektroda.com/rtvforum/topic3967174.html) for setup information.", //drvdetail:"requires":""} { "SGP", SGP_Init, SGP_OnEverySecond, SGP_AppendInformationToHTTPIndexPage, NULL, SGP_StopDriver, NULL, false }, +#endif +#if ENABLE_DRIVER_SHIFTREGISTER //drvdetail:{"name":"ShiftRegister", //drvdetail:"title":"TODO", //drvdetail:"descr":"Simple Shift Register driver that allows you to map channels to shift register output. See [related topic](https://www.elektroda.com/rtvforum/viewtopic.php?p=20533505#20533505)", diff --git a/src/obk_config.h b/src/obk_config.h index a57522fc6..114986967 100644 --- a/src/obk_config.h +++ b/src/obk_config.h @@ -84,6 +84,11 @@ #define ENABLE_DRIVER_CHARTS 1 #define ENABLE_DRIVER_WIDGET 1 #define ENABLE_DRIVER_OPENWEATHERMAP 1 +#define ENABLE_DRIVER_MCP9808 1 +#define ENABLE_DRIVER_KP18058 1 +#define ENABLE_DRIVER_ADCSMOOTHER 1 +#define ENABLE_DRIVER_SGP 1 +#define ENABLE_DRIVER_SHIFTREGISTER 1 #elif PLATFORM_BL602 @@ -162,6 +167,8 @@ #define ENABLE_DRIVER_IR2 0 #define ENABLE_DRIVER_DS1820 1 #define ENABLE_DRIVER_CHT83XX 1 +#define ENABLE_DRIVER_KP18058 1 +#define ENABLE_DRIVER_ADCSMOOTHER 1 //#define ENABLE_DRIVER_OPENWEATHERMAP 1 #define OBK_OTA_EXTENSION ".rbl"