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

add dronecan negative rpm in reverse direction #165

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Huibean
Copy link
Contributor

@Huibean Huibean commented Jan 24, 2025

add dronecan negative rpm when in reverse direction

@@ -1020,7 +1020,11 @@ static void send_ESCStatus(void)
current.count = 0;

pkt.temperature = C_TO_KELVIN(degrees_celsius);
pkt.rpm = (e_rpm * 200) / eepromBuffer.motor_poles;
if (forward) {

Choose a reason for hiding this comment

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

Suggested change
if (forward) {
if (forward != eepromBuffer.dir_reversed) {

Tested on top of #164. Reversing the direction in the ESC shouldn't reverse the sign of the RPM. The RPM sign should match the throttle sign if the motor is operating correctly.

Copy link
Contributor Author

@Huibean Huibean Jan 26, 2025

Choose a reason for hiding this comment

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

@tpwrules can you make a PR for this?I am not sure how the negative RPM is actually used in FC(just CW/CCW in here), maybe you PR this will be better?

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