-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
firmware: app: tasks: heater_controller: Adding switch break after an…
…y error #142
- Loading branch information
1 parent
3fef7d0
commit bfc0eb8
Showing
2 changed files
with
13 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ | |
* | ||
* \author André M. P. de Mattos <[email protected]> | ||
* | ||
* \version 0.2.12 | ||
* \version 0.2.23 | ||
* | ||
* \date 2021/08/04 | ||
* | ||
|
@@ -63,20 +63,22 @@ void vTaskHeaterController(void *pvParameters) | |
case HEATER_AUTOMATIC_MODE: | ||
if(heater_get_sensor(HEATER_CONTROL_LOOP_CH_0, &temp) != 0) | ||
{ | ||
sys_log_print_event_from_module(SYS_LOG_ERROR, TASK_HEATER_CONTROLLER_NAME, "Heater channel 0 failed!"); | ||
sys_log_print_event_from_module(SYS_LOG_ERROR, TASK_HEATER_CONTROLLER_NAME, "Heater channel 0 failed (get_sensor)!"); | ||
sys_log_new_line(); | ||
break; | ||
} | ||
|
||
actuator_output = heater_algorithm(PID_BASE_SET_POINT, temp); | ||
|
||
if(heater_set_actuator(HEATER_CONTROL_LOOP_CH_0, actuator_output) != 0) | ||
{ | ||
sys_log_print_event_from_module(SYS_LOG_ERROR, TASK_HEATER_CONTROLLER_NAME, "Heater channel 0 failed!"); | ||
sys_log_print_event_from_module(SYS_LOG_ERROR, TASK_HEATER_CONTROLLER_NAME, "Heater channel 0 failed (set_actuator)!"); | ||
sys_log_new_line(); | ||
break; | ||
} | ||
break; | ||
case HEATER_MANUAL_MODE: | ||
/* TODO: Implemente manual mode */ | ||
/* TODO: Implement manual mode */ | ||
break; | ||
default: | ||
sys_log_print_event_from_module(SYS_LOG_ERROR, TASK_HEATER_CONTROLLER_NAME, "Invalid mode!"); | ||
|
@@ -90,20 +92,22 @@ void vTaskHeaterController(void *pvParameters) | |
case HEATER_AUTOMATIC_MODE: | ||
if(heater_get_sensor(HEATER_CONTROL_LOOP_CH_1, &temp) != 0) | ||
{ | ||
sys_log_print_event_from_module(SYS_LOG_ERROR, TASK_HEATER_CONTROLLER_NAME, "Heater channel 1 failed!"); | ||
sys_log_print_event_from_module(SYS_LOG_ERROR, TASK_HEATER_CONTROLLER_NAME, "Heater channel 1 failed (get_sensor)!"); | ||
sys_log_new_line(); | ||
break; | ||
} | ||
|
||
actuator_output = heater_algorithm(PID_BASE_SET_POINT, temp); | ||
|
||
if(heater_set_actuator(HEATER_CONTROL_LOOP_CH_1, actuator_output) != 0) | ||
{ | ||
sys_log_print_event_from_module(SYS_LOG_ERROR, TASK_HEATER_CONTROLLER_NAME, "Heater channel 1 failed!"); | ||
sys_log_print_event_from_module(SYS_LOG_ERROR, TASK_HEATER_CONTROLLER_NAME, "Heater channel 1 failed (set_actuator)!"); | ||
sys_log_new_line(); | ||
break; | ||
} | ||
break; | ||
case HEATER_MANUAL_MODE: | ||
/* TODO: Implemente manual mode */ | ||
/* TODO: Implement manual mode */ | ||
break; | ||
default: | ||
sys_log_print_event_from_module(SYS_LOG_ERROR, TASK_HEATER_CONTROLLER_NAME, "Invalid mode!"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ | |
* | ||
* \author Gabriel Mariano Marcelino <[email protected]> | ||
* | ||
* \version 0.2.22 | ||
* \version 0.2.23 | ||
* | ||
* \date 2020/10/21 | ||
* | ||
|
@@ -36,7 +36,7 @@ | |
#ifndef VERSION_H_ | ||
#define VERSION_H_ | ||
|
||
#define FIRMWARE_VERSION "0.2.22" | ||
#define FIRMWARE_VERSION "0.2.23" | ||
|
||
#define FIRMWARE_STATUS "Development" | ||
|
||
|