01234567890123456789012345678901234567890123456789012345678901234567890123456789
945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991 | <----SKIPPED LINES----> messageboard.RemoveSetting(configuration, 'test_servos_rgb') ServoTestRgb(link, write_keys, write_format_tuple) elif 'test_servos_dim' in configuration: messageboard.RemoveSetting(configuration, 'test_servos_dim') ServoTestDim( link, write_keys, write_format_tuple, HexColorToRGBTuple(configuration['led_color']), gamma) elif 'test_servos_position' in configuration: messageboard.RemoveSetting(configuration, 'test_servos_position') message_dict = GenerateServoMessage( laser=LASER_ALL, angles=( float(configuration.get('test_servos_position_azimuth', 0)), float(configuration.get('test_servos_position_altitude', 0))), led=(0, 0, 0)) message_tuple = DictToValueTuple( message_dict, write_keys, write_format_tuple) link.Write(message_tuple) time.sleep(5) gamma = GetGamma(configuration) new_flight = DifferentFlights(flight, last_flight) if new_flight: Log('Flight changed from %s to %s' % ( messageboard.DisplayFlightNumber(last_flight), messageboard.DisplayFlightNumber(flight) ), ser=link) # Turn off laser so line isn't traced while it moves to new position message_dict = GenerateServoMessage(laser=LASER_OFF) message_tuple = DictToValueTuple( message_dict, write_keys, write_format_tuple) link.Write(message_tuple) last_flight = flight if time.time() >= next_read: bytes_read = [] values_t = link.Read(bytes_read=bytes_read) values_d = dict(zip(read_keys, values_t)) <----SKIPPED LINES----> |
01234567890123456789012345678901234567890123456789012345678901234567890123456789
945946947948949950951952953954955956957958959960961962963964 965966967968969970971972973974975976977978979980981982983984 | <----SKIPPED LINES----> messageboard.RemoveSetting(configuration, 'test_servos_rgb') ServoTestRgb(link, write_keys, write_format_tuple) elif 'test_servos_dim' in configuration: messageboard.RemoveSetting(configuration, 'test_servos_dim') ServoTestDim( link, write_keys, write_format_tuple, HexColorToRGBTuple(configuration['led_color']), gamma) elif 'test_servos_position' in configuration: messageboard.RemoveSetting(configuration, 'test_servos_position') message_dict = GenerateServoMessage( laser=LASER_ALL, angles=( float(configuration.get('test_servos_position_azimuth', 0)), float(configuration.get('test_servos_position_altitude', 0))), led=(0, 0, 0)) message_tuple = DictToValueTuple( message_dict, write_keys, write_format_tuple) link.Write(message_tuple) time.sleep(5) gamma = GetGamma(configuration) new_flight = DifferentFlights(flight, last_flight) if new_flight: Log('Flight changed from %s to %s' % ( messageboard.DisplayFlightNumber(last_flight), messageboard.DisplayFlightNumber(flight) ), ser=link) # Turn off laser so line isn't traced while it moves to new position message_dict = GenerateServoMessage(laser=LASER_OFF) message_tuple = DictToValueTuple( message_dict, write_keys, write_format_tuple) link.Write(message_tuple) last_flight = flight if time.time() >= next_read: bytes_read = [] values_t = link.Read(bytes_read=bytes_read) values_d = dict(zip(read_keys, values_t)) <----SKIPPED LINES----> |