bad buttons
parent
9672390b55
commit
b842227eb8
|
|
@ -2,7 +2,8 @@ import argparse
|
|||
import os
|
||||
from time import sleep
|
||||
|
||||
#import buttons
|
||||
import buttons
|
||||
print(buttons.keys)
|
||||
|
||||
def main():
|
||||
args = get_args()
|
||||
|
|
@ -19,13 +20,15 @@ def main():
|
|||
buckets[key] = [False, len(buckets)]
|
||||
buckets[key][0] = False if line[0] == "/" else float(line.split()[-1])
|
||||
for key in buckets:
|
||||
#keycode = buttons.keys[bucket[key][1]]
|
||||
keyindex = buckets[key][1]
|
||||
print("getting", keyindex, "of", len(buckets))
|
||||
keycode = buttons.keys[keyindex]
|
||||
if buckets[key][0]:
|
||||
print(f"+{key}", end=" ") #, button[key])
|
||||
#buttons.down(keycode)
|
||||
print(f"+{key}", end=" ")
|
||||
buttons.down(keycode)
|
||||
else:
|
||||
print(f"-{key}", end=" ") #, button[key])
|
||||
#buttons.up(keycode)
|
||||
print(f"-{key}", end=" ")
|
||||
buttons.up(keycode)
|
||||
print()
|
||||
|
||||
def get_args():
|
||||
|
|
|
|||
Loading…
Reference in New Issue