Closed adambrown1 closed 1 year ago
I think this has less to do with the transform and more to do with NO vs NC, which is a distinction that can be designed around, rather than a special [-1,1] case.
Do you have a concrete suggestion?
From: Darryl Masson @.> Sent: 20 April 2022 16:31 To: AG-Schumann/Doberman @.> Cc: Adam Brown @.>; Author @.> Subject: Re: [AG-Schumann/Doberman] Valves with transform 1,-1 cannot be controlled from details dialogue (Issue AG-Schumann/doberview2#12)
I think this has less to do with the transform and more to do with NO vs NC, which is a distinction that can be designed around, rather than a special [-1,1] case.
— Reply to this email directly, view it on GitHub <AG-Schumann/doberview2#12> , or unsubscribe https://github.com/notifications/unsubscribe-auth/AFJJ7LSHNLI7AKWA3NKXHS3VGAIJPANCNFSM5T4HB7KA . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AFJJ7LS7HKTNZ7MK6DXMVALVGAIJPA5CNFSM5T4HB7KKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOIHG37CY.gif Message ID: @. @.> >
We add a "NC" field to the sensor doc for relevant switches, and then invert the command.
For some valves it is useful to use a transform 1,-1 to invert the status, so that doberman shows the real state of the valve. For example the two next to the getter, which are NO valves. This means that when the mduino output is high, the solenoid valve opens allowing air to the pneumatic valve which then closes.
For these, the sensor details dialogue shows the "wrong" button: since the value of the sensor is 1 when the valve is open, it shows the close button and sends the commands set XXX 0. But to close the valve, we need to set the mduino output high. You have to send the command manually and have to know to send the opposite command of what you want.
In short, when the transform is used as 1,-1, the button should send the opposite output to normal.