Skip to content

[BUG] Cannot disable Debug print #279

Closed
@robcazzaro

Description

@robcazzaro

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!");
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions