Loic74650 / PoolMaster

Arduino-based (ATMega2560) Home pool filtration and pH and Orp regulation system
GNU General Public License v3.0
137 stars 42 forks source link

Pump action is inverted #35

Open henjo opened 1 year ago

henjo commented 1 year ago

Hi, Thanks for a great project. I am trying to build a chlorine controller with a Controllino Maxi with the Poolmaster SW. At start the ORP and chlorine pump relays are all turned on and I have tracked down the problem to the definition of PUMP_ON macro in Pump.h. It is defined as active low which seems to be opposite to the way my Controllino hardware works. If the relay action is hardware dependent maybe it is good to have it as a parameter to the Pump class.

Loic74650 commented 1 year ago

Hi Good point, will add it to the todo list!

Loic74650 commented 1 year ago

On a second thought, this issue could also come up with the other defines such as TANK_FULL/TANK_EMPTY and INTERLOCK_OK/INTERLOCK_NOK, but it would not be super elegant to have them all as parameters in the class constructor, would it? Any suggestion for a better way to do this?

henjo commented 1 year ago

How about adding only one of the constants (PUMP_ON, TANK_FULL, INTERLOCK_OK) as parameters to the constructor since they are binary constants. So then there are 3 additional parameters to the constructor. Not super elegant either.

/Henrik

2023-07-04 22:40 skrev Loic74650:

On a second thought, this issue could also come up with the other defines such as TANK_FULL/TANK_EMPTY and INTERLOCK_OK/INTERLOCK_NOK, but it would not be super elegant to have them all as parameters in the class constructor, would it? Any suggestion for a better way to do this?

-- Reply to this email directly, view it on GitHub [1], or unsubscribe [2]. You are receiving this because you authored the thread.Message ID: @.***>

Links:

[1] https://github.com/Loic74650/PoolMaster/issues/35#issuecomment-1620724351 [2] https://github.com/notifications/unsubscribe-auth/AAAIXZ5ZDRXLDZM7WO55LXLXOR5UXANCNFSM6AAAAAAZ3OI3Z4