We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm using Platformio, and I'm trying to reduce the size of a SimpleFOC project running on a GD32F130C8 processor with only 32K FLASH.
One obvious way is to reduce the size of the debug messages. I looked at the various messages, and in the file SimpleFOCDebug.h I found this
* Add -DSIMPLEFOC_DISABLE_DEBUG to your compiler flags to disable debug in * this way.
When I set that build flag, though, it fails in FOCMotor.cpp in line 85, trying to enable a non-existing class
void FOCMotor::useMonitoring(Print &print){ monitor_port = &print; //operate on the address of print SimpleFOCDebug::enable(&print); SIMPLEFOC_DEBUG("MOT: Monitor enabled!"); }
The text was updated successfully, but these errors were encountered:
Don't know if this will help the simpleFOC code but i always use debug macros that either map to serial ouput code or nothing:
#ifdef SERIALDEBUG #define DEBUG(code) {code} #define OUT(s) {SERIALDEBUG.print(s);} #define OUT2(s,i) {SERIALDEBUG.print(s);SERIALDEBUG.print(": ");SERIALDEBUG.print(i);} #define OUT2T(s,i) {SERIALDEBUG.print(s);SERIALDEBUG.print(": ");SERIALDEBUG.print(i);SERIALDEBUG.print("\t");} #define OUTN(s) {SERIALDEBUG.println(s);} #else #define DEBUG(code) #define OUT(s) #define OUT2(s) #define OUT2T(s) #define OUTN(s) #endif
usage:
DEBUG( OUT2T("GD32",iNow) for (int i=0; i<HALL_Count; i++) OUT2T(i,aoHall[i].Get()) OUT2T("angle",sensor.getAngle()) OUT2T("speed",sensor.getVelocity()) OUT2T("iI2cReq",iI2cReq); OUT2("iI2cRec",iI2cRec); OUTLN() )
Sorry, something went wrong.
Fixed this on the dev branch @robcazzaro , thanks for reporting it!
runger1101001
No branches or pull requests
I'm using Platformio, and I'm trying to reduce the size of a SimpleFOC project running on a GD32F130C8 processor with only 32K FLASH.
One obvious way is to reduce the size of the debug messages. I looked at the various messages, and in the file SimpleFOCDebug.h I found this
When I set that build flag, though, it fails in FOCMotor.cpp in line 85, trying to enable a non-existing class
The text was updated successfully, but these errors were encountered: