add isCapturing check
Some checks failed
xiao_pet_tracker / semantic-pull-request (push) Failing after 0s
xiao_pet_tracker / build (push) Failing after 0s
xiao_pet_tracker / spell-check (push) Failing after 0s

This commit is contained in:
baldeau 2024-11-13 21:59:59 +01:00
parent 3b4fb7f85c
commit 1d74c70549

View File

@ -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()