01234567890123456789012345678901234567890123456789012345678901234567890123456789
12101211121212131214121512161217121812191220122112221223122412251226122712281229 12301231123212331234123512361237123812391240124112421243124412451246124712481249 |
<----SKIPPED LINES---->
error_pin=messageboard.GPIO_ERROR_ARDUINO_REMOTE_CONNECTION, to_parent_q=to_parent_q,
read_format=read_format_string, write_format=write_format_string, name='Remote')
link.Open()
# Read in the saved display mode, if it exists
display_mode = messageboard.ReadFile(REMOTE_DISPLAY_MODE, log_exception=False)
if not display_mode:
display_mode = DISP_LAST_FLIGHT_NUMB_ORIG_DEST
else:
display_mode = int(display_mode)
flight, json_desc_dict, configuration, additional_attr = InitialMessageValues(
to_arduino_q)
next_read = 0
next_write = 0
while not shutdown.value:
if not to_arduino_q.empty():
to_arduino_message = to_arduino_q.get(block=False)
flight, json_desc_dict, configuration, additional_attr = to_arduino_message
if 'test_remote' in configuration:
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)
<----SKIPPED LINES---->
|
01234567890123456789012345678901234567890123456789012345678901234567890123456789
12101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250 |
<----SKIPPED LINES---->
error_pin=messageboard.GPIO_ERROR_ARDUINO_REMOTE_CONNECTION, to_parent_q=to_parent_q,
read_format=read_format_string, write_format=write_format_string, name='Remote')
link.Open()
# Read in the saved display mode, if it exists
display_mode = messageboard.ReadFile(REMOTE_DISPLAY_MODE, log_exception=False)
if not display_mode:
display_mode = DISP_LAST_FLIGHT_NUMB_ORIG_DEST
else:
display_mode = int(display_mode)
flight, json_desc_dict, configuration, additional_attr = InitialMessageValues(
to_arduino_q)
next_read = 0
next_write = 0
while not shutdown.value:
if not to_arduino_q.empty():
to_arduino_message = to_arduino_q.get(block=False)
flight, json_desc_dict, configuration, additional_attr = to_arduino_message
Log(additional_attr['ts']) # TODO: debug
if 'test_remote' in configuration:
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)
<----SKIPPED LINES---->
|