def cmd_broadcast(): logger_app.warn('click broadcast button') errno = broadcast() if errno == 0: msg = 'Broadcast done' else: msg = 'Boradcast error' return redirect(url_for('blue_test.vf_start', msg=msg))
def pre_cmd_start(): logger_app.warn('click start button') mode = request.form.get('mode', type=str) set_sqlite_value3('r_test_mode', mode) set_running_state() # gecloud_online = check_gecloud_connection() # if mode == 'production' and not gecloud_online: # logger_app.warn('production mode start, but gecloud is not reachable') # errno = 21 # set_errno(errno) # return redirect(url_for('blue_test.vf_error', errno=errno)) return redirect(url_for('blue_test.cmd_start'))
def cmd_reset(): logger_app.warn('click reset button') reset_all() return redirect(url_for('blue_test.vf_start'))
def cmd_indicator_b(): logger_app.warn('click indicator_b button') indicator_b() return redirect(url_for('blue_test.vf_finished'))
def cmd_kickout(): logger_app.warn('click kickout button') kickout_all() return redirect(url_for('blue_test.vf_finished'))
def cmd_alloff(): logger_app.warn('click turn off all button') turn_off_all() return redirect(url_for('blue_test.vf_finished'))
def vf_cmd_blink_stop(): logger_app.warn('click blink stop button') blink_stop() return redirect(url_for('blue_test.vf_finished'))
def vf_cmd_blink_single(): logger_app.warn('click blink single button') mac = request.form.get('mac') index = request.form.get('index') blink_single(mac) return redirect(url_for('blue_test.vf_finished', control_index=index))