davidmolony / mesc_firmware Goto Github PK
View Code? Open in Web Editor NEWFOC library for BLDC/PMSM compatible with all STM32 targets with FPU.
Home Page: https://davidmolony.github.io/MESC_Firmware/
FOC library for BLDC/PMSM compatible with all STM32 targets with FPU.
Home Page: https://davidmolony.github.io/MESC_Firmware/
Hi sir.
It posible to add strp/dir interface also? Soa will posible to used bldc on cnc.
Iam plan to used stm32f401.
An make mybe 70v20A or bigger volt.
There are .c and .h files in the root of the project that should have better documentation and need to be tucked away in a separate folder.
Need to integrate tracealyzer in the code to allow better insight into how it works. It should also help with tracing existing bugs.
Create a consistent coding style. Current style is error-prone and needs to be addressed.
Implement automatic code style parser for all contributors.
Function names, variables and constants require addressing according to coding style.
Functions require documentation headers.
Code requires UML execution diagram for easier understanding of how it works.
See: https://github.com/davidmolony/MESC_Firmware/blob/FW_ADC_sampling/MESC_RTOS/MESC/MESCinterface.c
starting around line 493
At present when we perform data logging, we export all these values:
I believe only 1-5 are available through CAN, could you send the additional variables? An slight alternative is to basically send the same content as what is transferred with "status json".
Please consider creation of CAN commands to:
Suggestion two levels of complicity for this.
FIRST VERSION:
User select items for configuring the payload with a command like
status log init
To configure:
json format is shown below. Then when the user makes the call:
status log send
the device starts sending the payload.
Also: get should show board temp, motor temp and vbat_volts. :-)
SECOND (EASIER) VERSION:
If all of that is too complicated for now, much simpler, create a print statement that prints:
{"amps": 10, "volts": 20, "rpm": 30, "btemp": 40, "mtemp": 50}
and I'll just configure the print to send whatever I need.
where you can read how to make an identification of the motor? There are GUI or CLI Tools for your project.
Is there a control of CAN BUS? DroneCan or so? You write that MESC work to 100 kHz.
I am interested in this now. I have controllers working with the VESC. VESC does not work more than 45 kHz PWM.
@Netzpfuscher, hi. David asked me to have a chat with you regarding code clean up. He's aware that he writes horribly formatted code and wanted to pull some resource to have code a bit more maintainable. Since you are a very active contributor, I thought it makes sense to have a discussion with you first before anything is done to find out your opinion and preferences.
I suggest that this issue be dedicated to ironing out two questions:
Under format of the code I mean things like naming convention for variables, functions, constants, etc. #define
vs. static const
. Tab vs. spaces. Brace position. Once those decisions are made quite a bit of that can be automated.
As far as implementation goes I see two options: wait until code reaches reasonable stability and do entire codebase in one hit, or introduce rules and enforce them with every merge request, thus allowing code to morph into acceptable format gradually. I am not sure how confident you are with code stability and whether David and you are happy to stop development to do all changes in one. It introduces certain difficulties in tracing bugs back beyond the formatting changes since diffing becomes much trickier. If this was production grade code for a commercial enterprise I would advocate gradual changes. This is where your input is paramount.
Let me know what you think.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.