Jura-Python-BT
Code for control and payment system of Jura Coffee Machine
Loading...
Searching...
No Matches
Namespaces | Functions | Variables
blue_tests.py File Reference

Namespaces

namespace  blue_tests
 

Functions

def blue_tests.setupBuzzer (pin)
 
def blue_tests.beep (duration)
 
def blue_tests.sleepTimer (secs)
 
def blue_tests.lockUnlockMachine (code, lock_status)
 
def blue_tests.get_name (UID)
 
def blue_tests.get_vorname (UID)
 
def blue_tests.get_chip (UID)
 
def blue_tests.get_value (UID)
 
def blue_tests.set_value (UID, value)
 
def blue_tests.get_price (product)
 
def blue_tests.set_buylist (UID, product_name, price)
 
def blue_tests.readlineCR (port)
 
def blue_tests.scanCard ()
 
def blue_tests.getAlerts (status)
 
def blue_tests.end_read (signal, frame)
 
def blue_tests.read_statistics ()
 

Variables

int blue_tests.BUZZER = 7
 
BtEncoder blue_tests.BtEncoder = BtEncoder()
 
JuraEncoder blue_tests.JuraEncoder = JuraEncoder()
 
os blue_tests.DEVICE = os.getenv("DEVICE")
 
os blue_tests.mastercard1 = os.getenv("MASTER_CARD_1")
 
os blue_tests.mastercard2 = os.getenv("MASTER_CARD_2")
 
os blue_tests.passwd = os.getenv("PASSWD")
 
mdb blue_tests.db = mdb.connect(host = "127.0.0.1", user = "root", passwd = os.getenv("PASSWD"), db = "AnnelieseDB")
 
lcddriver blue_tests.lcd = lcddriver.lcd()
 
dict blue_tests.priceCoffee
 
dict blue_tests.PRODUCTS
 
dict blue_tests.in_machine_products
 
dict blue_tests.ALERTS
 
str blue_tests.machine_status = "5a401524-ab2e-2548-c435-08c300000710"
 
str blue_tests.machine_status_handle = "0x000b"
 
str blue_tests.barista_mode = "5a401530-ab2e-2548-c435-08c300000710"
 
str blue_tests.barista_mode_handle = "0x0017"
 
str blue_tests.product_progress = "5a401527-ab2e-2548-c435-08c300000710"
 
str blue_tests.product_progress_handle = "0x001a"
 
str blue_tests.heartbeat_uuid = "5a401529-ab2e-2548-c435-08c300000710"
 
str blue_tests.heartbeat_handle = "0x0011"
 
str blue_tests.heartbeat_read_uuid = "5a401538-ab2e-2548-c435-08c300000710"
 
str blue_tests.heartbeat_read_handle = "0x0032"
 
str blue_tests.start_product = "5a401525-ab2e-2548-c435-08c300000710"
 
str blue_tests.start_product_handle = "0x000e"
 
str blue_tests.statistics_command_uuid = "5A401533-ab2e-2548-c435-08c300000710"
 
str blue_tests.statistics_command_handle = "0x0026"
 
str blue_tests.statistics_data_uuid = "5A401534-ab2e-2548-c435-08c300000710"
 
str blue_tests.statistics_data_handle = "0x0029"
 
str blue_tests.uart_rx_uuid = "5a401624-ab2e-2548-c435-08c300000710"
 
str blue_tests.uart_rx_hnd = "0x0036"
 
str blue_tests.uart_tx_uuid = "5a401625-ab2e-2548-c435-08c300000710"
 
str blue_tests.uart_tx_hnd = "0x0039"
 
dict blue_tests.characteristics
 
 blue_tests.child
 
 blue_tests.keep_alive_code
 
 blue_tests.locking_code
 
 blue_tests.unlock_code
 
 blue_tests.KEY_DEC
 
 blue_tests.all_statistics
 
 blue_tests.initial_time = time.time()
 
 blue_tests.CURRENT_STATISTICS
 
int blue_tests.emergency_unlock = 0
 
 blue_tests.else :
 
str blue_tests.lock_status = "unlocked"
 
MFRC522 blue_tests.MIFAREReader = MFRC522.MFRC522()
 
 blue_tests.try :
 
serial blue_tests.port = serial.Serial("/dev/serial0", baudrate = 9600, timeout = 1.0)
 
 blue_tests.except :
 
bool blue_tests.buttonPress = False
 
bool blue_tests.continue_reading = True
 
str blue_tests.lastSeen = ""
 
int blue_tests.counter = 0
 
int blue_tests.disp_init = 1
 
int blue_tests.payment_to_date = 1
 
list blue_tests.client_to_pay = []
 
int blue_tests.admin_locked = 0
 
def blue_tests.uid_str = scanCard()
 
bool blue_tests.product_made = False
 
def blue_tests.value = get_value(uid_str)
 
str blue_tests.value_str = str("Balance: " + str('%.2f' % value) + " EUR")
 
def blue_tests.lastName = get_name(uid_str)
 
def blue_tests.preName = get_vorname(uid_str)
 
str blue_tests.welStr = str("Hello " + preName)
 
str blue_tests.msgStr3 = str("Hold for 2s please ")
 
str blue_tests.msgStr4 = str("Chip below ")
 
int blue_tests.chosen = 0
 
int blue_tests.started = 0
 
int blue_tests.over = 0
 
int blue_tests.time_total = int(time.time() - initial_time)
 
child blue_tests.data = child.readline()
 
list blue_tests.data2 = [int(x, 16) for x in data.split()]
 
BtEncoder blue_tests.decoded = BtEncoder.encDecBytes(data2, KEY_DEC)
 
list blue_tests.as_hex = ["%02x" % d for d in decoded]
 
int blue_tests.value_new = 0
 
str blue_tests.msgStr1 = str(product_made + " was made!")
 
str blue_tests.msgStr2 = str(" Happy betty :) ")