motioncontroller: Fix clang-tidy warnings
Also move one-line functions to header.
This commit is contained in:
committed by
Riku Isokoski
parent
76e79df375
commit
49ad5be742
@@ -50,7 +50,9 @@ namespace Pinetime {
|
||||
return accumulatedSpeed;
|
||||
}
|
||||
|
||||
void IsSensorOk(bool isOk);
|
||||
void IsSensorOk(bool isOk) {
|
||||
isSensorOk = isOk;
|
||||
}
|
||||
|
||||
bool IsSensorOk() const {
|
||||
return isSensorOk;
|
||||
@@ -61,21 +63,24 @@ namespace Pinetime {
|
||||
}
|
||||
|
||||
void Init(Pinetime::Drivers::Bma421::DeviceTypes types);
|
||||
void SetService(Pinetime::Controllers::MotionService* service);
|
||||
|
||||
void SetService(Pinetime::Controllers::MotionService* service) {
|
||||
this->service = service;
|
||||
}
|
||||
|
||||
private:
|
||||
uint32_t nbSteps;
|
||||
uint32_t nbSteps = 0;
|
||||
uint32_t currentTripSteps = 0;
|
||||
|
||||
TickType_t lastTime = 0;
|
||||
TickType_t time = 0;
|
||||
|
||||
int16_t x;
|
||||
int16_t x = 0;
|
||||
int16_t lastYForWakeUp = 0;
|
||||
int16_t lastY = 0;
|
||||
int16_t y;
|
||||
int16_t y = 0;
|
||||
int16_t lastZ = 0;
|
||||
int16_t z;
|
||||
int16_t z = 0;
|
||||
int32_t accumulatedSpeed = 0;
|
||||
|
||||
bool isSensorOk = false;
|
||||
|
||||
Reference in New Issue
Block a user