Skip to content

Commit

Permalink
Merge pull request #156 from skliper/fix155-param_translation
Browse files Browse the repository at this point in the history
Fix #155, Remove unnecessary type translations
  • Loading branch information
astrogeco authored Feb 24, 2021
2 parents f0dfdbd + 2333fb8 commit e338b9a
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions Subsystems/cmdGui/CHeaderParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,15 @@


#
# Determines data type (--string, --byte, --half, --word, --double)
# Translate known data types to arguments
#
def findDataTypeNew(dataTypeOrig, paramName):
if '[' in paramName:
return '--string'
if dataTypeOrig in ['uint8', 'boolean']:
return '--byte'
if dataTypeOrig == 'uint16':
return '--half'
if dataTypeOrig == 'uint32':
return '--word'
if dataTypeOrig == 'uint64':
return '--double'
if dataTypeOrig in ['boolean']:
return '--uint8'
if dataTypeOrig in ['int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64']:
return "--" + dataTypeOrig
return None


Expand Down

0 comments on commit e338b9a

Please sign in to comment.