Esempio n. 1
0
def main():
    global quit
    while not quit:
        print_main_menu()
        choice = raw_input(" >>  ")
        exec_menu(main_menu, choice)

    disconnect_sensor()
    lputils.logd(TAG, "bye")
Esempio n. 2
0
def main():
    quit = False
    lputils.logd(TAG, "Connecting sensor")
    if not lpmsSensor.connect():
        lputils.loge(TAG, "Error connecting to sensor, terminating..")
        return

    lputils.logd(TAG, "Connected")
    print_data()

    while not quit:
        choice = raw_input(" >>  ")
        quit = True
    stop_print_data()

    lputils.logd(TAG, "Disconnecting sensor")
    lpmsSensor.disconnect()
    lputils.logd(TAG, "Disconnected")
    lputils.logd(TAG, "bye")
Esempio n. 3
0
def disconnect_sensor():
    lputils.logd(TAG, "Disconnecting sensor")
    lpmsSensor.disconnect()
    lputils.logd(TAG, "Disconnected")
Esempio n. 4
0
def connect_sensor():
    lputils.logd(TAG, "Connecting sensor")
    if lpmsSensor.connect():
        lputils.logd(TAG, "Connected")
        get_config_register()