######
# LEAVE THESE IMPORTS!
######
import functions
import time

######
# config values
######

SERIAL_PORT = '/dev/ttyUSB0'
BAUD_RATE = 9600
UART_NEWLINE = ""

###
# name, enabled, string to match
###
conditions = [
    ['1', False, "", 'one'],
    ['2', False, "", 'two'],
    ['3', False, "", 'three'],
]

######
# Custom functions
######

# Toggle states for each function
toggle_state_one = 0
toggle_state_two = 0
toggle_state_three = 0

def one():
    global toggle_state_one
    functions.send_uart_message("1")
    functions.send_uart_message(str(toggle_state_one))
    toggle_state_one = 1 - toggle_state_one

def two():
    global toggle_state_two
    functions.send_uart_message("2")
    functions.send_uart_message(str(toggle_state_two))
    toggle_state_two = 1 - toggle_state_two

def three():
    global toggle_state_three
    functions.send_uart_message("3")
    functions.send_uart_message(str(toggle_state_three))
    toggle_state_three = 1 - toggle_state_three

