read_radar_params[source]

read_radar_params(filename)

Reads a text file containing serial commands and returns parsed config as a dictionary

parse_commands[source]

parse_commands(commands)

Calls the corresponding parser for each command in commands list

dict_to_list[source]

dict_to_list(cfg)

Generates commands from config dictionary

channelStr_to_dict[source]

channelStr_to_dict(args, curr_cfg=None)

Handler for channelcfg

profileStr_to_dict[source]

profileStr_to_dict(args, curr_cfg=None)

Handler for profileCfg

chirp_to_dict[source]

chirp_to_dict(args, curr_cfg=None)

Handler for chirpCfg

power_to_dict[source]

power_to_dict(args, curr_cfg=None)

handler for lowPower

frameStr_to_dict[source]

frameStr_to_dict(args, cfg)

Handler for frameCfg

adcStr_to_dict[source]

adcStr_to_dict(args, curr_cfg=None)

Handler for adcCfg

Example Usage

For a text file with the following commands:

flushCfg
dfeDataOutputMode 1
channelCfg 15 5 0
adcCfg 2 1
lowPower 0 0
profileCfg 0 77.0 58.0 7.0 40.0 0 0 100.0 1.0 304 9499 0 0 30
chirpCfg 0 0 0 0.0 0.0 0.0 0.0 1
chirpCfg 1 1 0 0.0 0.0 0.0 0.0 4
frameCfg 0 1 32 0 33.333 1 0
testFmkCfg 0 0 0 1
setProfileCfg disable ADC disable
sensorStart
read_radar_params(radar_config_filename)
{'numLanes': 4,
 'rx4': True,
 'rx3': True,
 'rx2': True,
 'rx1': True,
 'numTx': 2,
 'tx3': True,
 'tx2': False,
 'tx1': True,
 'isComplex': True,
 'image_band': False,
 'profiles': [{'id': 0,
   'start_frequency': 77000000000.0,
   'idle': 5.8e-05,
   'adcStartTime': 7e-06,
   'rampEndTime': 3.9999999999999996e-05,
   'txPower': 0.0,
   'txPhaseShift': 0.0,
   'freqSlopeConst': 100000000000000.0,
   'txStartTime': 1e-06,
   'adcSamples': 304,
   'adcSampleRate': 9499000.0,
   'hpfCornerFreq1': 0,
   'hpfCornerFreq2': 0,
   'rxGain': 30.0}],
 'chirps': [{'chirpStartIndex': 0,
   'chirpStopIndex': 0,
   'profileID': 0,
   'startFreqVariation': 0.0,
   'slopeVariation': 0.0,
   'idleVariation': 0.0,
   'adcStartVariation': 0.0,
   'chirptx3': False,
   'chirptx2': False,
   'chirptx1': True},
  {'chirpStartIndex': 1,
   'chirpStopIndex': 1,
   'profileID': 0,
   'startFreqVariation': 0.0,
   'slopeVariation': 0.0,
   'idleVariation': 0.0,
   'adcStartVariation': 0.0,
   'chirptx3': True,
   'chirptx2': False,
   'chirptx1': False}],
 'numChirps': 64,
 'fps': 30.00030000300003,
 'adcPower': 'regular'}