aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Common/SWUpdate
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2020-08-30 20:29:58 +0300
committerShlomo Hecht <shlomo@twine-s.com>2020-08-30 20:29:58 +0300
commitd4ae04f8922ce04c1dbaf375176677a91afba386 (patch)
tree61f909f8894cb747dcfb9b9045835af357bfb819 /Software/Embedded_SW/Embedded/Common/SWUpdate
parentb76f8564a5fc2904c8de299e1650b41af40a49ae (diff)
downloadTango-d4ae04f8922ce04c1dbaf375176677a91afba386.tar.gz
Tango-d4ae04f8922ce04c1dbaf375176677a91afba386.zip
improve firmware activation, diagnostics, job end reasons according to the new PROTOBUF
Diffstat (limited to 'Software/Embedded_SW/Embedded/Common/SWUpdate')
-rw-r--r--Software/Embedded_SW/Embedded/Common/SWUpdate/FirmwareUpgrade.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/Software/Embedded_SW/Embedded/Common/SWUpdate/FirmwareUpgrade.c b/Software/Embedded_SW/Embedded/Common/SWUpdate/FirmwareUpgrade.c
index 3a1a4ab83..dbbe47ddb 100644
--- a/Software/Embedded_SW/Embedded/Common/SWUpdate/FirmwareUpgrade.c
+++ b/Software/Embedded_SW/Embedded/Common/SWUpdate/FirmwareUpgrade.c
@@ -60,8 +60,14 @@ uint32_t ActivateVersionCallBackFunction(uint32_t IfIndex, uint32_t BusyFlag)
{
last = false;
}
+ response.has_progress = true;
+ response.has_total = true;
+ response.progress = CurrentRunningFile+(vme_index/CurrentFileSize);
+ response.total = NumberOfFiles;
- usnprintf(activateString, 1000, "file %d of %d bytes %d of %d last %d",CurrentRunningFile+1,NumberOfFiles,vme_index,CurrentFileSize,last);
+
+ usnprintf(activateString, 1000, "file %d of %d bytes %d of %d last %d progress*1000 %d",
+ CurrentRunningFile+1,NumberOfFiles,vme_index,CurrentFileSize,last,(int)(response.progress*1000));
Report(activateString,__FILE__,__LINE__,(int)CurrentRunningFile,RpWarning,CurrentFileSize,0);
@@ -196,6 +202,11 @@ uint32_t ActivateVersionRequestFunc(MessageContainer* requestContainer)
}
}
}
+ response.has_progress = true;
+ response.has_total = true;
+ response.progress = CurrentRunningFile;
+ response.total = NumberOfFiles;
+ Report("Activate Version Request progress",__FILE__,__LINE__,(int)NumberOfFiles,RpWarning,CurrentRunningFile,0);
responseContainer = createContainer(MESSAGE_TYPE__ActivateVersionResponse, requestContainer->token, false, &response, &activate_version_response__pack, &activate_version_response__get_packed_size);
responseContainer.has_continuous = true;
responseContainer.continuous = true;