1
mirror of https://github.com/DarkFlippers/unleashed-firmware.git synced 2025-12-13 05:06:30 +04:00

Update DHT monitor

This commit is contained in:
MX
2022-11-04 17:51:56 +03:00
parent 18f49c2644
commit c709b0b126
3 changed files with 11 additions and 10 deletions

View File

@@ -8,6 +8,7 @@
#define DHT_POLLING_CONTROL 1 //Включение проверки частоты опроса датчика
#define DHT_POLLING_INTERVAL_DHT11 \
2000 //Интервал опроса DHT11 (0.5 Гц по даташиту). Можно поставить 1500, будет работать
//Костыль, временно 2 секунды для датчика AM2302
#define DHT_POLLING_INTERVAL_DHT22 2000 //Интервал опроса DHT22 (1 Гц по даташиту)
#define DHT_IRQ_CONTROL //Выключать прерывания во время обмена данных с датчиком
/* Структура возвращаемых датчиком данных */

View File

@@ -11,18 +11,18 @@ const GpioPin RX_14 = {.pin = LL_GPIO_PIN_7, .port = GPIOB};
//Перечень достуных портов ввода/вывода
static const GpioItem gpio_item[] = {
{2, "2", &gpio_ext_pa7},
{3, "3", &gpio_ext_pa6},
{4, "4", &gpio_ext_pa4},
{5, "5", &gpio_ext_pb3},
{6, "6", &gpio_ext_pb2},
{7, "7", &gpio_ext_pc3},
{10, "10 (SWC)", &SWC_10},
{2, "2 (A7)", &gpio_ext_pa7},
{3, "3 (A6)", &gpio_ext_pa6},
{4, "4 (A4)", &gpio_ext_pa4},
{5, "5 (B3)", &gpio_ext_pb3},
{6, "6 (B2)", &gpio_ext_pb2},
{7, "7 (C3)", &gpio_ext_pc3},
{10, " 10(SWC) ", &SWC_10},
{12, "12 (SIO)", &SIO_12},
{13, "13 (TX)", &TX_13},
{14, "14 (RX)", &RX_14},
{15, "15", &gpio_ext_pc1},
{16, "16", &gpio_ext_pc0},
{15, "15 (C1)", &gpio_ext_pc1},
{16, "16 (C0)", &gpio_ext_pc0},
{17, "17 (1W)", &ibutton_gpio}};
//Данные плагина

View File

@@ -81,7 +81,7 @@ void sensorEdit_scene(PluginData* app) {
app->item =
variable_item_list_add(variable_item_list, "Type:", 2, addSensor_sensorTypeChanged, app);
variable_item_set_current_value_index(nameItem, app->currentSensorEdit->type);
variable_item_set_current_value_index(app->item, app->currentSensorEdit->type);
variable_item_set_current_value_text(app->item, sensorsTypes[app->currentSensorEdit->type]);
//GPIO