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

Reverse button not read with ADC2 regen braking with ADC and UART - solution suggested #765

Open
Rich235 opened this issue Sep 13, 2024 · 0 comments

Comments

@Rich235
Copy link

Rich235 commented Sep 13, 2024

Vn 6.06 and lower, in bldc/applications/app_adc.c, line 304, I believe the following config is missing:

config.ctrl_type == ADC_CTRL_TYPE_CURRENT_REV_BUTTON_BRAKE_ADC ||

and so the reverse button input is never used for this configuration as rev_button = !palReadPad(HW_ICU_GPIO, HW_ICU_PIN); never gets executed. Pls see here: https://vesc-project.com/node/1499#comment-12470 where I've built on dk-odense's previous observation on this.

This mean there is no ability to reverse when using ADC and UART (ADC1 throttle, ADC2 brake, servo pin reverse button) in this mode.

I've made this change locally and uploaded the firmware and confirmed it now works. This mode is necessary for using VESC in a car with forward, reverse and fully variable regenerative braking on the brake pedal and using UART to display information on a dash screen.

I'm sorry I don't know how to competently make a pull request for this tiny update. I've attached the updated file where the additional setting is added to line 305 for reference.

Hopefully this update can be made. Also, I've not checked what other modes are missing from the reverse button setting here.

Thank you for fantastic VESC code and tools, it truly is an amazing creation.

Regards, Richard.
app_adc.zip

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