-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat(reboot reason): reason published on mcu-util requested reboot #141
Conversation
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.
approving, but consider getting @fouge to take a look
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.
you need to track the new head of https://github.com/worldcoin/orb-messages/ following the merge of worldcoin/orb-messages#42 in west.yml
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.
IMO we should rely on Memfault's reboot reason and depreciate that one which is far from complete unfortunately.
hmm I don't know. I think I would prefer having our own reboot reason. Its our business logic so we should have control over our reboot reason, right? Rather than relying on what someone else considers to be the valid reboot reasons. |
@TheButlah these are all the reboot reasons we currently track with Memfault. we could add a new |
@sri9311 anything i can do to help make progress on that task? list of things to change:
|
@fouge I'll make these changes today, I was busy exploring JSON, forgot about this! As discussed, proceeding only with |
publish ShutdownScheduled msg w/JETSON_REQUESTED_REBOOT on mcu-util reboot Signed-off-by: Srikar Chintapalli <[email protected]>
bump orb-messages for change compatibility Signed-off-by: Srikar Chintapalli <[email protected]>
Move CAN msg from shutdown to reboot handler and publish event on Memfault Signed-off-by: Srikar Chintapalli <[email protected]>
bf5652a
to
47dfdeb
Compare
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.
I would make sure the reboot command has been successfully taken into account before sending the event and telling Memfault the reboot reason.
main_board/src/runner/runner.c
Outdated
// Send out shutdown scheduled CAN message | ||
orb_mcu_main_ShutdownScheduled shutdown; | ||
shutdown.shutdown_reason = | ||
orb_mcu_main_ShutdownScheduled_ShutdownReason_JETSON_REQUESTED_REBOOT; | ||
shutdown.has_ms_until_shutdown = true; | ||
shutdown.ms_until_shutdown = delay * 1000; | ||
publish_new(&shutdown, sizeof(shutdown), | ||
orb_mcu_main_McuToJetson_shutdown_tag, | ||
CONFIG_CAN_ADDRESS_DEFAULT_REMOTE); | ||
#ifdef CONFIG_MEMFAULT | ||
MEMFAULT_REBOOT_MARK_RESET_IMMINENT( | ||
kMfltRebootReason_JetsonRequestedReboot); | ||
#endif |
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.
we should do all of this only if reboot()
returns RET_SUCCESS
below.
Otherwise, the reboot command failed and thus the event shouldn't be sent to the Jetson nor marked to Memfault.
send CAN message and Memfault event after successful reboot ret Signed-off-by: Srikar Chintapalli <[email protected]>
worldcoin/orb-messages#42 needs to go in first, then dependency in
west.yml
will be updated in a follow-up commitpublish ShutdownScheduled msg w/JETSON_REQUESTED_REBOOT on mcu-util reboot
fixes ORBP-363