Uploading state of firmware update to firebase impossible? #482
rbovenkampclearict
started this conversation in
General
Replies: 1 comment
-
It's not possible if you are using the same You should use different Delay should be removed from your download callback function because it blocks other codes to run, and you should not call any function in the callback function to avoid stack overflow. You should store FCS_DownloadStatusInfo in your global variable and calling FCS_DownloadStatusInfo downloadInfo;
void fcsDownloadCallback(FCS_DownloadStatusInfo info)
{
downloadInfo.status = info.status;
downloadInfo.progress = info.progress;
downloadInfo.errorMsg = info.errorMsg;
downloadInfo.elapsedTime = info.elapsedTime;
if (info.status == fb_esp_fcs_upload_status_init)
{
downloadInfo.remoteFileName = info.remoteFileName;
downloadInfo.localFileName = info.localFileName;
downloadInfo.fileSize = info.fileSize;
}
}
loop()
{
if (downloadInfo.status == fb_esp_fcs_upload_status_complete)
{
std::string statusMessage = std::string("Completed") + std::string(" (") + std::string(downloadInfo.remoteFileName.c_str()) + std::string(") ") +
std::to_string(downloadInfo.fileSize);
Serial.println(statusMessage.c_str());
// Local fbdo
FirebaseData fbdo_local;
Firebase.RTDB.setString(&fbdo_local, "/update/download status", statusMessage.c_str());
}
// Other Filebase code here that calling Firebase.ready()
}
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to upload the state of the firmware update to firebase, but it seems impossible? Or am I missing something? I can see the serial line but nothing is uploaded to firebase.
Beta Was this translation helpful? Give feedback.
All reactions