diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2019-12-15 10:55:19 +0200 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2019-12-15 10:55:19 +0200 |
| commit | b9841dece2cc5b8c09d7a67cea07e3cf7725278e (patch) | |
| tree | ed21d6445a73864c92a94695ca2367c7fc863bd2 /Software/Embedded_SW/Embedded/Communication/Connection.c | |
| parent | c1097749b08fb69e8ce5ceb1f2eea2992ac73e5e (diff) | |
| download | Tango-b9841dece2cc5b8c09d7a67cea07e3cf7725278e.tar.gz Tango-b9841dece2cc5b8c09d7a67cea07e3cf7725278e.zip | |
IsAfterReset supported (returns true only on first connection request)
Diffstat (limited to 'Software/Embedded_SW/Embedded/Communication/Connection.c')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Communication/Connection.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Software/Embedded_SW/Embedded/Communication/Connection.c b/Software/Embedded_SW/Embedded/Communication/Connection.c index d92741e01..18f176e64 100644 --- a/Software/Embedded_SW/Embedded/Communication/Connection.c +++ b/Software/Embedded_SW/Embedded/Communication/Connection.c @@ -30,6 +30,7 @@ #include "Modules/AlarmHandling/AlarmHandling.h" #include "Modules/Stubs_Handler/Stub_HW_Version.h" +bool FirstConnection = true; char HexToDecimal(char hex) { int i = hex % 0x10; @@ -44,10 +45,10 @@ void ConnectionRequest(MessageContainer* requestContainer) DeviceInformation DevInfo = DEVICE_INFORMATION__INIT; ConnectResponse response = CONNECT_RESPONSE__INIT; - if (GeneralHwReady == false) + /*if (GeneralHwReady == false) { return; - } + }*/ unsigned char Major = 0; unsigned char Year = 0 ; unsigned char Month = 0; @@ -90,6 +91,9 @@ void ConnectionRequest(MessageContainer* requestContainer) DevInfo.boardrevision = BoardVersion; DevInfo.assemblyversion = AssyVersion; + response.has_isafterreset = true; + response.isafterreset = FirstConnection; + FirstConnection = false; responseContainer = createContainer(MESSAGE_TYPE__ConnectResponse, requestContainer->token, true, &response, &connect_response__pack, &connect_response__get_packed_size); |
