bad buttons

master
bel 2022-04-12 20:31:19 -06:00
parent 9672390b55
commit b842227eb8
1 changed files with 9 additions and 6 deletions

View File

@ -2,7 +2,8 @@ import argparse
import os import os
from time import sleep from time import sleep
#import buttons import buttons
print(buttons.keys)
def main(): def main():
args = get_args() args = get_args()
@ -19,13 +20,15 @@ def main():
buckets[key] = [False, len(buckets)] buckets[key] = [False, len(buckets)]
buckets[key][0] = False if line[0] == "/" else float(line.split()[-1]) buckets[key][0] = False if line[0] == "/" else float(line.split()[-1])
for key in buckets: 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]: if buckets[key][0]:
print(f"+{key}", end=" ") #, button[key]) print(f"+{key}", end=" ")
#buttons.down(keycode) buttons.down(keycode)
else: else:
print(f"-{key}", end=" ") #, button[key]) print(f"-{key}", end=" ")
#buttons.up(keycode) buttons.up(keycode)
print() print()
def get_args(): def get_args():