Skip to content

Commit

Permalink
renaming ACTION to LEAD because it is more correct then
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Henkel <[email protected]>
  • Loading branch information
ct2034 committed Jun 18, 2024
1 parent a5c76cb commit 4f9d2d4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion btlib/src/btlib/bt_to_fsm/bt_to_fsm.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def _convert_subtree(self, node_id: int) -> nx.DiGraph:
fsm.graph['NODE_ID'] = node_id
port_names = self._add_ports(fsm, node_id)
p_tick, p_succ, p_fail, p_runn = port_names
if node['category'] == NODE_CAT.ACTION:
if node['category'] == NODE_CAT.LEAF:
fsm.add_node(node['name'] + str(node_id), **node)
fsm.add_edge(p_tick, node['name'] + str(node_id), label='on_tick')
fsm.add_edge(node['name'] + str(node_id),
Expand Down
2 changes: 1 addition & 1 deletion btlib/src/btlib/bts.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def _get_node_category(node: BeautifulSoup) -> NODE_CAT:
return NODE_CAT.SUBTREE
elif len(node.find_all()) == 0:
# leaf node
return NODE_CAT.ACTION
return NODE_CAT.LEAF
elif len(node.find_all()) == 1:
# decorator
return NODE_CAT.DECORATOR
Expand Down
2 changes: 1 addition & 1 deletion btlib/src/btlib/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
logger = logging.getLogger(__name__)

# node categories
NODE_CAT = Enum('NODECAT', 'ROOT ACTION DECORATOR CONTROL SUBTREE')
NODE_CAT = Enum('NODECAT', 'ROOT LEAF DECORATOR CONTROL SUBTREE')

# node states
NODE_STATE = Enum('RETURN_STATE', 'SUCCESS FAILURE RUNNING IDLE')

0 comments on commit 4f9d2d4

Please sign in to comment.