remove system resets

This commit is contained in:
Terrence
2025-01-23 23:12:48 +08:00
parent eefee4f834
commit 1ac5f20f2a
5 changed files with 2 additions and 17 deletions

View File

@@ -23,7 +23,6 @@ private:
Button touch_button_; Button touch_button_;
Button volume_up_button_; Button volume_up_button_;
Button volume_down_button_; Button volume_down_button_;
SystemReset system_reset_;
void InitializeDisplayI2c() { void InitializeDisplayI2c() {
i2c_master_bus_config_t bus_config = { i2c_master_bus_config_t bus_config = {
@@ -95,10 +94,7 @@ public:
boot_button_(BOOT_BUTTON_GPIO), boot_button_(BOOT_BUTTON_GPIO),
touch_button_(TOUCH_BUTTON_GPIO), touch_button_(TOUCH_BUTTON_GPIO),
volume_up_button_(VOLUME_UP_BUTTON_GPIO), volume_up_button_(VOLUME_UP_BUTTON_GPIO),
volume_down_button_(VOLUME_DOWN_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();
InitializeDisplayI2c(); InitializeDisplayI2c();
InitializeButtons(); InitializeButtons();

View File

@@ -32,8 +32,6 @@
#define TOUCH_BUTTON_GPIO GPIO_NUM_47 #define TOUCH_BUTTON_GPIO GPIO_NUM_47
#define VOLUME_UP_BUTTON_GPIO GPIO_NUM_40 #define VOLUME_UP_BUTTON_GPIO GPIO_NUM_40
#define VOLUME_DOWN_BUTTON_GPIO GPIO_NUM_39 #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_SDA_PIN GPIO_NUM_41
#define DISPLAY_SCL_PIN GPIO_NUM_42 #define DISPLAY_SCL_PIN GPIO_NUM_42

View File

@@ -33,8 +33,6 @@
#define TOUCH_BUTTON_GPIO GPIO_NUM_NC #define TOUCH_BUTTON_GPIO GPIO_NUM_NC
#define VOLUME_UP_BUTTON_GPIO GPIO_NUM_NC #define VOLUME_UP_BUTTON_GPIO GPIO_NUM_NC
#define VOLUME_DOWN_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 #define DISPLAY_BACKLIGHT_PIN GPIO_NUM_42

View File

@@ -24,7 +24,6 @@ private:
Button touch_button_; Button touch_button_;
Button volume_up_button_; Button volume_up_button_;
Button volume_down_button_; Button volume_down_button_;
SystemReset system_reset_;
void InitializeDisplayI2c() { void InitializeDisplayI2c() {
i2c_master_bus_config_t bus_config = { i2c_master_bus_config_t bus_config = {
@@ -100,11 +99,7 @@ public:
boot_button_(BOOT_BUTTON_GPIO), boot_button_(BOOT_BUTTON_GPIO),
touch_button_(TOUCH_BUTTON_GPIO), touch_button_(TOUCH_BUTTON_GPIO),
volume_up_button_(VOLUME_UP_BUTTON_GPIO), volume_up_button_(VOLUME_UP_BUTTON_GPIO),
volume_down_button_(VOLUME_DOWN_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();
InitializeDisplayI2c(); InitializeDisplayI2c();
InitializeButtons(); InitializeButtons();
InitializeIot(); InitializeIot();

View File

@@ -33,8 +33,6 @@
#define TOUCH_BUTTON_GPIO GPIO_NUM_47 #define TOUCH_BUTTON_GPIO GPIO_NUM_47
#define VOLUME_UP_BUTTON_GPIO GPIO_NUM_40 #define VOLUME_UP_BUTTON_GPIO GPIO_NUM_40
#define VOLUME_DOWN_BUTTON_GPIO GPIO_NUM_39 #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_SDA_PIN GPIO_NUM_41
#define DISPLAY_SCL_PIN GPIO_NUM_42 #define DISPLAY_SCL_PIN GPIO_NUM_42