From fa0c41a4a910873a184e73ca83e9fb23b7c53ce7 Mon Sep 17 00:00:00 2001 From: Shane Aronson Date: Tue, 11 Mar 2025 18:18:55 -0700 Subject: [PATCH 1/9] added a flag for bt and turned it off --- VortexEngine/src/VortexConfig.h | 11 +++++++++++ VortexEngine/src/Wireless/Bluetooth.cpp | 2 +- VortexEngine/src/Wireless/Bluetooth.h | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/VortexEngine/src/VortexConfig.h b/VortexEngine/src/VortexConfig.h index 3752490f21..2e0a5adeaf 100644 --- a/VortexEngine/src/VortexConfig.h +++ b/VortexEngine/src/VortexConfig.h @@ -316,6 +316,11 @@ // The serial connection baud rate for the editor and anything else serial #define SERIAL_BAUD_RATE 115200 +// Enable Bluetooth +// +// Turn this on to enable Bluetooth functionality +#define BLUETOOTH_ENABLE == 0 + // Bluetooth Broadcast Time // // The number of seconds after startup the Bluetooth module will broadcast @@ -591,6 +596,12 @@ #undef VORTEX_SLIM #define VORTEX_SLIM 0 +// This only allows Bluetooth to be enabled on embedded platforms +#ifndef VORTEX_EMBEDDED +#undef BLUETOOTH_ENABLED +#endif + + // The test framework needs brighter menu colors can't really see them on the screen #undef RGB_MENU_RANDOMIZER #undef RGB_MENU_MODE_SHARING diff --git a/VortexEngine/src/Wireless/Bluetooth.cpp b/VortexEngine/src/Wireless/Bluetooth.cpp index 9809bed129..ae8d42aeff 100644 --- a/VortexEngine/src/Wireless/Bluetooth.cpp +++ b/VortexEngine/src/Wireless/Bluetooth.cpp @@ -12,7 +12,7 @@ bool Bluetooth::m_bleConnected = false; ByteStream Bluetooth::receivedData; // We'll track whether an indication is currently in progress: -#if VORTEX_EMBEDDED == 1 +#if BLUETOOTH_ENABLED == 1 static volatile bool m_isIndicationInProgress = false; // Forward-declare the BLE objects diff --git a/VortexEngine/src/Wireless/Bluetooth.h b/VortexEngine/src/Wireless/Bluetooth.h index 353fe2b7d6..2b1d1e1a73 100644 --- a/VortexEngine/src/Wireless/Bluetooth.h +++ b/VortexEngine/src/Wireless/Bluetooth.h @@ -3,7 +3,7 @@ #include "../VortexConfig.h" -#if VORTEX_EMBEDDED == 1 +#if BLUETOOTH_ENABLED == 1 #include #include #include From 201a9d423022bcedf6b0a62bd4951f58293e36d5 Mon Sep 17 00:00:00 2001 From: Shane Aronson Date: Tue, 11 Mar 2025 18:21:36 -0700 Subject: [PATCH 2/9] removed extra space --- VortexEngine/src/VortexConfig.h | 1 - 1 file changed, 1 deletion(-) diff --git a/VortexEngine/src/VortexConfig.h b/VortexEngine/src/VortexConfig.h index 2e0a5adeaf..05135c639d 100644 --- a/VortexEngine/src/VortexConfig.h +++ b/VortexEngine/src/VortexConfig.h @@ -601,7 +601,6 @@ #undef BLUETOOTH_ENABLED #endif - // The test framework needs brighter menu colors can't really see them on the screen #undef RGB_MENU_RANDOMIZER #undef RGB_MENU_MODE_SHARING From cd953cb21711538805088b90028a0a16f211e061 Mon Sep 17 00:00:00 2001 From: Shane Aronson Date: Tue, 11 Mar 2025 18:31:35 -0700 Subject: [PATCH 3/9] typo --- VortexEngine/src/VortexConfig.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VortexEngine/src/VortexConfig.h b/VortexEngine/src/VortexConfig.h index 05135c639d..e927407d53 100644 --- a/VortexEngine/src/VortexConfig.h +++ b/VortexEngine/src/VortexConfig.h @@ -319,7 +319,7 @@ // Enable Bluetooth // // Turn this on to enable Bluetooth functionality -#define BLUETOOTH_ENABLE == 0 +#define BLUETOOTH_ENABLE = 0 // Bluetooth Broadcast Time // From cefed3041974d1c5c2eccaa79caa508821c58221 Mon Sep 17 00:00:00 2001 From: Shane Aronson Date: Tue, 11 Mar 2025 18:34:16 -0700 Subject: [PATCH 4/9] missed a spot --- VortexEngine/src/Wireless/Bluetooth.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/VortexEngine/src/Wireless/Bluetooth.cpp b/VortexEngine/src/Wireless/Bluetooth.cpp index ae8d42aeff..d712d3e302 100644 --- a/VortexEngine/src/Wireless/Bluetooth.cpp +++ b/VortexEngine/src/Wireless/Bluetooth.cpp @@ -67,7 +67,7 @@ class IndicationConfirmCallbacks : public BLECharacteristicCallbacks bool Bluetooth::init() { -#if VORTEX_EMBEDDED == 1 +#if BLUETOOTH_ENABLED == 1 BLEDevice::init(BLUETOOTH_BROADCAST_NAME); // Request a higher MTU, but actual negotiation may differ BLEDevice::setMTU(1024); @@ -115,7 +115,7 @@ bool Bluetooth::init() void Bluetooth::cleanup() { -#if VORTEX_EMBEDDED == 1 +#if BLUETOOTH_ENABLED == 1 if (pServer != nullptr) { BLEDevice::deinit(true); pServer = nullptr; @@ -128,7 +128,7 @@ void Bluetooth::cleanup() bool Bluetooth::isInitialized() { -#if VORTEX_EMBEDDED == 1 +#if BLUETOOTH_ENABLED == 1 if (pServer != nullptr) { return true; } @@ -149,7 +149,7 @@ bool Bluetooth::checkBluetooth() // Write a formatted string with Indicate, waiting for confirmation. void Bluetooth::write(const char *msg, ...) { -#if VORTEX_EMBEDDED == 1 +#if BLUETOOTH_ENABLED == 1 if (!isConnected()) return; char buffer[512]; @@ -177,7 +177,7 @@ void Bluetooth::write(const char *msg, ...) // Write a ByteStream with Indicate, waiting for confirmation. void Bluetooth::write(ByteStream &byteStream) { -#if VORTEX_EMBEDDED == 1 +#if BLUETOOTH_ENABLED == 1 if (!isConnected()) return; byteStream.recalcCRC(); From 2aaf6a302e5a5036e2ab9b51c0ceeef9e9e7ab70 Mon Sep 17 00:00:00 2001 From: Shane Aronson Date: Tue, 11 Mar 2025 18:39:02 -0700 Subject: [PATCH 5/9] typo --- VortexEngine/src/VortexConfig.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VortexEngine/src/VortexConfig.h b/VortexEngine/src/VortexConfig.h index e927407d53..55109c8580 100644 --- a/VortexEngine/src/VortexConfig.h +++ b/VortexEngine/src/VortexConfig.h @@ -319,7 +319,7 @@ // Enable Bluetooth // // Turn this on to enable Bluetooth functionality -#define BLUETOOTH_ENABLE = 0 +#define BLUETOOTH_ENABLE 0 // Bluetooth Broadcast Time // From 1d242033827ecd179f27db08c04ce2bd3d68e5cd Mon Sep 17 00:00:00 2001 From: Shane Aronson Date: Tue, 11 Mar 2025 18:57:40 -0700 Subject: [PATCH 6/9] more typos --- VortexEngine/src/Wireless/Bluetooth.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/VortexEngine/src/Wireless/Bluetooth.cpp b/VortexEngine/src/Wireless/Bluetooth.cpp index d712d3e302..22fbbe4401 100644 --- a/VortexEngine/src/Wireless/Bluetooth.cpp +++ b/VortexEngine/src/Wireless/Bluetooth.cpp @@ -12,7 +12,7 @@ bool Bluetooth::m_bleConnected = false; ByteStream Bluetooth::receivedData; // We'll track whether an indication is currently in progress: -#if BLUETOOTH_ENABLED == 1 +#if BLUETOOTH_ENABLE == 1 static volatile bool m_isIndicationInProgress = false; // Forward-declare the BLE objects @@ -67,7 +67,7 @@ class IndicationConfirmCallbacks : public BLECharacteristicCallbacks bool Bluetooth::init() { -#if BLUETOOTH_ENABLED == 1 +#if BLUETOOTH_ENABLE == 1 BLEDevice::init(BLUETOOTH_BROADCAST_NAME); // Request a higher MTU, but actual negotiation may differ BLEDevice::setMTU(1024); @@ -115,7 +115,7 @@ bool Bluetooth::init() void Bluetooth::cleanup() { -#if BLUETOOTH_ENABLED == 1 +#if BLUETOOTH_ENABLE == 1 if (pServer != nullptr) { BLEDevice::deinit(true); pServer = nullptr; @@ -128,7 +128,7 @@ void Bluetooth::cleanup() bool Bluetooth::isInitialized() { -#if BLUETOOTH_ENABLED == 1 +#if BLUETOOTH_ENABLE == 1 if (pServer != nullptr) { return true; } @@ -149,7 +149,7 @@ bool Bluetooth::checkBluetooth() // Write a formatted string with Indicate, waiting for confirmation. void Bluetooth::write(const char *msg, ...) { -#if BLUETOOTH_ENABLED == 1 +#if BLUETOOTH_ENABLE == 1 if (!isConnected()) return; char buffer[512]; @@ -177,7 +177,7 @@ void Bluetooth::write(const char *msg, ...) // Write a ByteStream with Indicate, waiting for confirmation. void Bluetooth::write(ByteStream &byteStream) { -#if BLUETOOTH_ENABLED == 1 +#if BLUETOOTH_ENABLE == 1 if (!isConnected()) return; byteStream.recalcCRC(); From f0e81b0f98aeed1f826a0e034849d1677c21bca3 Mon Sep 17 00:00:00 2001 From: Shane Aronson Date: Tue, 11 Mar 2025 19:05:34 -0700 Subject: [PATCH 7/9] still typos --- VortexEngine/src/Wireless/Bluetooth.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VortexEngine/src/Wireless/Bluetooth.h b/VortexEngine/src/Wireless/Bluetooth.h index 2b1d1e1a73..cf0e9439ba 100644 --- a/VortexEngine/src/Wireless/Bluetooth.h +++ b/VortexEngine/src/Wireless/Bluetooth.h @@ -3,7 +3,7 @@ #include "../VortexConfig.h" -#if BLUETOOTH_ENABLED == 1 +#if BLUETOOTH_ENABLE == 1 #include #include #include From 932a7db2a034f18663a790031b5a5fe835f433f1 Mon Sep 17 00:00:00 2001 From: Shane Aronson Date: Tue, 11 Mar 2025 19:13:22 -0700 Subject: [PATCH 8/9] More typos --- VortexEngine/src/VortexConfig.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VortexEngine/src/VortexConfig.h b/VortexEngine/src/VortexConfig.h index 55109c8580..93ce83e655 100644 --- a/VortexEngine/src/VortexConfig.h +++ b/VortexEngine/src/VortexConfig.h @@ -598,7 +598,7 @@ // This only allows Bluetooth to be enabled on embedded platforms #ifndef VORTEX_EMBEDDED -#undef BLUETOOTH_ENABLED +#undef BLUETOOTH_ENABLE #endif // The test framework needs brighter menu colors can't really see them on the screen From 45f72f81528b1eda12ac1ef3c1e42d9732c42841 Mon Sep 17 00:00:00 2001 From: Dan Date: Tue, 11 Mar 2025 19:27:45 -0700 Subject: [PATCH 9/9] last one --- VortexEngine/src/Wireless/Bluetooth.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VortexEngine/src/Wireless/Bluetooth.h b/VortexEngine/src/Wireless/Bluetooth.h index cf0e9439ba..a57645ac91 100644 --- a/VortexEngine/src/Wireless/Bluetooth.h +++ b/VortexEngine/src/Wireless/Bluetooth.h @@ -30,7 +30,7 @@ class Bluetooth { static bool dataReady(); -#if VORTEX_EMBEDDED == 1 +#if BLUETOOTH_ENABLE == 1 static BLEServer* pServer; static BLECharacteristic* writeChar; static BLECharacteristic* notifyChar;