From ee48e3f35b732eeddc9496da396aa33a31ebee2d Mon Sep 17 00:00:00 2001 From: Michele Bini Date: Thu, 31 Mar 2022 20:53:11 +0200 Subject: Preliminary testing of G sensor diff --git a/src/components/motion/MotionController.cpp b/src/components/motion/MotionController.cpp index 12c3514..a7c5ecc 100644 --- a/src/components/motion/MotionController.cpp +++ b/src/components/motion/MotionController.cpp @@ -13,7 +13,7 @@ int16_t MotionController::G() { float X = x; X *= X; float Y = y; Y *= Y; float Z = z; Z *= Z; - return (int16_t) std::sqrtf(X + Y + Z); + return (int16_t) std::sqrt(X + Y + Z); } bool MotionController::Should_RaiseWake(bool isSleeping) { -- cgit v0.10.2