Skip to content

DEV-852 - #287

Merged
JongChern merged 10 commits into
masterfrom
DEV-852
Aug 20, 2026
Merged

DEV-852#287
JongChern merged 10 commits into
masterfrom
DEV-852

Conversation

@JongChern

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI lite review requested due to automatic review settings August 20, 2026 03:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 SensorMapsExample to 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.

JongChern and others added 2 commits August 20, 2026 12:32
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 20, 2026 05:00
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

  • processMsgFromCallback runs on BasicProcessWithCallBack.ConsumerThread (not the Swing EDT). The newly added disconnect handling updates Swing components (textAreaDeviceSpec.setText(...)) directly; this should be wrapped in SwingUtilities.invokeLater (similar to updateDeviceSpec) 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 via btManager.getShimmerDeviceBtConnected(btComport), but for BLE gRPC connections the manager normalizes MAC IDs by stripping colons (see BasicShimmerBluetoothManagerPc.connectShimmer3BleGrpc), while the UI prompts users to enter colon-separated MACs. This can make device null and keep the spec panel stuck on "Not connected" even when connected. Consider normalizing btComport for 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() {

@MAzalya MAzalya left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok looks good

@JongChern
JongChern merged commit edc3f7d into master Aug 20, 2026
1 check passed
@JongChern
JongChern deleted the DEV-852 branch August 20, 2026 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants