Open fantasmisiciliani opened 1 year ago
Tested 0.7.0-rc8 f28627c and I confirm that switching an output in inverted mode now works as expected. But on boot it is still at ON state, that it means LOW level in case of cold boot and last logic level in case of warm boot (hardware output and firmware states not matching, see issue #476).
Perform all steps below and tick them with [x]
Describe the bug
I tested some GPIO outputs with relay type and inverted mode: on boot they start in low level (ON) and, when I toggle them, the function _gpio_set_outputvalue() always writes 0 to the pin for both states ON and OFF. I have a WT32-SC01 Plus with openHASP 0.7.0-rc2 flashed.
To Reproduce
1- Set up a GPIO output with relay type and inverted mode, restart the plate. 2- Measure the pin voltage level or call the command output## with no payload (## is the pin number) 3- Toggle it and measure the pin voltage or insert in the function _gpio_set_outputvalue() an instruction that logs the value written on the digital output
Expected behavior
Screenshots or video
Here's a screenshot of the serial console (IP and MAC addresses are deleted), the code was modified only to introduce some LOG_WARNING: