diff options
| author | Michele Bini <michele.bini@gmail.com> | 2022-04-10 13:50:02 (GMT) |
|---|---|---|
| committer | Michele Bini <michele.bini@gmail.com> | 2022-04-10 14:07:49 (GMT) |
| commit | 34a6369f793bb36a3f66eba87535159819c65f2b (patch) | |
| tree | 65e206128ee042de8372d915966c8981246be9fb /src/systemtask | |
| parent | 4d8a0d3300345b71dcbd7e86d1e7c4cfcc3cf200 (diff) | |
Add jumpscore app
Diffstat (limited to 'src/systemtask')
| -rw-r--r-- | src/systemtask/SystemTask.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/systemtask/SystemTask.h b/src/systemtask/SystemTask.h index 5ce8a8e..f141b01 100644 --- a/src/systemtask/SystemTask.h +++ b/src/systemtask/SystemTask.h @@ -151,6 +151,20 @@ namespace Pinetime { static constexpr TickType_t batteryMeasurementPeriod = pdMS_TO_TICKS(10 * 60 * 1000); SystemMonitor monitor; + + public: + inline double ReadGXYZ(double &X, double &Y, double &Z) const { + auto motionValues = motionSensor.Process(); + // motionController.Update(motionValues.x, motionValues.y, motionValues.z); + X = motionValues.x; Y = motionValues.y; Z = motionValues.z; + return std::sqrt(X*X + Y*Y + Z*Z); + } + + inline double ReadG() const { + double x, y, z; + return ReadGXYZ(x,y,z); + } + }; } } |
