Files
Matt Hills aab2526f99 v1.4.0: BLE disconnect simulation with teardown support
Features:
- Add BLE disconnect simulation to test client reconnection behavior
- Support immediate disconnect, timed advertising pause, and full BLE teardown
- Add preset test buttons in admin UI (Quick Drop, 5s Pause, BLE Restart, 10s Restart)
- Add simulate_ble_disconnect MCP tool with duration_ms and teardown params
- Add POST /devices/{id}/disconnect API endpoint

Fixes:
- Fix treadmill distance not updating in admin UI (publish values periodically)
- Fix HR variation sending to non-heart_rate devices
- Fix BLE connection ID 0 being treated as "not connected"
- Clean up misleading startup log messages

Firmware: 1.1.0, API: 1.4.0, UI: 1.5.0

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

38 lines
1.3 KiB
C

#ifndef CONFIG_H
#define CONFIG_H
// ============================================
// Firmware Version
// ============================================
#define FIRMWARE_VERSION "1.1.0"
// ============================================
// 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