diff --git a/firmware/firmware.cpp b/firmware/firmware.cpp index 2df62cb8..943d46b2 100644 --- a/firmware/firmware.cpp +++ b/firmware/firmware.cpp @@ -1,4 +1,4 @@ -#include "openhaptics.h" +#include "senseshift.h" #if defined(ARDUINO) #include @@ -19,7 +19,7 @@ extern void loopMode(); #if defined(ARDUINO) -OpenHaptics App; +SenseShift App; void setup() { setupMode(); diff --git a/firmware/mode_configs/bhaptics/tactal.cpp b/firmware/mode_configs/bhaptics/tactal.cpp index ac092980..455ee48b 100644 --- a/firmware/mode_configs/bhaptics/tactal.cpp +++ b/firmware/mode_configs/bhaptics/tactal.cpp @@ -4,7 +4,7 @@ #include #include -#include "openhaptics.h" +#include "senseshift.h" #include #include @@ -17,8 +17,8 @@ using namespace OH; using namespace BH; -extern OpenHaptics App; -OpenHaptics* app = &App; +extern SenseShift App; +SenseShift* app = &App; static const size_t bhLayoutSize = BH_LAYOUT_TACTAL_SIZE; static const oh_output_point_t* bhLayout[bhLayoutSize] = BH_LAYOUT_TACTAL; diff --git a/firmware/mode_configs/bhaptics/tactglove.cpp b/firmware/mode_configs/bhaptics/tactglove.cpp index 505f07b6..7a432873 100644 --- a/firmware/mode_configs/bhaptics/tactglove.cpp +++ b/firmware/mode_configs/bhaptics/tactglove.cpp @@ -6,7 +6,7 @@ #include -#include "openhaptics.h" +#include "senseshift.h" #include #include @@ -19,8 +19,8 @@ using namespace OH; using namespace BH; -extern OpenHaptics App; -OpenHaptics* app = &App; +extern SenseShift App; +SenseShift* app = &App; #pragma region bHaptics_trash diff --git a/firmware/mode_configs/bhaptics/tactosy2.cpp b/firmware/mode_configs/bhaptics/tactosy2.cpp index ab09e472..d14fe802 100644 --- a/firmware/mode_configs/bhaptics/tactosy2.cpp +++ b/firmware/mode_configs/bhaptics/tactosy2.cpp @@ -4,7 +4,7 @@ #include #include -#include "openhaptics.h" +#include "senseshift.h" #include #include @@ -17,8 +17,8 @@ using namespace OH; using namespace BH; -extern OpenHaptics App; -OpenHaptics* app = &App; +extern SenseShift App; +SenseShift* app = &App; static const size_t bhLayoutSize = BH_LAYOUT_TACTOSY2_SIZE; static const oh_output_point_t* bhLayout[bhLayoutSize] = BH_LAYOUT_TACTOSY2; diff --git a/firmware/mode_configs/bhaptics/tactosyf.cpp b/firmware/mode_configs/bhaptics/tactosyf.cpp index 598e2388..677c2bcb 100644 --- a/firmware/mode_configs/bhaptics/tactosyf.cpp +++ b/firmware/mode_configs/bhaptics/tactosyf.cpp @@ -4,7 +4,7 @@ #include #include -#include "openhaptics.h" +#include "senseshift.h" #include #include @@ -17,8 +17,8 @@ using namespace OH; using namespace BH; -extern OpenHaptics App; -OpenHaptics* app = &App; +extern SenseShift App; +SenseShift* app = &App; static const size_t bhLayoutSize = BH_LAYOUT_TACTOSYF_SIZE; static const oh_output_point_t* bhLayout[bhLayoutSize] = BH_LAYOUT_TACTOSYF; diff --git a/firmware/mode_configs/bhaptics/tactosyh.cpp b/firmware/mode_configs/bhaptics/tactosyh.cpp index 9fc03a5b..0d3d00b4 100644 --- a/firmware/mode_configs/bhaptics/tactosyh.cpp +++ b/firmware/mode_configs/bhaptics/tactosyh.cpp @@ -4,7 +4,7 @@ #include #include -#include "openhaptics.h" +#include "senseshift.h" #include #include @@ -17,8 +17,8 @@ using namespace OH; using namespace BH; -extern OpenHaptics App; -OpenHaptics* app = &App; +extern SenseShift App; +SenseShift* app = &App; static const size_t bhLayoutSize = BH_LAYOUT_TACTOSYH_SIZE; static const oh_output_point_t* bhLayout[bhLayoutSize] = BH_LAYOUT_TACTOSYH; diff --git a/firmware/mode_configs/bhaptics/tactsuit_x16.cpp b/firmware/mode_configs/bhaptics/tactsuit_x16.cpp index 980455c7..fa4a5517 100644 --- a/firmware/mode_configs/bhaptics/tactsuit_x16.cpp +++ b/firmware/mode_configs/bhaptics/tactsuit_x16.cpp @@ -4,7 +4,7 @@ #include #include -#include "openhaptics.h" +#include "senseshift.h" #include #include @@ -17,8 +17,8 @@ using namespace OH; using namespace BH; -extern OpenHaptics App; -OpenHaptics* app = &App; +extern SenseShift App; +SenseShift* app = &App; static const oh_output_point_t* bhLayout[] = BH_LAYOUT_TACTSUITX16; static const size_t bhLayoutSize = BH_LAYOUT_TACTSUITX16_SIZE; diff --git a/firmware/mode_configs/bhaptics/tactsuit_x16_pca9685.cpp b/firmware/mode_configs/bhaptics/tactsuit_x16_pca9685.cpp index 295139c7..c465af32 100644 --- a/firmware/mode_configs/bhaptics/tactsuit_x16_pca9685.cpp +++ b/firmware/mode_configs/bhaptics/tactsuit_x16_pca9685.cpp @@ -4,7 +4,7 @@ #include #include -#include "openhaptics.h" +#include "senseshift.h" #include #include @@ -17,8 +17,8 @@ using namespace OH; using namespace BH; -extern OpenHaptics App; -OpenHaptics* app = &App; +extern SenseShift App; +SenseShift* app = &App; static const oh_output_point_t* bhLayout[] = BH_LAYOUT_TACTSUITX16; static const size_t bhLayoutSize = BH_LAYOUT_TACTSUITX16_SIZE; diff --git a/firmware/mode_configs/bhaptics/tactsuit_x40.cpp b/firmware/mode_configs/bhaptics/tactsuit_x40.cpp index b5b316fd..de1754bd 100644 --- a/firmware/mode_configs/bhaptics/tactsuit_x40.cpp +++ b/firmware/mode_configs/bhaptics/tactsuit_x40.cpp @@ -4,7 +4,7 @@ #include #include -#include "openhaptics.h" +#include "senseshift.h" #include #include @@ -18,8 +18,8 @@ using namespace OH; using namespace BH; -extern OpenHaptics App; -OpenHaptics* app = &App; +extern SenseShift App; +SenseShift* app = &App; static const size_t bhLayoutSize = BH_LAYOUT_TACTSUITX40_SIZE; static const oh_output_point_t* bhLayout[bhLayoutSize] = BH_LAYOUT_TACTSUITX40; diff --git a/firmware/mode_configs/test.cpp b/firmware/mode_configs/test.cpp index 602b6d87..0557a986 100644 --- a/firmware/mode_configs/test.cpp +++ b/firmware/mode_configs/test.cpp @@ -7,14 +7,14 @@ #include "Arduino.h" #endif -#include "openhaptics.h" +#include "senseshift.h" #include using namespace OH; -extern OpenHaptics App; -OpenHaptics* app = &App; +extern SenseShift App; +SenseShift* app = &App; class TestOutput : public OH::AbstractActuator { private: diff --git a/firmware/openhaptics.cpp b/firmware/senseshift.cpp similarity index 67% rename from firmware/openhaptics.cpp rename to firmware/senseshift.cpp index 60b2b743..38a95f46 100644 --- a/firmware/openhaptics.cpp +++ b/firmware/senseshift.cpp @@ -1,6 +1,6 @@ #include "config/all.h" -#include "openhaptics.h" +#include "senseshift.h" #ifdef ARDUINO #include @@ -8,11 +8,11 @@ #include -OpenHaptics::OpenHaptics() { +SenseShift::SenseShift() { this->pHapticBody = new OH::HapticBody(); } -void OpenHaptics::postEvent(const OH::IEvent* event) { +void SenseShift::postEvent(const OH::IEvent* event) { log_i("Event dispatched at %u: %s (%p)", millis(), event->eventName.c_str(), event); for (auto* listener : this->eventListeners) { @@ -22,6 +22,6 @@ void OpenHaptics::postEvent(const OH::IEvent* event) { delete event; } -void OpenHaptics::addEventListener(const OH::IEventListener* listener) { +void SenseShift::addEventListener(const OH::IEventListener* listener) { this->eventListeners.push_back(listener); } diff --git a/include/config/bluetooth.h b/include/config/bluetooth.h index 85c8c8f7..737344d5 100644 --- a/include/config/bluetooth.h +++ b/include/config/bluetooth.h @@ -1,14 +1,14 @@ -#pragma once - -#ifndef BLUETOOTH_NAME -#define BLUETOOTH_NAME "OpenHaptics" -#endif - -#ifndef BLUETOOTH_ADDRESS -#define BLUETOOTH_ADDRESS \ - { 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB } -#endif - -#ifndef BLUETOOTH_USE_NIMBLE -#define BLUETOOTH_USE_NIMBLE false -#endif +#pragma once + +#ifndef BLUETOOTH_NAME +#define BLUETOOTH_NAME "SenseShift" +#endif + +#ifndef BLUETOOTH_ADDRESS +#define BLUETOOTH_ADDRESS \ + { 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB } +#endif + +#ifndef BLUETOOTH_USE_NIMBLE +#define BLUETOOTH_USE_NIMBLE false +#endif diff --git a/include/openhaptics.h b/include/senseshift.h similarity index 90% rename from include/openhaptics.h rename to include/senseshift.h index 64c8427d..12b0bf9d 100644 --- a/include/openhaptics.h +++ b/include/senseshift.h @@ -12,7 +12,7 @@ #include -class OpenHaptics final : public OH::IEventDispatcher +class SenseShift final : public OH::IEventDispatcher { private: std::vector eventListeners{}; @@ -23,7 +23,7 @@ class OpenHaptics final : public OH::IEventDispatcher #endif public: - OpenHaptics(); + SenseShift(); OH::HapticBody* getHapticBody() { return this->pHapticBody;