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

Feature request: updating c_libs interface header #732

Open
tmgofer opened this issue Jun 12, 2024 · 3 comments
Open

Feature request: updating c_libs interface header #732

tmgofer opened this issue Jun 12, 2024 · 3 comments

Comments

@tmgofer
Copy link

tmgofer commented Jun 12, 2024

Hi,
Are you planning to extend https://github.com/vedderb/bldc/blob/master/lispBM/c_libs/vesc_c_if.h and publish more functionality that will be accessible to c_libs? There are many functions that can be invoked in LISP, but are not published for native libraries (eg. foc-beep calls mcpwm_foc_beep, which is not exposed in vesc_c_if.h. The same with set-aux)
Also, just a few settings can be set by VESC_IF->set_cfg_[float/int] ...
Please consider extending the interface.

@tmgofer
Copy link
Author

tmgofer commented Jun 12, 2024

I've forgot to mention - I'm happy to implement the update on a branch if there's a chance it will be included in next release.

@vedderb
Copy link
Owner

vedderb commented Jun 17, 2024

I did not plan to spend a lot more time on vesc_c_if before the release and I did not intend to make it support everything that is supported by the lisp-extensions. As the c interface has harder restrictions on binary type compatibility it is harder to test and maintain, and making changes to it is more likely to break old code using it. The firmware is also getting quite large for the flash size and I don't want to use the last space for duplicating functionality.

If there is anything in particular you need for the C interface we can add that. If you just want to have access to more functions in general you can interact with lisp from your C code and use the lisp-funcctions in a few different ways.

@tmgofer
Copy link
Author

tmgofer commented Jun 18, 2024

Thanks for answer, Benjamin. I understand the effort related to maintenance and hazard with keeping binary compatibility. Makes sense.
You're right, I wanted to have access to more functions in general - that's because of performance issue I've experienced in LISP in a more complex applications.
I wasn't aware that I can call a LISP function from within c_lib function. Any hint on how to do that?

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

2 participants