added button handler sending test data
This commit is contained in:
parent
1144868fd7
commit
8572711a55
|
|
@ -1 +1 @@
|
|||
Subproject commit b4d49920c0640d4a18e7ad104008fff4278d06a4
|
||||
Subproject commit 8b43166c18898d1adda454e956117e9167fefd58
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 0a21101817f0320cfc2d43c635ef555b72f45e38
|
||||
Subproject commit 897ee0fec2874d4b11dcd736ce9387ef33e3154c
|
||||
13
main/main.c
13
main/main.c
|
|
@ -3,6 +3,7 @@
|
|||
#include <unistd.h>
|
||||
#include "webguiapp.h"
|
||||
#include "AppConfiguration.h"
|
||||
#include "driver/gpio.h"
|
||||
|
||||
void UserMQTTEventHndlr(int idx, void *handler_args, esp_event_base_t base, int32_t event_id, void *event_data);
|
||||
void SaveUserConf();
|
||||
|
|
@ -25,8 +26,18 @@ void app_main(void)
|
|||
|
||||
LEDStripInit(CONFIG_LED_STRIP_GPIO);
|
||||
|
||||
static bool BtnPressed = false;
|
||||
while (true)
|
||||
{
|
||||
vTaskDelay(pdMS_TO_TICKS(300));
|
||||
vTaskDelay(pdMS_TO_TICKS(100));
|
||||
if(gpio_get_level(GPIO_NUM_41) == 0 && !BtnPressed)
|
||||
{
|
||||
PublicTestMQTT(MQTT1);
|
||||
PublicTestMQTT(MQTT2);
|
||||
BtnPressed = true;
|
||||
}
|
||||
if(gpio_get_level(GPIO_NUM_41) == 1 && BtnPressed)
|
||||
BtnPressed = false;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
19
sdkconfig
19
sdkconfig
|
|
@ -448,13 +448,13 @@ CONFIG_ESPTOOLPY_FLASHFREQ_80M_DEFAULT=y
|
|||
CONFIG_ESPTOOLPY_FLASHFREQ="80m"
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_32MB is not set
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_64MB is not set
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_128MB is not set
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE="4MB"
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE="8MB"
|
||||
# CONFIG_ESPTOOLPY_HEADER_FLASHSIZE_UPDATE is not set
|
||||
CONFIG_ESPTOOLPY_BEFORE_RESET=y
|
||||
# CONFIG_ESPTOOLPY_BEFORE_NORESET is not set
|
||||
|
|
@ -472,8 +472,8 @@ CONFIG_ESPTOOLPY_MONITOR_BAUD=115200
|
|||
# CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE is not set
|
||||
# CONFIG_PARTITION_TABLE_TWO_OTA is not set
|
||||
CONFIG_PARTITION_TABLE_CUSTOM=y
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_user_1ota_4M.csv"
|
||||
CONFIG_PARTITION_TABLE_FILENAME="partitions_user_1ota_4M.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_user_2ota_8M.csv"
|
||||
CONFIG_PARTITION_TABLE_FILENAME="partitions_user_2ota_8M.csv"
|
||||
CONFIG_PARTITION_TABLE_OFFSET=0x8000
|
||||
CONFIG_PARTITION_TABLE_MD5=y
|
||||
# end of Partition Table
|
||||
|
|
@ -488,7 +488,7 @@ CONFIG_GPIO_RANGE_MAX=48
|
|||
# LED strip settings
|
||||
#
|
||||
CONFIG_LED_STRIP_NUMBER=1
|
||||
CONFIG_LED_STRIP_GPIO=33
|
||||
CONFIG_LED_STRIP_GPIO=35
|
||||
# end of LED strip settings
|
||||
# end of LED app settings
|
||||
|
||||
|
|
@ -1977,6 +1977,13 @@ CONFIG_WEBGUIAPP_MQTT_PASSWORD="password"
|
|||
CONFIG_WEBGUIAPP_MQTT_DEBUG_LEVEL=1
|
||||
# end of MQTT settings
|
||||
|
||||
#
|
||||
# System log
|
||||
#
|
||||
CONFIG_WEBGUIAPP_SYSLOG_MAX_CHUNKS=4
|
||||
CONFIG_WEBGUIAPP_SYSLOG_CHUNK_SIZE=50
|
||||
# end of System log
|
||||
|
||||
#
|
||||
# DNS settings
|
||||
#
|
||||
|
|
|
|||
|
|
@ -472,8 +472,8 @@ CONFIG_ESPTOOLPY_MONITOR_BAUD=115200
|
|||
# CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE is not set
|
||||
# CONFIG_PARTITION_TABLE_TWO_OTA is not set
|
||||
CONFIG_PARTITION_TABLE_CUSTOM=y
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_user_1ota_4M.csv"
|
||||
CONFIG_PARTITION_TABLE_FILENAME="partitions_user_1ota_4M.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_user_2ota_8M.csv"
|
||||
CONFIG_PARTITION_TABLE_FILENAME="partitions_user_2ota_8M.csv"
|
||||
CONFIG_PARTITION_TABLE_OFFSET=0x8000
|
||||
CONFIG_PARTITION_TABLE_MD5=y
|
||||
# end of Partition Table
|
||||
|
|
@ -488,7 +488,7 @@ CONFIG_GPIO_RANGE_MAX=48
|
|||
# LED strip settings
|
||||
#
|
||||
CONFIG_LED_STRIP_NUMBER=1
|
||||
CONFIG_LED_STRIP_GPIO=31
|
||||
CONFIG_LED_STRIP_GPIO=35
|
||||
# end of LED strip settings
|
||||
# end of LED app settings
|
||||
|
||||
|
|
@ -1977,6 +1977,13 @@ CONFIG_WEBGUIAPP_MQTT_PASSWORD="password"
|
|||
CONFIG_WEBGUIAPP_MQTT_DEBUG_LEVEL=1
|
||||
# end of MQTT settings
|
||||
|
||||
#
|
||||
# System log
|
||||
#
|
||||
CONFIG_WEBGUIAPP_SYSLOG_MAX_CHUNKS=4
|
||||
CONFIG_WEBGUIAPP_SYSLOG_CHUNK_SIZE=50
|
||||
# end of System log
|
||||
|
||||
#
|
||||
# DNS settings
|
||||
#
|
||||
|
|
@ -1999,16 +2006,6 @@ CONFIG_ESPFS_USE_HEATSHRINK=y
|
|||
# end of libespfs
|
||||
# end of WebGUIApp
|
||||
|
||||
#
|
||||
# esp-modem
|
||||
#
|
||||
CONFIG_ESP_MODEM_CMUX_DEFRAGMENT_PAYLOAD=y
|
||||
# CONFIG_ESP_MODEM_USE_INFLATABLE_BUFFER_IF_NEEDED is not set
|
||||
CONFIG_ESP_MODEM_CMUX_DELAY_AFTER_DLCI_SETUP=0
|
||||
# CONFIG_ESP_MODEM_CMUX_USE_SHORT_PAYLOADS_ONLY is not set
|
||||
# CONFIG_ESP_MODEM_ADD_CUSTOM_MODULE is not set
|
||||
# end of esp-modem
|
||||
|
||||
#
|
||||
# The Things Network
|
||||
#
|
||||
|
|
@ -2032,6 +2029,16 @@ CONFIG_TTN_BG_TASK_PRIO=10
|
|||
CONFIG_TTN_PROVISION_UART_NONE=y
|
||||
CONFIG_TTN_PROVISION_UART_NUM=0
|
||||
# end of The Things Network
|
||||
|
||||
#
|
||||
# esp-modem
|
||||
#
|
||||
CONFIG_ESP_MODEM_CMUX_DEFRAGMENT_PAYLOAD=y
|
||||
# CONFIG_ESP_MODEM_USE_INFLATABLE_BUFFER_IF_NEEDED is not set
|
||||
CONFIG_ESP_MODEM_CMUX_DELAY_AFTER_DLCI_SETUP=0
|
||||
# CONFIG_ESP_MODEM_CMUX_USE_SHORT_PAYLOADS_ONLY is not set
|
||||
# CONFIG_ESP_MODEM_ADD_CUSTOM_MODULE is not set
|
||||
# end of esp-modem
|
||||
# end of Component config
|
||||
|
||||
# CONFIG_IDF_EXPERIMENTAL_FEATURES is not set
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user