custom config added
This commit is contained in:
@@ -3,3 +3,6 @@ venv/
|
||||
model.tflite
|
||||
data/*
|
||||
managed_components/
|
||||
|
||||
# Custom configuration (not version controlled)
|
||||
include/config_custom.h
|
||||
|
||||
+10
-4
@@ -13,11 +13,11 @@
|
||||
// Wand MAC address (set your wand's MAC here)
|
||||
#define WAND_MAC_ADDRESS "C2:BD:5D:3C:67:4E"
|
||||
|
||||
// Home Assistant Integration (set to 0 to disable WiFi/MQTT)
|
||||
#define ENABLE_HOME_ASSISTANT 1 // Re-enabled - model is memory-mapped, plenty of RAM available
|
||||
// Home Assistant Integration (set to 1 to enable WiFi/MQTT)
|
||||
#define ENABLE_HOME_ASSISTANT 0 // Disabled by default - enable in config_custom.h
|
||||
|
||||
// WiFi Mode: 0 = Access Point (default), 1 = Station (connect to existing WiFi)
|
||||
#define USE_WIFI_AP_MODE 0 // Set to 1 for station mode (connect to existing WiFi)
|
||||
// WiFi Mode: 0 = Access Point (default), 1 = Station (connect to existing WiFi for HA)
|
||||
#define USE_WIFI_AP_MODE 0 // 0 = standalone AP mode, 1 = connect to existing WiFi
|
||||
|
||||
// WiFi Access Point Configuration (when USE_WIFI_AP_MODE = 0)
|
||||
#define AP_SSID "MagicWand-ESP32"
|
||||
@@ -54,4 +54,10 @@
|
||||
#define DEBUG_IMU_DATA false
|
||||
#define DEBUG_SPELL_TRACKING true
|
||||
|
||||
// Include custom configuration if it exists (not version controlled)
|
||||
// Copy config_custom.h.example to config_custom.h and customize as needed
|
||||
#if __has_include("config_custom.h")
|
||||
#include "config_custom.h"
|
||||
#endif
|
||||
|
||||
#endif // CONFIG_H
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
#ifndef CONFIG_CUSTOM_H
|
||||
#define CONFIG_CUSTOM_H
|
||||
|
||||
// Custom Configuration Template
|
||||
// Copy this file to config_custom.h and customize as needed
|
||||
// config_custom.h is gitignored and will override default settings
|
||||
|
||||
// Example: Override wand MAC address
|
||||
// #undef WAND_MAC_ADDRESS
|
||||
// #define WAND_MAC_ADDRESS "F2:93:16:1A:CA:96"
|
||||
|
||||
// Example: Enable Home Assistant integration
|
||||
// #undef ENABLE_HOME_ASSISTANT
|
||||
// #define ENABLE_HOME_ASSISTANT 1
|
||||
// #undef USE_WIFI_AP_MODE
|
||||
// #define USE_WIFI_AP_MODE 1
|
||||
|
||||
// Example: Override WiFi credentials
|
||||
// #undef WIFI_SSID
|
||||
// #define WIFI_SSID "MyNetwork"
|
||||
// #undef WIFI_PASSWORD
|
||||
// #define WIFI_PASSWORD "MyPassword"
|
||||
|
||||
// Example: Override MQTT settings
|
||||
// #undef MQTT_SERVER
|
||||
// #define MQTT_SERVER "192.168.1.50"
|
||||
// #undef MQTT_USER
|
||||
// #define MQTT_USER "myuser"
|
||||
// #undef MQTT_PASSWORD
|
||||
// #define MQTT_PASSWORD "mypassword"
|
||||
|
||||
// Example: Enable USB HID
|
||||
// #undef USE_USB_HID_DEVICE
|
||||
// #define USE_USB_HID_DEVICE 1
|
||||
|
||||
#endif // CONFIG_CUSTOM_H
|
||||
@@ -2698,7 +2698,6 @@ CONFIG_ESP_WIFI_AMPDU_RX_ENABLED=y
|
||||
CONFIG_ESP_WIFI_RX_BA_WIN=16
|
||||
# default:
|
||||
# CONFIG_ESP_WIFI_AMSDU_TX_ENABLED is not set
|
||||
# default:
|
||||
CONFIG_ESP_WIFI_NVS_ENABLED=y
|
||||
# default:
|
||||
CONFIG_ESP_WIFI_TASK_PINNED_TO_CORE_0=y
|
||||
|
||||
+8
-6
@@ -999,7 +999,9 @@ void WandBLEClient::updateAHRS(const IMUSample &sample)
|
||||
// Rate limit mouse updates to ~60 Hz (every 4th sample)
|
||||
if (++mouse_counter >= 4)
|
||||
{
|
||||
#if USE_USB_HID_DEVICE
|
||||
usbHID.updateMouseFromGesture(accum_dx, accum_dy);
|
||||
#endif
|
||||
accum_dx = 0.0f;
|
||||
accum_dy = 0.0f;
|
||||
mouse_counter = 0;
|
||||
@@ -1019,18 +1021,18 @@ void WandBLEClient::updateAHRS(const IMUSample &sample)
|
||||
if (positions && new_count > 0)
|
||||
{
|
||||
const Position2D &pos = positions[new_count - 1];
|
||||
if (!has_last_pos)
|
||||
if (!has_last_mouse_pos)
|
||||
{
|
||||
last_pos = pos;
|
||||
has_last_pos = true;
|
||||
last_mouse_pos = pos;
|
||||
has_last_mouse_pos = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
float dx = pos.x - last_pos.x;
|
||||
float dy = -(pos.y - last_pos.y);
|
||||
float dx = pos.x - last_mouse_pos.x;
|
||||
float dy = -(pos.y - last_mouse_pos.y);
|
||||
accum_dx += dx;
|
||||
accum_dy += dy;
|
||||
last_pos = pos;
|
||||
last_mouse_pos = pos;
|
||||
|
||||
// Rate limit mouse updates to ~60 Hz (every 4th point)
|
||||
if (new_count == 2 || ++mouse_counter >= 4)
|
||||
|
||||
Reference in New Issue
Block a user