Skip to content
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

AP_ESC_Telem:make logged ESC id match the output to which its attached #26857

Closed
wants to merge 1 commit into from

Conversation

Hwurzburg
Copy link
Collaborator

first time using ESC telem logs the ESC log id index being one off from its output attachment was immediately odd
NFC change

@@ -527,7 +527,7 @@ void AP_ESC_Telem::update()
const struct log_Esc pkt{
LOG_PACKET_HEADER_INIT(uint8_t(LOG_ESC_MSG)),
time_us : now_us64,
instance : i,
instance : _i, //makes logged instance agree to output that ESC is attached
Copy link
Contributor

Choose a reason for hiding this comment

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

probably no need for the intermediate "_i" variable. This line could be changed to: "instance : i+1" instead.

There's a comment a few lines up that says "id starts from 0" which should be updated.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

tried that first and it failed to compile

@rmackay9
Copy link
Contributor

rmackay9 commented Apr 22, 2024

We should discuss whether we want to make the logging instance consistent with the user parameters (which is what I think this is trying to do). Normally the logging instance starts from 0.

As an alternative maybe adding a servo_out field would be helpful?

@Hwurzburg Hwurzburg closed this Apr 23, 2024
@Hwurzburg Hwurzburg deleted the esc_log_id branch May 18, 2024 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants