X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=wizard%2Fbertos_utils.py;h=6065c677cf6241bc4e7869bbad4fbfe9697f4a8e;hb=44788dc1e8a6714609acbec5314fa1a5e6c9a91b;hp=f224c6b0b122e142ca244636b657f47150caee5b;hpb=ea34cce8ca92257f5457cb85db93e2073b7250bf;p=bertos.git diff --git a/wizard/bertos_utils.py b/wizard/bertos_utils.py index f224c6b0..6065c677 100644 --- a/wizard/bertos_utils.py +++ b/wizard/bertos_utils.py @@ -212,6 +212,12 @@ def loadConfigurationInfos(path): configurationInfos[name] = {} configurationInfos[name]["value"] = value configurationInfos[name]["informations"] = informations + if configurationInfos[name]["informations"]["type"] == "int" and configurationInfos[name]["value"].find("L") != -1: + configurationInfos[name]["informations"]["long"] = True + configurationInfos[name]["value"] = configurationInfos[name]["value"].replace("L", "") + if configurationInfos[name]["informations"]["type"] == "int" and configurationInfos[name]["value"].find("U") != -1: + configurationInfos[name]["informations"]["unsigned"] = True + configurationInfos[name]["value"] = configurationInfos[name]["value"].replace("U", "") configurationInfos[name]["description"] = description return configurationInfos except SyntaxError: @@ -241,6 +247,11 @@ def loadModuleInfos(path): "configuration": WIZARD_MODULE["configuration"], "description": "", "enabled": False} + index = comment.find("\\brief") + if index != -1: + description = comment[index + 7:] + description = description[:description.find(" * ")] + moduleInfos[WIZARD_MODULE["name"]]["description"] = description return moduleInfos return {} except SyntaxError: @@ -301,7 +312,7 @@ def isLong(value): """ Return True if the value is a long. """ - if "long" not in value["informations"].keys() and value["informations"]["long"] and "unsigned" not in value["informations"].key(): + if "long" in value["informations"].keys() and value["informations"]["long"] and "unsigned" not in value["informations"].keys(): return True else: return False @@ -310,7 +321,7 @@ def isUnsigned(value): """ Return True if the value is an unsigned. """ - if "unsigned" not in value["informations"].keys() and value["informations"]["unsigned"] and "long" not in value["informations"].key(): + if "unsigned" in value["informations"].keys() and value["informations"]["unsigned"] and "long" not in value["informations"].keys(): return True else: return False