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

adjusted_input are different from bi_direction-dshot and bi_direction-pwm, any idea? #71

Open
lida2003 opened this issue Aug 22, 2024 · 0 comments

Comments

@lida2003
Copy link

Does it should be the same for both bi_direction pwm and dshot?

  • bi_direction-dshot adjusted_input (2047-47)

newinput from 0 to (1000 - (servo_dead_band << 1)), adjusted_input from 2047 to 47

AM32/Src/main.c

Line 1073 in f3fc4f1

if (newinput < (1000 - (servo_dead_band << 1))) {

AM32/Src/main.c

Line 1085 in f3fc4f1

adjusted_input = map(newinput, 0, 1000 - (servo_dead_band << 1), 2047, 47);

  • bi_direction-pwm adjusted_input (47-2045)

newinput from 47 to 1047, adjusted_input from 47 to 2045

AM32/Src/main.c

Line 1148 in f3fc4f1

if (newinput <= 1047 && newinput > 47) {

AM32/Src/main.c

Line 1160 in f3fc4f1

adjusted_input = ((newinput - 48) * 2 + 47) - reversing_dead_band;

@lida2003 lida2003 changed the title bi_direction-dshot adjusted_input (2047-47) are different from bi_direction-pwm adjusted_input (47-2045) adjusted_input are different from bi_direction-dshot and bi_direction-pwm, any idea? Aug 22, 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

No branches or pull requests

1 participant