Skip to content

Commit df7ac0c

Browse files
committed
Fixed parameter error in OBSERVE().
1 parent bd0dce1 commit df7ac0c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Debug.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ class Debug : public Stream {
370370
* Print the given expression to the debug stream.
371371
* @param[in] expr expression.
372372
*/
373-
#define OBSERVE(expr) OBSERVE_IF(expr,true)
373+
#define OBSERVE(expr) OBSERVE_IF(true,expr)
374374

375375
/**
376376
* Register the given variable in the debug handler. The debug handler

examples/DebugDemo/DebugDemo.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
#include <Debug.h>
4747

4848
// Define to allow debug shell on Serial1 (Arduino Mega2560)
49-
#define USE_SERIAL1
49+
// #define USE_SERIAL1
5050

5151
namespace A {
5252

@@ -80,6 +80,7 @@ namespace A {
8080
{
8181
REGISTER(i);
8282
CHECK_STACK();
83+
OBSERVE(i);
8384
if (i > 0) return (e(i - 1) * i);
8485
return (1);
8586
}
@@ -148,4 +149,3 @@ void loop()
148149
// Keep up with the user
149150
delay(500);
150151
}
151-

0 commit comments

Comments
 (0)