From 8836e34840f4eeb36a03248abf5c29d539933b02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=82=E3=81=8F?= Date: Tue, 2 Feb 2021 19:41:19 +0300 Subject: [PATCH] [FL-831] Update DIS profile: add firmware generation and software version. Stack overflow fixes. (#322) * BLE: prevent stack overflow in hrs thread * BLE: add firmware and software attribute to dis service * BLE: return tx to 0dBm * BLE: update tx power configuration comment to match real value --- firmware/targets/f4/ble-glue/app_conf.h | 4 ++-- firmware/targets/f4/ble-glue/ble_conf.h | 6 +++--- firmware/targets/f4/ble-glue/dis_app.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/firmware/targets/f4/ble-glue/app_conf.h b/firmware/targets/f4/ble-glue/app_conf.h index 43599c06..dc22b4ba 100644 --- a/firmware/targets/f4/ble-glue/app_conf.h +++ b/firmware/targets/f4/ble-glue/app_conf.h @@ -5,7 +5,7 @@ #include "hw_if.h" #include "ble_bufsize.h" -#define CFG_TX_POWER (0x1F) /* +6dBm */ +#define CFG_TX_POWER (0x19) /* +0dBm */ /** * Define Advertising parameters @@ -463,7 +463,7 @@ typedef enum #define CFG_HRS_PROCESS_CB_SIZE (0) #define CFG_HRS_PROCESS_STACK_MEM (0) #define CFG_HRS_PROCESS_PRIORITY osPriorityNone -#define CFG_HRS_PROCESS_STACK_SIZE (128 * 5) +#define CFG_HRS_PROCESS_STACK_SIZE (128 * 8) typedef enum { CFG_LPM_APP, diff --git a/firmware/targets/f4/ble-glue/ble_conf.h b/firmware/targets/f4/ble-glue/ble_conf.h index af08187c..eb034e35 100644 --- a/firmware/targets/f4/ble-glue/ble_conf.h +++ b/firmware/targets/f4/ble-glue/ble_conf.h @@ -61,8 +61,8 @@ #define BLE_CFG_DIS_MODEL_NUMBER_STRING 1 #define BLE_CFG_DIS_SERIAL_NUMBER_STRING 0 #define BLE_CFG_DIS_HARDWARE_REVISION_STRING 0 -#define BLE_CFG_DIS_FIRMWARE_REVISION_STRING 0 -#define BLE_CFG_DIS_SOFTWARE_REVISION_STRING 0 +#define BLE_CFG_DIS_FIRMWARE_REVISION_STRING 1 +#define BLE_CFG_DIS_SOFTWARE_REVISION_STRING 1 #define BLE_CFG_DIS_SYSTEM_ID 0 #define BLE_CFG_DIS_IEEE_CERTIFICATION 0 #define BLE_CFG_DIS_PNP_ID 0 @@ -75,7 +75,7 @@ #define BLE_CFG_DIS_SERIAL_NUMBER_STRING_LEN_MAX (32) #define BLE_CFG_DIS_FIRMWARE_REVISION_STRING_LEN_MAX (32) #define BLE_CFG_DIS_HARDWARE_REVISION_STRING_LEN_MAX (32) -#define BLE_CFG_DIS_SOFTWARE_REVISION_STRING_LEN_MAX (32) +#define BLE_CFG_DIS_SOFTWARE_REVISION_STRING_LEN_MAX (64) #define BLE_CFG_DIS_MANUFACTURER_NAME_STRING_LEN_MAX (32) #define BLE_CFG_DIS_IEEE_CERTIFICATION_LEN_MAX (32) #define BLE_CFG_DIS_PNP_ID_LEN_MAX (7) diff --git a/firmware/targets/f4/ble-glue/dis_app.h b/firmware/targets/f4/ble-glue/dis_app.h index c24fc775..9ae624f1 100644 --- a/firmware/targets/f4/ble-glue/dis_app.h +++ b/firmware/targets/f4/ble-glue/dis_app.h @@ -8,8 +8,8 @@ extern "C" { #define DISAPP_MODEL_NUMBER "FlipperZero" #define DISAPP_SERIAL_NUMBER "1.0" #define DISAPP_HARDWARE_REVISION_NUMBER "1.0" -#define DISAPP_FIRMWARE_REVISION_NUMBER "1.0" -#define DISAPP_SOFTWARE_REVISION_NUMBER "1.0" +#define DISAPP_FIRMWARE_REVISION_NUMBER TARGET +#define DISAPP_SOFTWARE_REVISION_NUMBER GIT_COMMIT " " GIT_BRANCH " " GIT_BRANCH_NUM " " BUILD_DATE #define DISAPP_OUI 0x123456 #define DISAPP_MANUFACTURER_ID 0x9ABCDE