Changeset df4d123 in ammosreader


Ignore:
Timestamp:
05/14/23 20:43:23 (2 years ago)
Author:
Enrico Schwass <ennoausberlin@…>
Branches:
AmmosSource, guix
Children:
482456c
Parents:
083cf10
Message:

fix dictionary access for modulation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ammosreader/PDW.py

    r083cf10 rdf4d123  
    6161        modulations = {0: 'Unknown', 1: 'Unmodulated', 2: 'FM', 3: 'LFM', 4: 'PSK-2', 5: 'PSK-3', 6: 'PSK-4',
    6262                       7: 'PSK-m', 8: 'NLFM', 9: 'SFM', 10: 'TFM', 11: 'Pulse too short'}
    63         modulation = modulations[int(sixth_entry_bit_string[7:12], 2)]
     63        modulation = modulations.get(int(sixth_entry_bit_string[7:12], 2), 0)
    6464        sector = int(sixth_entry_bit_string[28:32], 2)
    6565
Note: See TracChangeset for help on using the changeset viewer.