aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Communication/Connection.c
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Embedded_SW/Embedded/Communication/Connection.c')
-rw-r--r--Software/Embedded_SW/Embedded/Communication/Connection.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/Software/Embedded_SW/Embedded/Communication/Connection.c b/Software/Embedded_SW/Embedded/Communication/Connection.c
index 579b429ee..b01750529 100644
--- a/Software/Embedded_SW/Embedded/Communication/Connection.c
+++ b/Software/Embedded_SW/Embedded/Communication/Connection.c
@@ -18,12 +18,14 @@
#include "Common/SW_Info/SW_Info.h"
#include "Common/report/report.h"
#include <utils/ustdlib.h>
+#include "drivers/FPGA/FPGA.h"
#include "StateMachines/Printing/PrintingSTM.h"
#include "Modules/heaters/heaters_ex.h"
#include "modules/Diagnostics/Diagnostics.h"
#include "Modules/AlarmHandling/AlarmHandling.h"
+#include "Modules/Stubs_Handler/Stub_HW_Version.h"
void ConnectionRequest(MessageContainer* requestContainer)
@@ -34,7 +36,17 @@ void ConnectionRequest(MessageContainer* requestContainer)
DeviceInformation DevInfo = DEVICE_INFORMATION__INIT;
ConnectResponse response = CONNECT_RESPONSE__INIT;
+ unsigned char Major = 0;
+ unsigned char Year = 0 ;
+ unsigned char Month = 0;
+ unsigned char Day = 0;
+
char Version[20] = {0};
+ char FPGA1Version[20] = {0};
+ char FPGA2Version[20] = {0};
+ char FPGA3Version[20] = {0};
+ char BoardVersion[20] = {0};
+ char AssyVersion[20] = {0};
response.deviceinformation = &DevInfo;
/*
extern TangoVersion_t _gTangoVersion;
@@ -46,6 +58,25 @@ void ConnectionRequest(MessageContainer* requestContainer)
usnprintf(Version, 20, "%d.%d.%d.%d",_gTangoVersion.m_major,_gTangoVersion.m_minor,_gTangoVersion.m_patch,_gTangoVersion.m_build);
DevInfo.version = Version;
+ FPGA_ReadVersion(0, &Major, &Year, &Month, &Day);
+ usnprintf(FPGA1Version, 20, "%d.%d.%d.%d",Major,Year, Month, Day);
+ DevInfo.fpga1version = FPGA1Version;
+
+ FPGA_ReadVersion(1, &Major, &Year, &Month, &Day);
+ usnprintf(FPGA2Version, 20, "%d.%d.%d.%d",Major,Year, Month, Day);
+ DevInfo.fpga2version = FPGA2Version;
+
+ FPGA_ReadVersion(2, &Major, &Year, &Month, &Day);
+ usnprintf(FPGA3Version, 20, "%d.%d.%d.%d",Major,Year, Month, Day);
+ DevInfo.fpga3version = FPGA3Version;
+
+ Read_HW_Version(BoardVersion, AssyVersion);
+
+ DevInfo.boardrevision = BoardVersion;
+ DevInfo.assemblyversion = AssyVersion;
+
+
+
responseContainer = createContainer(MESSAGE_TYPE__ConnectResponse, requestContainer->token, true, &response, &connect_response__pack, &connect_response__get_packed_size);
//-------------------------------------------------------------------------------------------