From 11bad84ce7a44c9d2ef0141459a2dc175e5b671a Mon Sep 17 00:00:00 2001 From: Vladimir Date: Fri, 24 Mar 2023 01:15:05 -0700 Subject: [PATCH] Add FW version to BLE characteristic (#1633) Implements #1610 --- source/Core/BSP/Pinecilv2/ble_handlers.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/Core/BSP/Pinecilv2/ble_handlers.cpp b/source/Core/BSP/Pinecilv2/ble_handlers.cpp index ad2c3fe8..2f7f2518 100644 --- a/source/Core/BSP/Pinecilv2/ble_handlers.cpp +++ b/source/Core/BSP/Pinecilv2/ble_handlers.cpp @@ -27,6 +27,7 @@ #include "ble_handlers.h" #include "pd.h" #include "power.hpp" +#include "../../version.h" #if POW_PD #include "USBPD.h" #include "pd.h" @@ -176,9 +177,9 @@ int ble_char_read_bulk_value_callback(struct bt_conn *conn, const struct bt_gatt // TODO: Need to store non-encoded version break; case 3: - // Build - // TODO: Need to store non-encoded version - break; + // FW Version + memcpy(buf, &BUILD_VERSION, sizeof(BUILD_VERSION) - 1); + return sizeof(BUILD_VERSION) - 1; case 4: // Device unique id {