Files
pyBTMCP/firmware/esp32_ble_sim/include/config.h
Matt Hills 0d34cae441 v1.3.1: Fix stale devices in admin UI and firmware device type persistence
Admin UI fixes:
- Track deleted devices to prevent MQTT re-registration from stale messages
- Broadcast device_deleted event via WebSocket to sync all clients
- Add removeDeviceFromUI() to clean up device cards and pending timers
- Improve delete error handling with user feedback

Firmware fixes (v1.0.7):
- Fix device type strings to match API expectations (heart_rate vs Heart Rate)
- Clean up BLE services when switching device types (prevents service accumulation)
- Call stop() before setupHeartRate()/setupTreadmill() to reset NimBLE state
- Track service pointers for proper cleanup with pServer->removeService()

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 17:18:57 -05:00

38 lines
1.3 KiB
C

#ifndef CONFIG_H
#define CONFIG_H
// ============================================
// Firmware Version
// ============================================
#define FIRMWARE_VERSION "1.0.7"
// ============================================
// AP Mode Configuration
// ============================================
#define AP_SSID_PREFIX "BLE-Sim-" // Will append chip ID for uniqueness
#define AP_PASSWORD "" // Open network (or set a password)
#define AP_IP IPAddress(192, 168, 4, 1)
#define AP_GATEWAY IPAddress(192, 168, 4, 1)
#define AP_SUBNET IPAddress(255, 255, 255, 0)
// ============================================
// Default Values (used until configured)
// ============================================
#define DEFAULT_MQTT_PORT 1883
#define DEFAULT_DEVICE_ID_PREFIX "esp32-"
// ============================================
// Timing Configuration
// ============================================
#define BLE_NOTIFY_INTERVAL 1000 // BLE notification interval (ms)
#define MQTT_RECONNECT_INTERVAL 5000 // MQTT reconnect attempt interval (ms)
#define STATUS_REPORT_INTERVAL 10000 // Status report to MQTT (ms)
#define WIFI_CONNECT_TIMEOUT 15000 // WiFi connection timeout (ms)
// ============================================
// NVS Configuration Keys
// ============================================
#define NVS_NAMESPACE "ble-sim"
#endif // CONFIG_H