From 14948255e3558a87c07975cc519104bd081dc8f0 Mon Sep 17 00:00:00 2001 From: "Ben V. Brown" Date: Mon, 23 Jan 2023 17:54:57 +1100 Subject: [PATCH] Create setting entry for BLE --- source/Core/BSP/Pinecilv2/postRTOS.cpp | 5 ++++- source/Core/Inc/Settings.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/source/Core/BSP/Pinecilv2/postRTOS.cpp b/source/Core/BSP/Pinecilv2/postRTOS.cpp index dbd7a433..4b705be6 100644 --- a/source/Core/BSP/Pinecilv2/postRTOS.cpp +++ b/source/Core/BSP/Pinecilv2/postRTOS.cpp @@ -19,7 +19,10 @@ void postRToSInit() { hall_effect_present = Si7210::init(); } #endif - ble_stack_start(); + + if (getSettingValue(SettingsOptions::BLEEnabled)) { + ble_stack_start(); + } } int16_t getRawHallEffect() { if (hall_effect_present) { diff --git a/source/Core/Inc/Settings.h b/source/Core/Inc/Settings.h index a1435650..6667b478 100644 --- a/source/Core/Inc/Settings.h +++ b/source/Core/Inc/Settings.h @@ -51,6 +51,7 @@ enum SettingsOptions { OLEDBrightness = 34, // Brightness for the OLED display LOGOTime = 35, // Duration the logo will be displayed for CalibrateCJC = 36, // Toggle calibrate CJC at next boot + BLEEnabled = 37, // Should BLE hardware be enabled if present // SettingsOptionsLength = 37, //