From 37988fbfd454f9df9967ad86cee8c54a9bec7f52 Mon Sep 17 00:00:00 2001
From: Robin Mueller <muellerr@irs.uni-stuttgart.de>
Date: Wed, 8 Feb 2023 11:17:08 +0100
Subject: [PATCH] complete impl

---
 bsp_q7s/core/CoreController.cpp | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/bsp_q7s/core/CoreController.cpp b/bsp_q7s/core/CoreController.cpp
index 50c662d7..d892bc74 100644
--- a/bsp_q7s/core/CoreController.cpp
+++ b/bsp_q7s/core/CoreController.cpp
@@ -180,8 +180,20 @@ ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_
                                             const uint8_t *data, size_t size) {
   switch (actionId) {
     case (ANNOUNCE_VERSION): {
-      // uint32_t p1=
-      triggerEvent(VERSION_INFO);
+      uint32_t p1 = (common::OBSW_VERSION_MAJOR << 24) | (common::OBSW_VERSION_MINOR << 16) |
+                    (common::OBSW_VERSION_REVISION << 8);
+      uint32_t p2 = 0;
+      if (strcmp("", common::OBSW_VERSION_CST_GIT_SHA1) != 0) {
+        p1 |= 1;
+        // Only copy first 4 letters of git hash
+        memcpy(&p2, common::OBSW_VERSION_CST_GIT_SHA1 + 3, 4);
+      }
+
+      triggerEvent(VERSION_INFO, p1, p2);
+      return HasActionsIF::EXECUTION_FINISHED;
+    }
+    case (ANNOUNCE_CURRENT_IMAGE): {
+      triggerEvent(CURRENT_IMAGE_INFO, CURRENT_CHIP, CURRENT_COPY);
       return HasActionsIF::EXECUTION_FINISHED;
     }
     case (LIST_DIRECTORY_INTO_FILE): {