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