-
Notifications
You must be signed in to change notification settings - Fork 719
Expand file tree
/
Copy pathSimpleFOCDebug.cpp
More file actions
135 lines (101 loc) · 2.54 KB
/
Copy pathSimpleFOCDebug.cpp
File metadata and controls
135 lines (101 loc) · 2.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
#include "SimpleFOCDebug.h"
#ifndef SIMPLEFOC_DISABLE_DEBUG
Print* SimpleFOCDebug::_debugPrint = NULL;
void SimpleFOCDebug::enable(Print* debugPrint) {
_debugPrint = debugPrint;
}
void SimpleFOCDebug::println(int val) {
if (_debugPrint != NULL) {
_debugPrint->println(val);
}
}
void SimpleFOCDebug::println(float val) {
if (_debugPrint != NULL) {
_debugPrint->println(val);
}
}
void SimpleFOCDebug::println(const char* str) {
if (_debugPrint != NULL) {
_debugPrint->println(str);
}
}
void SimpleFOCDebug::println(const __FlashStringHelper* str) {
if (_debugPrint != NULL) {
_debugPrint->println(str);
}
}
void SimpleFOCDebug::println(const char* str, float val) {
if (_debugPrint != NULL) {
_debugPrint->print(str);
_debugPrint->println(val);
}
}
void SimpleFOCDebug::println(const __FlashStringHelper* str, float val) {
if (_debugPrint != NULL) {
_debugPrint->print(str);
_debugPrint->println(val);
}
}
void SimpleFOCDebug::println(const char* str, int val) {
if (_debugPrint != NULL) {
_debugPrint->print(str);
_debugPrint->println(val);
}
}
void SimpleFOCDebug::println(const char* str, char val) {
if (_debugPrint != NULL) {
_debugPrint->print(str);
_debugPrint->println(val);
}
}
void SimpleFOCDebug::println(const __FlashStringHelper* str, int val) {
if (_debugPrint != NULL) {
_debugPrint->print(str);
_debugPrint->println(val);
}
}
void SimpleFOCDebug::print(const char* str) {
if (_debugPrint != NULL) {
_debugPrint->print(str);
}
}
void SimpleFOCDebug::print(const __FlashStringHelper* str) {
if (_debugPrint != NULL) {
_debugPrint->print(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) {
_debugPrint->print(val);
}
}
void SimpleFOCDebug::print(float val) {
if (_debugPrint != NULL) {
_debugPrint->print(val);
}
}
void SimpleFOCDebug::println() {
if (_debugPrint != NULL) {
_debugPrint->println();
}
}
void SimpleFOCDebug::printf(const char* msg, ...)
{
va_list ap;
va_start(ap, msg);
if (_debugPrint != NULL) {
_debugPrint->vprintf(msg, ap);
}
va_end(ap);
}
#endif