From 81206bd433fb65395a1c9cb5760559ab3661f020 Mon Sep 17 00:00:00 2001 From: Nathael Pajani Date: Mon, 16 Sep 2024 19:51:16 +0200 Subject: [PATCH] Moved enum to interface.h --- v10/interface.h | 19 ++++++++++++++++--- v10/main.c | 12 ------------ 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/v10/interface.h b/v10/interface.h index 1dc1575..c582b3c 100644 --- a/v10/interface.h +++ b/v10/interface.h @@ -55,10 +55,23 @@ extern volatile uint8_t button_pressed; /* Configure interface board */ int interface_config(uint32_t uart); +enum running_modes { + mode_heat = 'C', /* Normal heating */ + mode_delay = 'D', /* Delayed heating */ + mode_ext_disable = 'E', /* Forced heating disabled by external input */ + mode_forced = 'F', /* Auto Forced heating */ + mode_manual = 'M', /* Manual Forced heating */ + mode_delayed_heat_prod = 'P', /* Paused forced heating */ + mode_temp_OK = 'T', /* Max temperature reached */ + mode_overvoltage = 'V', /* Overvoltage detected */ + mode_overtemp = 'H', /* Mosfet over-temperature detected */ + mode_water_critical = 'W', /* Water over-temperature limit reached */ +}; + enum interface_modes { - MODE_RUN = 0, - MODE_CONFIG, - MODE_DISPLAY, + MODE_RUN = 0, + MODE_CONFIG, + MODE_DISPLAY, }; extern char line[]; diff --git a/v10/main.c b/v10/main.c index 5631518..eb66dac 100644 --- a/v10/main.c +++ b/v10/main.c @@ -64,18 +64,6 @@ uint8_t mosfet_temp_shutdown = 0; /* Flag only */ uint8_t overvoltage = 0; /* Flag and counter. Used to create a delay when overvoltage is detected, set to OVERVOLTAGE_PROTECTION_CYCLES and decreases to 0 */ -enum modes { - mode_heat = 'C', /* Normal heating */ - mode_delay = 'D', /* Delayed heating */ - mode_ext_disable = 'E', /* Forced heating disabled by external input */ - mode_forced = 'F', /* Auto Forced heating */ - mode_manual = 'M', /* Manual Forced heating */ - mode_delayed_heat_prod = 'P', /* Paused forced heating */ - mode_temp_OK = 'T', /* Max temperature reached */ - mode_overvoltage = 'V', /* Overvoltage detected */ - mode_overtemp = 'H', /* Mosfet over-temperature detected */ -}; - /* Current running mode */ volatile char mode = mode_heat; volatile char old_mode = mode_heat; -- 2.43.0