diff options
Diffstat (limited to 'src/systemtask/SystemTask.h')
| -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 cf15071..bd12005 100644 --- a/src/systemtask/SystemTask.h +++ b/src/systemtask/SystemTask.h @@ -140,6 +140,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); + } + }; } } |
