aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Common/SWUpdate/FirmwareUpgrade.c
diff options
context:
space:
mode:
authorAvi Levkovich <avi@twine-s.com>2021-01-06 14:13:07 +0200
committerAvi Levkovich <avi@twine-s.com>2021-01-06 14:13:07 +0200
commitfd8f317b9843a6928c24cb2a034afbfa451fd375 (patch)
tree7cea3fa4aff3b39db370fcf3a9d8a7d4c77617a6 /Software/Embedded_SW/Embedded/Common/SWUpdate/FirmwareUpgrade.c
parent776a9559dd92dc274bdc4473c5933842871e8f18 (diff)
parent9be5ed60495bb13a6699b82a9dc6c10a2fb83c8e (diff)
downloadTango-fd8f317b9843a6928c24cb2a034afbfa451fd375.tar.gz
Tango-fd8f317b9843a6928c24cb2a034afbfa451fd375.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Embedded_SW/Embedded/Common/SWUpdate/FirmwareUpgrade.c')
-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;