From 1ac5f20f2a6d5ed65dfaf5e0b5e758a4d4d99443 Mon Sep 17 00:00:00 2001 From: Terrence Date: Thu, 23 Jan 2025 23:12:48 +0800 Subject: [PATCH] remove system resets --- main/boards/bread-compact-ml307/compact_ml307_board.cc | 6 +----- main/boards/bread-compact-ml307/config.h | 2 -- main/boards/bread-compact-wifi-lcd/config.h | 2 -- main/boards/bread-compact-wifi/compact_wifi_board.cc | 7 +------ main/boards/bread-compact-wifi/config.h | 2 -- 5 files changed, 2 insertions(+), 17 deletions(-) diff --git a/main/boards/bread-compact-ml307/compact_ml307_board.cc b/main/boards/bread-compact-ml307/compact_ml307_board.cc index 95abd84..7028471 100644 --- a/main/boards/bread-compact-ml307/compact_ml307_board.cc +++ b/main/boards/bread-compact-ml307/compact_ml307_board.cc @@ -23,7 +23,6 @@ private: Button touch_button_; Button volume_up_button_; Button volume_down_button_; - SystemReset system_reset_; void InitializeDisplayI2c() { i2c_master_bus_config_t bus_config = { @@ -95,10 +94,7 @@ public: boot_button_(BOOT_BUTTON_GPIO), touch_button_(TOUCH_BUTTON_GPIO), volume_up_button_(VOLUME_UP_BUTTON_GPIO), - volume_down_button_(VOLUME_DOWN_BUTTON_GPIO), - system_reset_(RESET_NVS_BUTTON_GPIO, RESET_FACTORY_BUTTON_GPIO) { - // Check if the reset button is pressed - system_reset_.CheckButtons(); + volume_down_button_(VOLUME_DOWN_BUTTON_GPIO) { InitializeDisplayI2c(); InitializeButtons(); diff --git a/main/boards/bread-compact-ml307/config.h b/main/boards/bread-compact-ml307/config.h index 78a6e81..7d4b3f0 100644 --- a/main/boards/bread-compact-ml307/config.h +++ b/main/boards/bread-compact-ml307/config.h @@ -32,8 +32,6 @@ #define TOUCH_BUTTON_GPIO GPIO_NUM_47 #define VOLUME_UP_BUTTON_GPIO GPIO_NUM_40 #define VOLUME_DOWN_BUTTON_GPIO GPIO_NUM_39 -#define RESET_NVS_BUTTON_GPIO GPIO_NUM_1 -#define RESET_FACTORY_BUTTON_GPIO GPIO_NUM_2 #define DISPLAY_SDA_PIN GPIO_NUM_41 #define DISPLAY_SCL_PIN GPIO_NUM_42 diff --git a/main/boards/bread-compact-wifi-lcd/config.h b/main/boards/bread-compact-wifi-lcd/config.h index 4bd4cc6..4591ac7 100644 --- a/main/boards/bread-compact-wifi-lcd/config.h +++ b/main/boards/bread-compact-wifi-lcd/config.h @@ -33,8 +33,6 @@ #define TOUCH_BUTTON_GPIO GPIO_NUM_NC #define VOLUME_UP_BUTTON_GPIO GPIO_NUM_NC #define VOLUME_DOWN_BUTTON_GPIO GPIO_NUM_NC -#define RESET_NVS_BUTTON_GPIO GPIO_NUM_NC -#define RESET_FACTORY_BUTTON_GPIO GPIO_NUM_NC #define DISPLAY_BACKLIGHT_PIN GPIO_NUM_42 diff --git a/main/boards/bread-compact-wifi/compact_wifi_board.cc b/main/boards/bread-compact-wifi/compact_wifi_board.cc index aea9ef8..669afe8 100644 --- a/main/boards/bread-compact-wifi/compact_wifi_board.cc +++ b/main/boards/bread-compact-wifi/compact_wifi_board.cc @@ -24,7 +24,6 @@ private: Button touch_button_; Button volume_up_button_; Button volume_down_button_; - SystemReset system_reset_; void InitializeDisplayI2c() { i2c_master_bus_config_t bus_config = { @@ -100,11 +99,7 @@ public: boot_button_(BOOT_BUTTON_GPIO), touch_button_(TOUCH_BUTTON_GPIO), volume_up_button_(VOLUME_UP_BUTTON_GPIO), - volume_down_button_(VOLUME_DOWN_BUTTON_GPIO), - system_reset_(RESET_NVS_BUTTON_GPIO, RESET_FACTORY_BUTTON_GPIO) { - // Check if the reset button is pressed - system_reset_.CheckButtons(); - + volume_down_button_(VOLUME_DOWN_BUTTON_GPIO) { InitializeDisplayI2c(); InitializeButtons(); InitializeIot(); diff --git a/main/boards/bread-compact-wifi/config.h b/main/boards/bread-compact-wifi/config.h index 8ef4c06..81ee1c0 100644 --- a/main/boards/bread-compact-wifi/config.h +++ b/main/boards/bread-compact-wifi/config.h @@ -33,8 +33,6 @@ #define TOUCH_BUTTON_GPIO GPIO_NUM_47 #define VOLUME_UP_BUTTON_GPIO GPIO_NUM_40 #define VOLUME_DOWN_BUTTON_GPIO GPIO_NUM_39 -#define RESET_NVS_BUTTON_GPIO GPIO_NUM_1 -#define RESET_FACTORY_BUTTON_GPIO GPIO_NUM_2 #define DISPLAY_SDA_PIN GPIO_NUM_41 #define DISPLAY_SCL_PIN GPIO_NUM_42