01234567890123456789012345678901234567890123456789012345678901234567890123456789
12141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242 | <----SKIPPED LINES----> messageboard.RemoveSetting(configuration, 'test_remote') def TestDisplayMode(m): SendRemoteMessage( flight, json_desc_dict, configuration, additional_attr, m, write_keys, write_format_tuple, link) time.sleep(1) TestDisplayMode(DISP_LAST_FLIGHT_NUMB_ORIG_DEST) TestDisplayMode(DISP_LAST_FLIGHT_AZIMUTH_ELEVATION) TestDisplayMode(DISP_FLIGHT_COUNT_LAST_SEEN) TestDisplayMode(DISP_RADIO_RANGE) if time.time() >= next_write: next_write = SendRemoteMessage( flight, json_desc_dict, configuration, additional_attr, display_mode, write_keys, write_format_tuple, link) if time.time() >= next_read: bytes_read = [] values_t = link.Read(bytes_read) values_d = dict(zip(read_keys, values_t)) if values_d.get('confirmed'): Log(str(bytes_read) + '\n' + str(values_t) + '\n' + str(values_d)) display_mode, low_batt = ExecuteArduinoCommand( values_d, configuration, display_mode, low_batt, to_parent_q, link) next_read = time.time() + READ_DELAY_TIME link.Close(SHUTDOWN_TEXT) |
01234567890123456789012345678901234567890123456789012345678901234567890123456789
12141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242 | <----SKIPPED LINES----> messageboard.RemoveSetting(configuration, 'test_remote') def TestDisplayMode(m): SendRemoteMessage( flight, json_desc_dict, configuration, additional_attr, m, write_keys, write_format_tuple, link) time.sleep(1) TestDisplayMode(DISP_LAST_FLIGHT_NUMB_ORIG_DEST) TestDisplayMode(DISP_LAST_FLIGHT_AZIMUTH_ELEVATION) TestDisplayMode(DISP_FLIGHT_COUNT_LAST_SEEN) TestDisplayMode(DISP_RADIO_RANGE) if time.time() >= next_write: next_write = SendRemoteMessage( flight, json_desc_dict, configuration, additional_attr, display_mode, write_keys, write_format_tuple, link) if time.time() >= next_read: bytes_read = [] values_t = link.Read(bytes_read=bytes_read) values_d = dict(zip(read_keys, values_t)) if values_d.get('confirmed'): Log(str(bytes_read) + '\n' + str(values_t) + '\n' + str(values_d)) display_mode, low_batt = ExecuteArduinoCommand( values_d, configuration, display_mode, low_batt, to_parent_q, link) next_read = time.time() + READ_DELAY_TIME link.Close(SHUTDOWN_TEXT) |