SimpleFOClibrary 2.4.0
Loading...
Searching...
No Matches
SimpleFOCDebug.cpp
Go to the documentation of this file.
1
2#include "SimpleFOCDebug.h"
3
4#ifndef SIMPLEFOC_DISABLE_DEBUG
5
6
8
9
10void SimpleFOCDebug::enable(Print* debugPrint) {
11 _debugPrint = debugPrint;
12}
13
14
16 if (_debugPrint != NULL) {
17 _debugPrint->println(val);
18 }
19}
20
21void SimpleFOCDebug::println(float val) {
22 if (_debugPrint != NULL) {
23 _debugPrint->println(val);
24 }
25}
26
27
28
29void SimpleFOCDebug::println(const char* str) {
30 if (_debugPrint != NULL) {
31 _debugPrint->println(str);
32 }
33}
34
35void SimpleFOCDebug::println(const __FlashStringHelper* str) {
36 if (_debugPrint != NULL) {
37 _debugPrint->println(str);
38 }
39}
40
41
42void SimpleFOCDebug::println(const char* str, float val) {
43 if (_debugPrint != NULL) {
44 _debugPrint->print(str);
45 _debugPrint->println(val);
46 }
47}
48
49void SimpleFOCDebug::println(const __FlashStringHelper* str, float val) {
50 if (_debugPrint != NULL) {
51 _debugPrint->print(str);
52 _debugPrint->println(val);
53 }
54}
55
56void SimpleFOCDebug::println(const char* str, int val) {
57 if (_debugPrint != NULL) {
58 _debugPrint->print(str);
59 _debugPrint->println(val);
60 }
61}
62void SimpleFOCDebug::println(const char* str, char val) {
63 if (_debugPrint != NULL) {
64 _debugPrint->print(str);
65 _debugPrint->println(val);
66 }
67}
68
69void SimpleFOCDebug::println(const __FlashStringHelper* str, int val) {
70 if (_debugPrint != NULL) {
71 _debugPrint->print(str);
72 _debugPrint->println(val);
73 }
74}
75
76
77void SimpleFOCDebug::print(const char* str) {
78 if (_debugPrint != NULL) {
79 _debugPrint->print(str);
80 }
81}
82
83
84void SimpleFOCDebug::print(const __FlashStringHelper* str) {
85 if (_debugPrint != NULL) {
86 _debugPrint->print(str);
87 }
88}
89
90void SimpleFOCDebug::print(const StringSumHelper str) {
91 if (_debugPrint != NULL) {
92 _debugPrint->print(str.c_str());
93 }
94}
95
96
97void SimpleFOCDebug::println(const StringSumHelper str) {
98 if (_debugPrint != NULL) {
99 _debugPrint->println(str.c_str());
100 }
101}
102
103
104
106 if (_debugPrint != NULL) {
107 _debugPrint->print(val);
108 }
109}
110
111
112void SimpleFOCDebug::print(float val) {
113 if (_debugPrint != NULL) {
114 _debugPrint->print(val);
115 }
116}
117
118
120 if (_debugPrint != NULL) {
121 _debugPrint->println();
122 }
123}
124
125#endif
static Print * _debugPrint
static void print(const char *msg)
static void println()
static void enable(Print *debugPrint=&Serial)