AYAB Arduino Firmware 0.95
The goal of the AYAB project is to provide an alternative way to control the famous Brother KH-9xx range of knitting machines using a computer
debug.h
1// debug.h
2/*
3This file is part of AYAB.
4
5 AYAB is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 AYAB is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with AYAB. If not, see <http://www.gnu.org/licenses/>.
17
18 Original Work Copyright 2013 Christian Obersteiner, Andreas Müller
19 Modified Work Copyright 2020 Sturla Lange, Tom Price
20 http://ayab-knitting.com
21*/
22
23#ifndef DEBUG_H_
24#define DEBUG_H_
25
26// #define DEBUG
27
28/*
29 *
30 */
31#ifdef DEBUG
32#define DEBUG_PRINT(str) \
33 Serial.print("#"); \
34 Serial.print(millis()); \
35 Serial.print(": "); \
36 Serial.print(__FUNCTION__); \
37 Serial.print("() in "); \
38 Serial.print(__FILE__); \
39 Serial.print(':'); \
40 Serial.print(__LINE__); \
41 Serial.print(' '); \
42 Serial.println(str);
43#else
44#define DEBUG_PRINT(str)
45#endif
46
47#endif // DEBUG_H_