-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cant read initial value of pin #35
Comments
According to: https://github.com/EnotionZ/GpiO/blob/master/lib/gpio.js#L114 ready has no parameters, I wish It has a status argument to trap errors |
Bug: EnotionZ#35 Change-Id: Ib61747dd145c98f19e2789092a471fab2816eeed Signed-off-by: Philippe Coval <[email protected]>
This fix a bug that before first change, value is always zero, while it could be different, For instance using anavi's Flex button it is high when not released, Note if you need to test this device make sure to configure pullup: gpio -g mode 11 up Bug: EnotionZ#35 Change-Id: Ib61747dd145c98f19e2789092a471fab2816eeed Signed-off-by: Philippe Coval <[email protected]>
Bug: EnotionZ#35 Change-Id: Ib61747dd145c98f19e2789092a471fab2816eeed Signed-off-by: Philippe Coval <[email protected]>
I think I have fixed this issue please confirm, I used this example with @leon-anavi Flex Rpi Hat: It may relate to related bug: |
This fix a bug that before first change, value is always zero, while it could be different. For instance using Anavi's Flex RPi hat button is high by default (when not pressed). Note if you need to test this device, make sure to configure pullup before: gpio -g mode 11 up Bug: EnotionZ#35 Origin: EnotionZ#41 Change-Id: Ib61747dd145c98f19e2789092a471fab2816eeed Signed-off-by: Philippe Coval <[email protected]>
gpio.js is bugged: value can be trusted before first change: Cant read initial value of pin WebThingsIO#35 problem is know and fix is pending, So until the upstream fix is applied, this workaround resolve the possibly wrong value on ready (before 1st change). This single change can be reverted on upgrade, since previous base is sane. Relate-to: EnotionZ/gpio#35 Change-Id: I2ea607f48e450a0728624ef15c17d14c98049072 Signed-off-by: Philippe Coval <[email protected]>
gpio.js is bugged: value can be trusted before first change, problem is know and fix is pending: Cant read initial value of pin WebThingsIO#35 So until the upstream fix is released, this workaround resolves the possibly wrong value on ready (before 1st change). This single change can be reverted on upgrade, since previous base is sane. It has been tested on RPi and ARTIK10. Relate-to: EnotionZ/gpio#35 Change-Id: I2ea607f48e450a0728624ef15c17d14c98049072 Signed-off-by: Philippe Coval <[email protected]>
gpio.js is bugged: value can be trusted before first change, problem is know and fix is pending: Cant read initial value of pin WebThingsIO#35 So until the upstream fix is released, this workaround resolves the possibly wrong value on ready (before 1st change). This single change can be reverted on upgrade, since previous base is sane. It has been tested on RPi and ARTIK10. Relate-to: EnotionZ/gpio#35 Change-Id: I2ea607f48e450a0728624ef15c17d14c98049072 Signed-off-by: Philippe Coval <[email protected]>
This fix a bug that before first change, value is always zero, while it could be different. For instance using Anavi's Flex RPi hat button is high by default (when not pressed). Note if you need to test this device, make sure to configure pullup before: gpio -g mode 11 up Bug: EnotionZ#35 Origin: EnotionZ#41 Change-Id: Ib61747dd145c98f19e2789092a471fab2816eeed Signed-off-by: Philippe Coval <[email protected]>
gpio.js is bugged: value can be trusted before first change, problem is know and fix is pending: Cant read initial value of pin WebThingsIO#35 So until the upstream fix is released, this workaround resolves the possibly wrong value on ready (before 1st change). This single change can be reverted on upgrade, since previous base is sane. It has been tested on RPi and ARTIK10. Relate-to: EnotionZ/gpio#35 Change-Id: I2ea607f48e450a0728624ef15c17d14c98049072 Signed-off-by: Philippe Coval <[email protected]>
This fix a bug that before first change, value is always zero, while it could be different. For instance using Anavi's Flex RPi hat button is high by default (when not pressed). Note if you need to test this device, make sure to configure pullup before: gpio -g mode 11 up Bug: EnotionZ#35 Origin: EnotionZ#41 Change-Id: Ib61747dd145c98f19e2789092a471fab2816eeed Signed-off-by: Philippe Coval <[email protected]>
gpio.js is bugged: value can be trusted before first change, problem is know and fix is pending: Cant read initial value of pin WebThingsIO#35 So until the upstream fix is released, this workaround resolves the possibly wrong value on ready (before 1st change). This single change can be reverted on upgrade, since previous base is sane. It has been tested on RPi and ARTIK10. Relate-to: EnotionZ/gpio#35 Change-Id: I2ea607f48e450a0728624ef15c17d14c98049072 Signed-off-by: Philippe Coval <[email protected]>
GPIO undefined value on ready gpio.js is bugged: value can be trusted before first change, problem is know and fix is pending: Cant read initial value of pin WebThingsIO#35 So until the upstream fix is released, this workaround resolves the possibly wrong value on ready (before 1st change). This single change can be reverted on upgrade, since previous base is sane. It has been tested on RPi and ARTIK10. Relate-to: EnotionZ/gpio#35 Change-Id: I2ea607f48e450a0728624ef15c17d14c98049072 Signed-off-by: Philippe Coval <[email protected]>
This fix a bug that before first change, value is always zero, while it could be different, since value is undetermined, it is set to undefined. for input mode and updated ASAP. For instance using Anavi's Flex RPi hat button is high by default (when not pressed). Note if you need to test this device, make sure to configure pullup before: gpio -g mode 11 up It was also tested on ARTIK10 on GPIO8 pin=J26/2 (pulldown resistor, active high input) Bug: #35 Origin: #41 Change-Id: Ib61747dd145c98f19e2789092a471fab2816eeed Signed-off-by: Philippe Coval <[email protected]>
GPIO undefined value on ready gpio.js is bugged: value can be trusted before first change, problem is know and fix is pending: Cant read initial value of pin WebThingsIO#35 So until the upstream fix is released, this workaround resolves the possibly wrong value on ready (before 1st change). This single change can be reverted on upgrade, since previous base is sane. It has been tested on RPi and ARTIK10. Relate-to: EnotionZ/gpio#35 Change-Id: I2ea607f48e450a0728624ef15c17d14c98049072 Signed-off-by: Philippe Coval <[email protected]>
GPIO undefined value on ready gpio.js is bugged: value can be trusted before first change, problem is know and fix is pending: Cant read initial value of pin WebThingsIO#35 So until the upstream fix is released, this workaround resolves the possibly wrong value on ready (before 1st change). This single change can be reverted on upgrade, since previous base is sane. It has been tested on RPi and ARTIK10. Relate-to: EnotionZ/gpio#35 Change-Id: I2ea607f48e450a0728624ef15c17d14c98049072 Signed-off-by: Philippe Coval <[email protected]>
gpio.js is bugged: value can be trusted before first change, problem is know and fix is pending: Cant read initial value of pin WebThingsIO#35 So until the upstream fix is released, this workaround resolves the possibly wrong value on ready (before 1st change). This single change can be reverted on upgrade, since previous base is sane. It has been tested on RPi and ARTIK10. Relate-to: EnotionZ/gpio#35 Change-Id: I2ea607f48e450a0728624ef15c17d14c98049072 Signed-off-by: Philippe Coval <[email protected]>
The patch was already merged into master. Tests are in #58 and will be merged into v1 branch. Closing issue. |
GPIO undefined value on ready gpio.js is bugged: value can be trusted before first change, problem is know and fix is pending: Cant read initial value of pin WebThingsIO#35 So until the upstream fix is released, this workaround resolves the possibly wrong value on ready (before 1st change). This single change can be reverted on upgrade, since previous base is sane. It has been tested on RPi and ARTIK10. Relate-to: EnotionZ/gpio#35 Change-Id: I2ea607f48e450a0728624ef15c17d14c98049072 Signed-off-by: Philippe Coval <[email protected]>
GPIO undefined value on ready gpio.js is bugged: value can be trusted before first change, problem is know and fix is pending: Cant read initial value of pin WebThingsIO#35 So until the upstream fix is released, this workaround resolves the possibly wrong value on ready (before 1st change). This single change can be reverted on upgrade, since previous base is sane. It has been tested on RPi and ARTIK10. Relate-to: EnotionZ/gpio#35 Change-Id: I2ea607f48e450a0728624ef15c17d14c98049072 Signed-off-by: Philippe Coval <[email protected]>
Hi,
i encountered with the problem reading initial value of pin inside ready function, here is the code snippet
The text was updated successfully, but these errors were encountered: