-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -19,6 +19,10 @@ Module: Catena4430_cMeasurementLoop_SDcard.cpp | |||||||||||||||
|
||||||||||||||||
#include <Catena_Download.h> | ||||||||||||||||
|
||||||||||||||||
#include <Catena_Fram.h> | ||||||||||||||||
|
||||||||||||||||
#include <Arduino_LoRaWAN_lmic.h> | ||||||||||||||||
|
||||||||||||||||
#include <SD.h> | ||||||||||||||||
#include <mcciadk_baselib.h> | ||||||||||||||||
|
||||||||||||||||
|
@@ -363,6 +367,20 @@ cMeasurementLoop::handleSdFirmwareUpdate( | |||||||||||||||
if (fResult) | ||||||||||||||||
{ | ||||||||||||||||
fResult = this->handleSdFirmwareUpdateCardUp(); | ||||||||||||||||
|
||||||||||||||||
#if ARDUINO_LMIC_CFG_NETWORK_TTN | ||||||||||||||||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong. |
||||||||||||||||
bool fMigrate = this->handleSdTTNv3MigrateCardUp(); | ||||||||||||||||
This comment has been minimized.
Sorry, something went wrong.
terrillmoore
Member
|
case State::stTryToUpdate: | |
if (this->handleSdFirmwareUpdate()) | |
newState = State::stRebootForUpdate; | |
else | |
newState = State::stSleeping; | |
this->handleSdTTNv3Migrate(); | |
break; |
This comment has been minimized.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
This comment has been minimized.
Sorry, something went wrong.
terrillmoore
Jul 2, 2021
Member
This is wrong. It iterates over each character in sMigrate. You don't need a for loop at all.
This comment has been minimized.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
This comment has been minimized.
Sorry, something went wrong.
terrillmoore
Jul 2, 2021
Member
You also need to zero out the devAddr in FRAM. Otherwise if device is reset before the join succeeds, it will forget that it needed to rejoin.
This comment has been minimized.
This comment has been minimized.
Sorry, something went wrong.
There's no need to condition this on TTN. I hate conditional compiles, please don't use them unless absolutely necessary.