File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 66MAX_SERVICE_ID = 511
77
88
9- _STANDARD_ROOT_NAMESPACE = "uavcan"
9+ _STANDARD_ROOT_NAMESPACES = { "uavcan" , "cyphal" }
1010
1111_STANDARD_MESSAGES = 7168 , 8191
1212_STANDARD_SERVICES = 384 , 511
1818
1919
2020def is_valid_regulated_subject_id (regulated_id : int , root_namespace : str ) -> bool :
21- is_standard = root_namespace .strip () == _STANDARD_ROOT_NAMESPACE
21+ is_standard = root_namespace .strip () in _STANDARD_ROOT_NAMESPACES
2222 lo , hi = _STANDARD_MESSAGES if is_standard else _VENDOR_MESSAGES
2323 return lo <= int (regulated_id ) <= hi
2424
2525
2626def is_valid_regulated_service_id (regulated_id : int , root_namespace : str ) -> bool :
27- is_standard = root_namespace .strip () == _STANDARD_ROOT_NAMESPACE
27+ is_standard = root_namespace .strip () in _STANDARD_ROOT_NAMESPACES
2828 lo , hi = _STANDARD_SERVICES if is_standard else _VENDOR_SERVICES
2929 return lo <= int (regulated_id ) <= hi
3030
You can’t perform that action at this time.
0 commit comments