small rename/rearrange

This commit is contained in:
Morgan 'ARR\!' Allen 2021-09-28 18:43:44 -07:00
parent e9eb537eee
commit 54d7eb9277

View file

@ -15,7 +15,7 @@ uint8_t running = 0;
TimerHandle_t pump_timers[PUMPS]; TimerHandle_t pump_timers[PUMPS];
static uint8_t pumps_duration[PUMPS] = {0}; static uint8_t pumps_duration[PUMPS] = {0};
static uint8_t pumps_enabled[PUMPS] = {0}; static uint8_t pumps_enabled[PUMPS] = {0};
static uint8_t pumps_state[PUMPS] = {0}; static uint8_t pumps_running[PUMPS] = {0};
static uint8_t safety = 1; static uint8_t safety = 1;
void pumps_update_config() { void pumps_update_config() {
@ -38,6 +38,10 @@ uint8_t pumps_set_duration(uint8_t idx, uint8_t time) {
return 0; return 0;
} }
uint8_t pumps_get_duration(uint8_t idx) {
return pumps_duration[idx];
}
uint8_t pumps_set_enabled(uint8_t idx, uint8_t value) { uint8_t pumps_set_enabled(uint8_t idx, uint8_t value) {
uint8_t io = pump_gpio_map[idx]; uint8_t io = pump_gpio_map[idx];
@ -55,12 +59,8 @@ uint8_t pumps_get_enabled(uint8_t idx) {
return pumps_enabled[idx] ? 1 : 0; return pumps_enabled[idx] ? 1 : 0;
} }
uint8_t pumps_get_duration(uint8_t idx) { uint8_t pumps_get_running(uint8_t idx) {
return pumps_duration[idx]; return pumps_running[idx];
}
uint8_t pumps_get_state(uint8_t idx) {
return pumps_state[idx];
} }
uint8_t pump_enable(int8_t i) { uint8_t pump_enable(int8_t i) {