Skip to content

Commit 4b23090

Browse files
committed
output serial info only in debug build
1 parent 545b34a commit 4b23090

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/MCP3x6x/MCP3x6x.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,9 @@ uint8_t MCP3x6x::_getChannel(uint32_t raw) {
297297
int32_t MCP3x6x::analogRead(mux_t ch) {
298298
// MuxMode
299299
if (settings.scan.channel.raw == 0) {
300+
#ifdef MCP3x6x_DEBUG
300301
Serial.println("mux");
302+
#endif
301303
settings.mux = ch;
302304
_status = write(settings.mux);
303305
_status = conversion();
@@ -307,7 +309,9 @@ int32_t MCP3x6x::analogRead(mux_t ch) {
307309
return result.raw[(uint8_t)adcdata.channelid] = adcdata.value;
308310
}
309311

312+
#ifdef MCP3x6x_DEBUG
310313
Serial.println("scan");
314+
#endif
311315
// ScanMode
312316
for (size_t i = 0; i < sizeof(_channelID); i++) {
313317
if (_channelID[i] == ch.raw) {

0 commit comments

Comments
 (0)