mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
scripts/libraries: Fix machine.LED.value().
This commit is contained in:
parent
d12874c637
commit
ded100e6c6
@ -37,4 +37,6 @@ class LED:
|
||||
self.pin(not self.pin())
|
||||
|
||||
def value(self, v=None):
|
||||
self.pin(v ^ self.inverted if v is not None else None)
|
||||
if v is None:
|
||||
return self.pin()
|
||||
self.pin(v ^ self.inverted)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user