aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Common/SWUpdate
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2021-01-05 13:18:52 +0200
committerShlomo Hecht <shlomo@twine-s.com>2021-01-05 13:18:52 +0200
commit8f59ef6ef5aa1c4f9d5fc19fc26df4b92fe5662c (patch)
tree3a36866252498281b11fad577011f59c4e7e3cf4 /Software/Embedded_SW/Embedded/Common/SWUpdate
parent13f07d2e0c0543a76f44fbaa4b4016f267a72808 (diff)
downloadTango-8f59ef6ef5aa1c4f9d5fc19fc26df4b92fe5662c.tar.gz
Tango-8f59ef6ef5aa1c4f9d5fc19fc26df4b92fe5662c.zip
PBU in pre-run preparations
Diffstat (limited to 'Software/Embedded_SW/Embedded/Common/SWUpdate')
-rw-r--r--Software/Embedded_SW/Embedded/Common/SWUpdate/FirmwareUpgrade.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Software/Embedded_SW/Embedded/Common/SWUpdate/FirmwareUpgrade.c b/Software/Embedded_SW/Embedded/Common/SWUpdate/FirmwareUpgrade.c
index a404ca8ee..64c5dd9a2 100644
--- a/Software/Embedded_SW/Embedded/Common/SWUpdate/FirmwareUpgrade.c
+++ b/Software/Embedded_SW/Embedded/Common/SWUpdate/FirmwareUpgrade.c
@@ -56,6 +56,7 @@ uint32_t ActivateVersionCallBackFunction(uint32_t IfIndex, uint32_t BusyFlag)
ActivateVersionResponse response = ACTIVATE_VERSION_RESPONSE__INIT;
MessageContainer responseContainer;
bool last = true;
+ double file_progress = (double)vme_index/CurrentFileSize;
if (CurrentRunningFile<NumberOfFiles)
{
@@ -63,7 +64,7 @@ uint32_t ActivateVersionCallBackFunction(uint32_t IfIndex, uint32_t BusyFlag)
}
response.has_progress = true;
response.has_total = true;
- response.progress = CurrentRunningFile+(vme_index/CurrentFileSize);
+ response.progress = CurrentRunningFile+file_progress;
response.total = NumberOfFiles;