01234567890123456789012345678901234567890123456789012345678901234567890123456789
12131214121512161217121812191220122112221223122412251226122712281229123012311232 12331234123512361237 | <----SKIPPED LINES----> 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: values_t = link.Read() # simple ack message sent by servos values_d = dict(zip(read_keys, values_t)) if values_d.get('confirmed'): 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
12131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238 | <----SKIPPED LINES----> 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: values_t = link.Read() # simple ack message sent by servos values_d = dict(zip(read_keys, values_t)) if values_d.get('confirmed'): Log(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) |