Skip to content

Conversation

@MaxKellermann
Copy link
Contributor

Commit 2148e79 ("Sensor Java to Kotlin") switched from using SensorListItem.setState() to assigning the state field directly. This however skips the isNextStateValid() check, unconditionally leaving the state SCANNING.

This however broke BLE sensors: the next
BleSensor.onCharacteristicRead() call would then call executeNextAndSetState() and setNextState(). With isScanning==true, setNextState() would invoke close().

The simple fix is to revert to using setState().

@bailuk bailuk changed the base branch from master to stage December 21, 2025 13:36
@bailuk
Copy link
Owner

bailuk commented Dec 21, 2025

Changes for next release are in stage. Please use this branch for as base for development.

Commit 2148e79 ("Sensor Java to Kotlin") switched from using
SensorListItem.setState() to assigning the `state` field directly.
This however skips the isNextStateValid() check, unconditionally
leaving the state `SCANNING`.

This however broke BLE sensors: the next
BleSensor.onCharacteristicRead() call would then call
executeNextAndSetState() and setNextState().  With `isScanning==true`,
setNextState() would invoke close().

The simple fix is to revert to using setState().
@MaxKellermann
Copy link
Contributor Author

Rebased.

@bailuk bailuk merged commit c2c9df9 into bailuk:stage Jan 1, 2026
@MaxKellermann MaxKellermann deleted the setstate branch January 1, 2026 15:49
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.

2 participants