From 1d74c7054966e43c5748be342534c72964f05ba8 Mon Sep 17 00:00:00 2001 From: baldeau Date: Wed, 13 Nov 2024 21:59:59 +0100 Subject: [PATCH] add isCapturing check --- xiao_controller_code/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xiao_controller_code/main.go b/xiao_controller_code/main.go index ccc7a4e..7212a3d 100644 --- a/xiao_controller_code/main.go +++ b/xiao_controller_code/main.go @@ -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()