Refactor Heater class #615

Open
opened 2022-05-02 18:20:00 +02:00 by muellerr · 0 comments
Owner

The heater class is not generic enough to be re-used properly. This is probably because it was programmed specifically for FLP. There are some important points to make this class usable for EIVE specifically:

  • There will not always be two switches, and the information that there is a second switch does not really belong in a generic Heater class in my opinion
  • Heaters are not always controlled by a Power Switcher. They can be controlled by
    GPIO pins as well
  • Sometimes, a power switcher and a GPIO is used

It would be good to define a generic HeaterBase class which provides adaptions points like checkHeaterState(... targetState), setHeater(... targetState) which allow to write custom code being able to handle any combination of GPIO pins or power switches.

The heater class is not generic enough to be re-used properly. This is probably because it was programmed specifically for FLP. There are some important points to make this class usable for EIVE specifically: - There will not always be two switches, and the information that there is a second switch does not really belong in a generic `Heater` class in my opinion - Heaters are not always controlled by a Power Switcher. They can be controlled by GPIO pins as well - Sometimes, a power switcher and a GPIO is used It would be good to define a generic HeaterBase class which provides adaptions points like `checkHeaterState(... targetState)`, `setHeater(... targetState)` which allow to write custom code being able to handle any combination of GPIO pins or power switches.
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: fsfw/fsfw#615
No description provided.