|
1 | 1 | /*
|
2 | 2 | *---------------------------------------------------------------------------------
|
3 | 3 | *
|
4 |
| - * Copyright (c) 2024, SparkFun Electronics Inc. |
| 4 | + * Copyright (c) 2024-2025, SparkFun Electronics Inc. |
5 | 5 | *
|
6 | 6 | * SPDX-License-Identifier: MIT
|
7 | 7 | *
|
@@ -120,31 +120,32 @@ class sfeNLCommands
|
120 | 120 | /// @param theApp Pointer to the DataLogger App
|
121 | 121 | /// @retval bool indicates success (true) or failure (!true)
|
122 | 122 | ///
|
123 |
| - bool loadJSONSettings(sfeIoTNodeLoRaWAN *theApp) |
124 |
| - { |
125 |
| - if (!theApp) |
126 |
| - return false; |
| 123 | + // bool loadJSONSettings(sfeIoTNodeLoRaWAN *theApp) |
| 124 | + // { |
| 125 | + // if (!theApp) |
| 126 | + // return false; |
127 | 127 |
|
128 |
| - flxLog_I(F("Load JSON Settings - Not Implemented")); |
| 128 | + // flxLog_I(F("Load JSON Settings - Not Implemented")); |
129 | 129 |
|
130 |
| - // // Create a JSON prefs serial object and read in the settings |
131 |
| - // flxStorageJSONPrefSerial prefsSerial(flxSettings.fallbackBuffer() > 0 ? flxSettings.fallbackBuffer() : 2000); |
| 130 | + // // // Create a JSON prefs serial object and read in the settings |
| 131 | + // // flxStorageJSONPrefSerial prefsSerial(flxSettings.fallbackBuffer() > 0 ? flxSettings.fallbackBuffer() : |
| 132 | + // 2000); |
132 | 133 |
|
133 |
| - // // restore the settings from serial |
134 |
| - // bool status = flxSettings.restoreObjectFromStorage(&flux, &prefsSerial); |
135 |
| - // if (!status) |
136 |
| - // return false; |
| 134 | + // // // restore the settings from serial |
| 135 | + // // bool status = flxSettings.restoreObjectFromStorage(&flux, &prefsSerial); |
| 136 | + // // if (!status) |
| 137 | + // // return false; |
137 | 138 |
|
138 |
| - // flxLog_I_(F("Settings restored from serial...")); |
| 139 | + // // flxLog_I_(F("Settings restored from serial...")); |
139 | 140 |
|
140 |
| - // // now save the new settings in primary storage |
141 |
| - // status = flxSettings.save(&flux, true); |
142 |
| - // if (status) |
143 |
| - // flxLog_N(F("saved locally")); |
| 141 | + // // // now save the new settings in primary storage |
| 142 | + // // status = flxSettings.save(&flux, true); |
| 143 | + // // if (status) |
| 144 | + // // flxLog_N(F("saved locally")); |
144 | 145 |
|
145 |
| - // return status; |
146 |
| - return true; |
147 |
| - } |
| 146 | + // // return status; |
| 147 | + // return true; |
| 148 | + // } |
148 | 149 | //---------------------------------------------------------------------
|
149 | 150 | ///
|
150 | 151 | /// @brief Saves the current system to preferences/Settings
|
@@ -231,34 +232,35 @@ class sfeNLCommands
|
231 | 232 | /// @param theApp Pointer to the DataLogger App
|
232 | 233 | /// @retval bool indicates success (true) or failure (!true)
|
233 | 234 | ///
|
234 |
| - bool sdCardStats(sfeIoTNodeLoRaWAN *theApp) |
235 |
| - { |
236 |
| - if (!theApp) |
237 |
| - return false; |
| 235 | + // bool sdCardStats(sfeIoTNodeLoRaWAN *theApp) |
| 236 | + // { |
| 237 | + // if (!theApp) |
| 238 | + // return false; |
238 | 239 |
|
239 |
| - flxLog_I(F("SD Stats - Not Implemented")); |
| 240 | + // flxLog_I(F("SD Stats - Not Implemented")); |
240 | 241 |
|
241 |
| - // if (theApp->_theSDCard.enabled()) |
242 |
| - // { |
| 242 | + // // if (theApp->_theSDCard.enabled()) |
| 243 | + // // { |
243 | 244 |
|
244 |
| - // char szSize[32]; |
245 |
| - // char szCap[32]; |
246 |
| - // char szAvail[32]; |
| 245 | + // // char szSize[32]; |
| 246 | + // // char szCap[32]; |
| 247 | + // // char szAvail[32]; |
247 | 248 |
|
248 |
| - // flx_utils::formatByteString(theApp->_theSDCard.size(), 2, szSize, sizeof(szSize)); |
249 |
| - // flx_utils::formatByteString(theApp->_theSDCard.total(), 2, szCap, sizeof(szCap)); |
250 |
| - // flx_utils::formatByteString(theApp->_theSDCard.total() - theApp->_theSDCard.used(), 2, szAvail, |
251 |
| - // sizeof(szAvail)); |
| 249 | + // // flx_utils::formatByteString(theApp->_theSDCard.size(), 2, szSize, sizeof(szSize)); |
| 250 | + // // flx_utils::formatByteString(theApp->_theSDCard.total(), 2, szCap, sizeof(szCap)); |
| 251 | + // // flx_utils::formatByteString(theApp->_theSDCard.total() - theApp->_theSDCard.used(), 2, szAvail, |
| 252 | + // // sizeof(szAvail)); |
252 | 253 |
|
253 |
| - // flxLog_I(F("SD Card - Type: %s Size: %s Capacity: %s Free: %s (%.1f%%)"), theApp->_theSDCard.type(), |
254 |
| - // szSize, |
255 |
| - // szCap, szAvail, 100. - (theApp->_theSDCard.used() / (float)theApp->_theSDCard.total() * 100.)); |
256 |
| - // } |
257 |
| - // else |
258 |
| - // flxLog_I(F("SD card not available")); |
| 254 | + // // flxLog_I(F("SD Card - Type: %s Size: %s Capacity: %s Free: %s (%.1f%%)"), theApp->_theSDCard.type(), |
| 255 | + // // szSize, |
| 256 | + // // szCap, szAvail, 100. - (theApp->_theSDCard.used() / (float)theApp->_theSDCard.total() * |
| 257 | + // 100.)); |
| 258 | + // // } |
| 259 | + // // else |
| 260 | + // // flxLog_I(F("SD card not available")); |
259 | 261 |
|
260 |
| - return true; |
261 |
| - } |
| 262 | + // return true; |
| 263 | + // } |
262 | 264 |
|
263 | 265 | //---------------------------------------------------------------------
|
264 | 266 | ///
|
@@ -427,11 +429,11 @@ class sfeNLCommands
|
427 | 429 | {"clear-settings-forced", &sfeNLCommands::clearDeviceSettingsForced},
|
428 | 430 | {"restart", &sfeNLCommands::restartDevice},
|
429 | 431 | {"restart-forced", &sfeNLCommands::restartDeviceForced},
|
430 |
| - {"json-settings", &sfeNLCommands::loadJSONSettings}, |
| 432 | + // {"json-settings", &sfeNLCommands::loadJSONSettings}, |
431 | 433 | {"log-rate", &sfeNLCommands::logRateStats},
|
432 | 434 | {"log-rate-toggle", &sfeNLCommands::logRateToggle},
|
433 | 435 | {"log-now", &sfeNLCommands::logObservationNow},
|
434 |
| - {"sdcard", &sfeNLCommands::sdCardStats}, |
| 436 | + // {"sdcard", &sfeNLCommands::sdCardStats}, |
435 | 437 | {"devices", &sfeNLCommands::listLoadedDevices},
|
436 | 438 | {"save-settings", &sfeNLCommands::saveSettings},
|
437 | 439 | {"heap", &sfeNLCommands::heapStatus},
|
|
0 commit comments