-
Notifications
You must be signed in to change notification settings - Fork 511
Support robotCleanerOperatingState Routine #2443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Hunsup Jung <[email protected]>
Signed-off-by: Hunsup Jung <[email protected]>
Invitation URL: |
Test Results 71 files 455 suites 0s ⏱️ Results for commit 9ce965f. ♻️ This comment has been updated with latest results. |
Minimum allowed coverage is Generated by 🐒 cobertura-action against 9ce965f |
Signed-off-by: Hunsup Jung <[email protected]>
388bea7
to
9ce965f
Compare
@@ -0,0 +1,108 @@ | |||
name: Robot Cleaner Operating State |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @HunsupJung why do we need this capability to be embedded? It appears the same capability def is already deployed in production
local supportedOperatingState = {} | ||
for _, state in ipairs(ib.data.elements) do | ||
if OPERATING_STATE_MAP[state.elements.operational_state_id.value] ~= nil then | ||
table.insert(supportedOperatingState, OPERATING_STATE_MAP[state.elements.operational_state_id.value].NAME) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this require an augment type()
call for lower lua lib integration?
for _, attr in ipairs(ib.data.elements) do | ||
table.insert(supportedOperatingStateCommands, OP_COMMAND_MAP[attr.value].NAME) | ||
end | ||
device:set_field(OPERATING_STATE_SUPPORTED_COMMANDS, supportedOperatingStateCommands, { persist = true }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we still need this table given the introduction of supportedCommands
? It seems to me like the one use of it can be replaced with the capability get_latest_state
api?
Type of Change
Checklist
Description of Change
This PR is for supporting Routine of
robotCleanerOperatingState
Capability and includes follows.rvc_operational_state_list_attr_handler
has been added to support Condition of Routine.handle_rvc_operational_state_accepted_command_list
has been updated to updatesupportedCommands
driverSwitched
has been added to executehandle_rvc_operational_state_accepted_command_list
after updating driver.Summary of Completed Tests