Skip to content

Commit

Permalink
added !log-now quick command
Browse files Browse the repository at this point in the history
  • Loading branch information
gigapod committed Mar 8, 2024
1 parent 34ba2cc commit b8e464e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/relnotes/rn_v010200.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ The following commands are supported:
| !heap | Display the current system heap memory usage |
| !help | List the available quick commands |
| !json-settings | For setting the device settings via a serial connection. When this command is sent, the system expects to receive a JSON settings file |
| !log-now |Perform a log observation event |
| !log-rate | If log rate measurement is enabled, the current log rate is printed |
| !reset-device | Reset the device - erasing any saved settings and restarting the device |
| !reset-device-forced | Reset the device, but without a Y/N prompt |
Expand Down
16 changes: 16 additions & 0 deletions sfeDataLoggerIoT/sfeDLCommands.h
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,22 @@ class sfeDLCommands

return true;
}
//---------------------------------------------------------------------
///
/// @brief log an observation now!
///
/// @param dlApp Pointer to the DataLogger App
/// @retval bool indicates success (true) or failure (!true)
///
bool logObservationNow(sfeDataLogger *dlApp)
{
if (!dlApp)
return false;

dlApp->_logger.logObservation();

return true;
}
//---------------------------------------------------------------------
// our command map - command name to callback method
commandMap_t _commandMap = {
Expand All @@ -420,6 +435,7 @@ class sfeDLCommands
{"json-settings", &sfeDLCommands::loadJSONSettings},
{"log-rate", &sfeDLCommands::logRateStats},
{"log-rate-toggle", &sfeDLCommands::logRateToggle},
{"log-now", &sfeDLCommands::logObservationNow},
{"wifi", &sfeDLCommands::wifiStats},
{"sdcard", &sfeDLCommands::sdCardStats},
{"devices", &sfeDLCommands::listLoadedDevices},
Expand Down

0 comments on commit b8e464e

Please sign in to comment.