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

Bug in release 6.02, in COMM_GET_IMU_DATA command handler, controller_id is never sent #721

Open
sentient-cloud opened this issue May 2, 2024 · 0 comments

Comments

@sentient-cloud
Copy link

Here

		if (mask & ((uint32_t)1 << 16)) {
			uint8_t current_controller_id = app_get_configuration()->controller_id;
#ifdef HW_HAS_DUAL_MOTORS
			if (mc_interface_get_motor_thread() == 2) {
				current_controller_id = utils_second_motor_id();
			}
#endif
			send_buffer[ind++] = current_controller_id;
		}

A uint16_t is read from payload into mask, which is a uint32_t itself. The upper 16 bits always be zero which means this check always fails and controller_id is never sent no matter what the received mask is.

This appears to be fixed in the master branch by always sending the field instead, but anyone running the 6.02 firmware will never receive the controller_id value. It might be worth adding a note somewhere about this behavior.

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

No branches or pull requests

1 participant