FIxed bug with inverted the tankFull bit!

This commit is contained in:
Senad Uka
2016-04-09 07:29:24 +02:00
parent c947980844
commit 98983ea50d

View File

@@ -11,7 +11,7 @@ GPIO.setup(config.GPIO_PIN_TANKFULL, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
# tank sensor has inverse logic - 0 when it is full 1 when it is not
# so we are inverting its value here
tankFull = !GPIO.input(config.GPIO_PIN_TANKFULL)
tankFull = (not GPIO.input(config.GPIO_PIN_TANKFULL))
GPIO.cleanup()
print 'Bacva puna: {}'.format(tankFull)