Skip to content

Commit

Permalink
added the inital support for new mcpwm driver
Browse files Browse the repository at this point in the history
  • Loading branch information
askuric committed Jun 10, 2024
1 parent ee91e27 commit 53624e4
Show file tree
Hide file tree
Showing 7 changed files with 762 additions and 993 deletions.
15 changes: 15 additions & 0 deletions src/communication/SimpleFOCDebug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ void SimpleFOCDebug::println(const __FlashStringHelper* str) {
}
}


void SimpleFOCDebug::println(const char* str, float val) {
if (_debugPrint != NULL) {
_debugPrint->print(str);
Expand Down Expand Up @@ -86,6 +87,20 @@ void SimpleFOCDebug::print(const __FlashStringHelper* str) {
}
}

void SimpleFOCDebug::print(const StringSumHelper str) {
if (_debugPrint != NULL) {
_debugPrint->print(str.c_str());
}
}


void SimpleFOCDebug::println(const StringSumHelper str) {
if (_debugPrint != NULL) {
_debugPrint->println(str.c_str());
}
}



void SimpleFOCDebug::print(int val) {
if (_debugPrint != NULL) {
Expand Down
4 changes: 3 additions & 1 deletion src/communication/SimpleFOCDebug.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,14 @@
**/


#ifndef SIMPLEFOC_DISABLE_DEBUG
#ifndef SIMPLEFOC_DISABLE_DEBUG

class SimpleFOCDebug {
public:
static void enable(Print* debugPrint = &Serial);

static void println(const __FlashStringHelper* msg);
static void println(const StringSumHelper msg);
static void println(const char* msg);
static void println(const __FlashStringHelper* msg, float val);
static void println(const char* msg, float val);
Expand All @@ -52,6 +53,7 @@ class SimpleFOCDebug {

static void print(const char* msg);
static void print(const __FlashStringHelper* msg);
static void print(const StringSumHelper msg);
static void print(int val);
static void print(float val);

Expand Down
Loading

0 comments on commit 53624e4

Please sign in to comment.