Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds first-class support for the Bosch BMP581 pressure/temperature sensor on eligible Shimmer3R hardware/firmware, and updates the PC SensorMaps example UI to surface connected-device specifications (including BMP581 eligibility).
Changes:
- Introduces
SensorBMP581+CalibDetailsBmp581, and wires BMP581 into sensor IDs, compatibility info, and Shimmer3R sensor instantiation/packet naming. - Adds expansion-board revision comparison helper and an eligibility gate (
isSupportedBmp581) based on board SR/rev and LogAndStream FW version. - Updates PC
SensorMapsExampleto display a “Device Specifications” panel and refresh it on connect/initialization.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| ShimmerPCBasicExamples/src/main/java/com/shimmerresearch/simpleexamples/SensorMapsExample.java | Adds a device-spec UI panel and refresh helpers; updates on connect/disconnect/initialized callbacks. |
| ShimmerDriver/src/main/java/com/shimmerresearch/sensors/bmpX80/SensorBMP581.java | New BMP581 sensor implementation (maps, config options, packet scaling). |
| ShimmerDriver/src/main/java/com/shimmerresearch/sensors/bmpX80/CalibDetailsBmp581.java | New BMP581 calibration/scaling stub (no downloadable coefficients). |
| ShimmerDriver/src/main/java/com/shimmerresearch/sensors/AbstractSensor.java | Adds BMP581 to the sensor enum. |
| ShimmerDriver/src/main/java/com/shimmerresearch/driverUtilities/ExpansionBoardDetails.java | Adds lexicographic SR revision comparison helper for eligibility checks. |
| ShimmerDriver/src/main/java/com/shimmerresearch/driver/ShimmerObject.java | Routes BMPX80 sensor selection and signal naming to BMP581 when eligible; adds eligibility API. |
| ShimmerDriver/src/main/java/com/shimmerresearch/driver/Configuration.java | Adds BMP581 sensor ID, sensor tile label, and compatibility list. |
| ShimmerDriver/src/main/java/com/shimmerresearch/bluetooth/ShimmerBluetooth.java | Avoids requesting BMP390-style calibration coefficients when BMP581 is detected. |
Suppressed comments (1)
ShimmerPCBasicExamples/src/main/java/com/shimmerresearch/simpleexamples/SensorMapsExample.java:621
- On disconnect you set textAreaDeviceSpec directly from the callback path. If this runs off the Swing EDT, it has the same threading risk as updateDeviceSpec(); consider routing this through the same EDT-safe update helper (e.g., invokeLater inside updateDeviceSpec and call that here).
textPaneStatus.setText("disconnected");
if (textAreaDeviceSpec != null) {
textAreaDeviceSpec.setText("Not connected");
}
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.
Suppressed comments (2)
ShimmerPCBasicExamples/src/main/java/com/shimmerresearch/simpleexamples/SensorMapsExample.java:630
processMsgFromCallbackruns onBasicProcessWithCallBack.ConsumerThread(not the Swing EDT). The newly added disconnect handling updates Swing components (textAreaDeviceSpec.setText(...)) directly; this should be wrapped inSwingUtilities.invokeLater(similar toupdateDeviceSpec) to avoid race conditions/undefined UI behavior.
textPaneStatus.setText("disconnected");
if (textAreaDeviceSpec != null) {
textAreaDeviceSpec.setText("Not connected");
}
ShimmerPCBasicExamples/src/main/java/com/shimmerresearch/simpleexamples/SensorMapsExample.java:574
updateDeviceSpec()looks up the connected device viabtManager.getShimmerDeviceBtConnected(btComport), but for BLE gRPC connections the manager normalizes MAC IDs by stripping colons (seeBasicShimmerBluetoothManagerPc.connectShimmer3BleGrpc), while the UI prompts users to enter colon-separated MACs. This can makedevicenull and keep the spec panel stuck on "Not connected" even when connected. Consider normalizingbtComportfor lookups (e.g.,btComport.replace(":", "")) or using a lookup keyed consistently with the manager's connection handle.
static void updateDeviceSpec() {
if (textAreaDeviceSpec == null) {
return;
}
final ShimmerDevice device = btManager.getShimmerDeviceBtConnected(btComport);
final String specString = buildDeviceSpecString(device);
javax.swing.SwingUtilities.invokeLater(new Runnable() {
No description provided.