tarina

git clone https://git.tarina.org/tarina
Log | Files | Refs | README | LICENSE

commit bcb958048e6e22a7f9ce3891e5bd35b376e72ec6
parent 96f8c50ebb062f94c2257e5385149a49af63a53e
Author: rbckman <robinbackman@gmail.com>
Date:   Thu,  9 Mar 2017 09:38:41 +0000

Merge branch 'master' of https://github.com/rbckman/tarina

Diffstat:
MVERSION | 2+-
Rmcp23017_pinout.png -> extras/mcp23017_pinout.png | 0
Mtarina.py | 8+++++---
3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/VERSION b/VERSION @@ -1,2 +1,2 @@ -0.95 +0.965 Tarina 2017 diff --git a/mcp23017_pinout.png b/extras/mcp23017_pinout.png Binary files differ. diff --git a/tarina.py b/tarina.py @@ -995,7 +995,7 @@ def getbutton(lastbutton, buttonpressed, buttontime, holdbutton): buttonpressed = True buttontime = time.time() holdbutton = pressed - if readbus == 255: + if readbus == 255 and readbus2 == 245: buttonpressed = False if float(time.time() - buttontime) > 0.15 and buttonpressed == True: pressed = holdbutton @@ -1154,8 +1154,10 @@ def main(): elif pressed == 'shutdown': time.sleep(0.1) if recording == False: - bus.write_byte_data(DEVICE,OLATA,0) - os.system('shutdown -h now') + writemessage('Hold down 2s to shutdown') + if buttontime > 2.1: + bus.write_byte_data(DEVICE,OLATA,0) + os.system('shutdown -h now') #RECORD AND PAUSE elif pressed == 'record' or pressed == 'retake' or reclenght != 0 and t > reclenght or t > 800: