Skip to content

Commit 39ad385

Browse files
committed
added command to toggle verbose output
1 parent be73880 commit 39ad385

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

sfeIoTNodeLoRaWAN/sfeNLCommands.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,21 @@ class sfeNLCommands
382382

383383
flxLog_I("Device ID: %s", flux.deviceId());
384384

385+
return true;
386+
} //---------------------------------------------------------------------
387+
///
388+
/// @brief Toggle verbose output
389+
///
390+
/// @param theApp Pointer to the DataLogger App
391+
/// @retval bool indicates success (true) or failure (!true)
392+
///
393+
bool toggleVerboseOutput(sfeIoTNodeLoRaWAN *theApp)
394+
{
395+
396+
if (theApp)
397+
theApp->set_verbose(!theApp->get_verbose());
398+
flxLog_I("Verbose Output %s", theApp->get_verbose() ? "Enabled" : "Disabled");
399+
385400
return true;
386401
}
387402

@@ -404,6 +419,7 @@ class sfeNLCommands
404419
{"heap", &sfeNLCommands::heapStatus},
405420
{"systime", &sfeNLCommands::outputSystemTime},
406421
{"uptime", &sfeNLCommands::outputUpTime},
422+
{"verbose", &sfeNLCommands::toggleVerboseOutput},
407423
{"device-id", &sfeNLCommands::printDeviceID},
408424
{"version", &sfeNLCommands::printVersion},
409425
{"about", &sfeNLCommands::aboutDevice},

0 commit comments

Comments
 (0)