Skip to content

Extended HWM commands refactor - #12682

Merged
Nir-Az merged 2 commits into
realsenseai:developmentfrom
Nir-Az:extended-buffer-refactor
Feb 20, 2024
Merged

Extended HWM commands refactor#12682
Nir-Az merged 2 commits into
realsenseai:developmentfrom
Nir-Az:extended-buffer-refactor

Conversation

@Nir-Az

@Nir-Az Nir-Az commented Feb 19, 2024

Copy link
Copy Markdown
Collaborator

When we get config table we get the size in the header.
This PR remove the hard coded tables sizes, and leverage the header size value.
Also did some renaming

Tracked on [RSDEV-1735]

@Nir-Az
Nir-Az requested a review from remibettan February 19, 2024 09:09

auto ans = hw_monitor::send(cmd, p_response, locked_transfer);
recv_msg.insert(recv_msg.end(), ans.begin(), ans.end());
// currently we assume HKR send only the table size when sending 0/0 chanks command above.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo - chunks

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo - sends

auto ans = hw_monitor::send(cmd, p_response, locked_transfer);
recv_msg.insert(recv_msg.end(), ans.begin(), ans.end());
// currently we assume HKR send only the table size when sending 0/0 chanks command above.
// in the future the FW should send chunk 1 in 0/0 command and than we can use it here.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo - then

// actual size will be returned as part for the response header and will be used
// to calculate the extended loop range
auto ans = hw_monitor::send(cmd, p_response, locked_transfer);
recv_msg.insert(recv_msg.end(), ans.begin(), ans.end());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if I understand correctly, this is an API change:
instead of getting the first chunk, we get the message, in which only the header is needed, and then, we get the chunks in other messages.
Please confirm this change has been implemented also in HKR side.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discusses,
Current FW : we get the last chunk size of the first messages which is wrong, but since we get a valid header we extract the size from there and restart the querying process.

FW should supply a fix where 0/0 we send the first chunk with full size, then we can optimize and take this chunk and continue the loop from index 1.

This will be done on another PR once we have their fix.

@remibettan remibettan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

few comments - thanks!

@remibettan
remibettan self-requested a review February 20, 2024 09:52

@remibettan remibettan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Nir-Az
Nir-Az merged commit 4ee19df into realsenseai:development Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants