add isCapturing check
This commit is contained in:
parent
3b4fb7f85c
commit
1d74c70549
@ -124,7 +124,7 @@ func main() {
|
||||
// Only read and update sensor data
|
||||
// with an active bluetooth connection
|
||||
// and when `isCapturing` is set to true
|
||||
if isBleConnected {
|
||||
if isBleConnected && isCapturing {
|
||||
X, Y, Z, _ := accel.ReadRotation()
|
||||
x, y, z, _ := accel.ReadAcceleration()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user