Skip to content

Commit

Permalink
Fixed LittleFS.begin() for RP2040
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-bs committed Jun 7, 2024
1 parent 1afec0c commit 6b6bc22
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion BresserWeatherSensorLW.ino
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,13 @@ void print_wakeup_reason()
*/
void loadSecrets(uint64_t &joinEUI, uint64_t &devEUI, uint8_t *nwkKey, uint8_t *appKey)
{
if (!LittleFS.begin(true))

if (!LittleFS.begin(
#if defined(ESP32)
// Format the LittleFS partition on error; parameter only available for ESP32
true
#endif
))
{
log_d("Could not initialize LittleFS.");
}
Expand Down Expand Up @@ -895,6 +901,7 @@ void setup()

// Set appStatusUplink flag if required
uint8_t appStatusUplinkInterval = appLayer.getAppStatusUplinkInterval();
log_i("App status uplink interval: %u", appStatusUplinkInterval);
if (appStatusUplinkInterval && (fCntUp % appStatusUplinkInterval == 0))
{
appStatusUplinkPending = true;
Expand Down

0 comments on commit 6b6bc22

Please sign in to comment.