srosro / deepspring-shellmate

MIT License
102 stars 7 forks source link

time_sync_map would be empty in some emotibit file input cases #163

Closed delattre1 closed 3 weeks ago

delattre1 commented 1 month ago
if row_dict['typetag'] == 'AK' and last_2_rows[0]['typetag'] == 'RD' and last_2_rows[1]['typetag'] == 'TL':
    time_sync_map.append({
        'TX_emotibit_timestamp': last_2_rows[0]['emotibit_timestamp'],
        'RX_local_timestamp': last_2_rows[1]['payload'][0],
        'RX_emotibit_timestamp': last_2_rows[1]['emotibit_timestamp'],
    })

I had created a smaller input file with the last 30k rows from this:

2024-09-21_08-11-38-563480.part_ac.csv

However, that code condition would never be true, so time_sync_map would be empty, causing the code to crash.