diff --git a/oresat_configs/scripts/gen_fw_files.py b/oresat_configs/scripts/gen_fw_files.py index 5e7bcf9..9929f33 100644 --- a/oresat_configs/scripts/gen_fw_files.py +++ b/oresat_configs/scripts/gen_fw_files.py @@ -117,13 +117,16 @@ def write_canopennode(od: canopen.ObjectDictionary, dir_path: str = "."): def remove_node_id(default: str): """Remove "+$NODEID" or "$NODEID+" from the default value""" + if isinstance(default, bool): + default = int(default) if not isinstance(default, str): return default - temp = default.split("+") - if default == "": return "0" + + temp = default.split("+") + if len(temp) == 1: return default # does not include $NODEID if temp[0] == "$NODEID":