Skip to content

Fix FW logs bug. - #12853

Merged
Nir-Az merged 3 commits into
realsenseai:developmentfrom
OhadMeir:development
Apr 15, 2024
Merged

Fix FW logs bug.#12853
Nir-Az merged 3 commits into
realsenseai:developmentfrom
OhadMeir:development

Conversation

@OhadMeir

Copy link
Copy Markdown
Contributor

Did not parse messages returned for the "start" HWMC, only parsed for the "update" HWMC.

Also the viewer parse the XML repeatedly, changed to parse only once when starting.

@OhadMeir
OhadMeir requested a review from Nir-Az April 15, 2024 09:58
Comment thread common/output-model.cpp
Comment thread common/output-model.cpp
{
fwlogger.stop_collecting();

if( !enable_firmware_logs && fwlogger.get_number_of_fw_logs() == 0 )

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

As I understand from the code, before if the user deactivate the log parsing, we continues dequeue until get_number_of_fw_logs() == 0
Now we will stop even we still have logs as our loop is while( enable_firmware_logs )
Is this change the required behavior?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

"Get logs" HWM can return multiple log entries at once. Those entries are put in a queue. Subsequent calls to get_firmware_log don't send HWM, only deque the messages.
get_number_of_fw_logs() == 0 when the queue is empty, then we break the loop and call stop_collecting

Comment thread src/firmware_logger_device.cpp Outdated
}
}

void firmware_logger_device::HandleReceivedData( std::vector< uint8_t > & res )

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

const?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added, and naming convention fixed

@Nir-Az
Nir-Az merged commit 43133ff into realsenseai:development Apr 15, 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