01234567890123456789012345678901234567890123456789012345678901234567890123456789
714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187 |
<----SKIPPED LINES---->
dump_json_exists = os.path.exists(DUMP_JSON_FILE)
if dump_json_exists:
tmp_timestamp = os.path.getmtime(DUMP_JSON_FILE)
if (SIMULATION and DumpJsonChanges()) or (
not SIMULATION and dump_json_exists and
tmp_timestamp > last_dump_json_timestamp):
last_dump_json_timestamp = tmp_timestamp
(persistent_nearby_aircraft,
flight, now,
json_desc_dict,
persistent_path) = ScanForNewFlights(
persistent_nearby_aircraft,
persistent_path,
configuration.get('log_jsons', False),
flights)
# DEBUG: As part of the memory instrumentation, let's track
# the size of these data structures
iteration_divisor = configuration.get('memory', 0)
if iteration_divisor and not iteration % (iteration_divisor * 1000):
sizes = [
GetSize(persistent_nearby_aircraft),
GetSize(flight),
GetSize(json_desc_dict),
GetSize(flights)]
Log('Iteration: %d: object sizes (bytes): %s' % (iteration, sizes))
# because this might just be an updated instance of the previous
# flight as more identifier information (squawk and or flight number)
# comes in, we only want to process this if its a truly new flight
new_flight_flag = ConfirmNewFlight(flight, flights)
if new_flight_flag:
flights.append(flight)
remote, servo = RefreshArduinos(
remote, servo,
to_remote_q, to_servo_q, to_main_q, shutdown,
flights, json_desc_dict, configuration, screen_history)
if FlightMeetsDisplayCriteria(flight, configuration, log=True):
<----SKIPPED LINES---->
|
01234567890123456789012345678901234567890123456789012345678901234567890123456789
714671477148714971507151715271537154715571567157715871597160716171627163716471657166 71677168716971707171717271737174717571767177717871797180718171827183718471857186 |
<----SKIPPED LINES---->
dump_json_exists = os.path.exists(DUMP_JSON_FILE)
if dump_json_exists:
tmp_timestamp = os.path.getmtime(DUMP_JSON_FILE)
if (SIMULATION and DumpJsonChanges()) or (
not SIMULATION and dump_json_exists and
tmp_timestamp > last_dump_json_timestamp):
last_dump_json_timestamp = tmp_timestamp
(persistent_nearby_aircraft,
flight, now,
json_desc_dict,
persistent_path) = ScanForNewFlights(
persistent_nearby_aircraft,
persistent_path,
configuration.get('log_jsons', False),
flights)
# DEBUG: As part of the memory instrumentation, let's track
# the size of these data structures
if not iteration % 100:
sizes = [
GetSize(persistent_nearby_aircraft),
GetSize(flight),
GetSize(json_desc_dict),
GetSize(flights)]
Log('Iteration: %d: object sizes (bytes): %s' % (iteration, sizes))
# because this might just be an updated instance of the previous
# flight as more identifier information (squawk and or flight number)
# comes in, we only want to process this if its a truly new flight
new_flight_flag = ConfirmNewFlight(flight, flights)
if new_flight_flag:
flights.append(flight)
remote, servo = RefreshArduinos(
remote, servo,
to_remote_q, to_servo_q, to_main_q, shutdown,
flights, json_desc_dict, configuration, screen_history)
if FlightMeetsDisplayCriteria(flight, configuration, log=True):
<----SKIPPED LINES---->
|