Add BLE sensor streaming#64
Conversation
Add SD_BARO_Measurement characteristic to Sensor_Data service for streaming pressure/temperature data with configurable decimation.
- DS_CMD_SET_MODE (0x04) to switch between SLEEP and ACTIVE modes - Optional 32-bit ext_sync timestamp for CSV header synchronization - New events FS_MODE_EVENT_BLE_SET_ACTIVE and FS_MODE_EVENT_BLE_SET_SLEEP - Updated documentation for DS_Control_Point commands
- Implemented FS_BLE_CalculateDivider function to calculate the appropriate divider for BLE transmission based on sensor ODR settings. - Created FS_BLE_ValidateConfig function to validate the BLE configuration against throughput limits, incorporating GPS rate and sensor settings. - Added header file ble_config.h to define BLE-related constants and function prototypes. - Introduced hum_ble.c and hum_ble.h for humidity sensor BLE data handling, including initialization, mask management, and data packet building. - Defined sensor ODR lookup tables in sensor_odr.h for various sensors to facilitate ODR to Hz conversions.
|
the ble control point divider stuff could be removed for reduced complexity (dividers could be set via config file only). I like using it but not sure if anyone else will. |
|
other options that are not implemented, (would need re-testing): remove extra temperature measurements (redundant). Let me know if we are going to want to do any of these. The current version is working great. |
| @@ -73,7 +83,7 @@ typedef struct | |||
|
|
|||
| /* Private macros -------------------------------------------------------------*/ | |||
| /* USER CODE BEGIN PM */ | |||
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
|
Hi @hartmandrector — nice to see the sensor streaming work from #62 carried forward and extended here; the config-file dividers, humidity characteristic and docs are welcome additions. We've just closed #62 in favour of converging on a single PR, since two overlapping ones won't help anyone. One heads-up: develop has changed quite a bit since this branch was cut. The mode-control events this PR still carries over from our branch ( We now have the streaming core (baro/accel/gyro/mag characteristics + custom_stm plumbing) rebased onto current develop and validated on hardware. If it helps, we're happy to push that branch as a base so this PR can rebase on it and focus on what it adds (hum, dividers/config, tests) — that would also keep commit history and attribution tidy. Alternatively, happy to review and test a rebase done here — whichever works best for you and @crwper. |
This adds BLE sensor streaming for barometer, humidity, accelerometer, gyroscope, and magnetometer data, along with configuration support and a divider-rate helper script.