clangtidy corrections part 2
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
/**
|
||||
* @file calibrateCompass.h
|
||||
* @author Alexander Klein (alex@kleiax.de)
|
||||
* @brief
|
||||
* @brief
|
||||
* @version 0.1
|
||||
* @date 2023-05-23
|
||||
*
|
||||
*
|
||||
* @copyright Copyright (c) 2023
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
@@ -17,44 +17,47 @@
|
||||
|
||||
#include "component.h"
|
||||
|
||||
class CalibrateCompass : public Component {
|
||||
public:
|
||||
enum State {
|
||||
Ready,
|
||||
Calibrating,
|
||||
Finished
|
||||
};
|
||||
class CalibrateCompass : public Component
|
||||
{
|
||||
public:
|
||||
enum State
|
||||
{
|
||||
Ready,
|
||||
Calibrating,
|
||||
Finished
|
||||
};
|
||||
|
||||
struct CallibrationData {
|
||||
int data[3][2];
|
||||
};
|
||||
struct CallibrationData
|
||||
{
|
||||
int data[3][2];
|
||||
};
|
||||
|
||||
CalibrateCompass(QMC5883LCompass* compass);
|
||||
CalibrateCompass(QMC5883LCompass *compass);
|
||||
|
||||
void start();
|
||||
void useData();
|
||||
void removeCalibration();
|
||||
void reset();
|
||||
void saveData();
|
||||
void loadData();
|
||||
void start();
|
||||
void useData();
|
||||
void removeCalibration();
|
||||
void reset();
|
||||
void saveData();
|
||||
void loadData();
|
||||
|
||||
State getState() const { return this->state; }
|
||||
CallibrationData getCallibrationData() const { return this->data; }
|
||||
State getState() const { return this->state; }
|
||||
CallibrationData getCallibrationData() const { return this->data; }
|
||||
|
||||
friend std::ostream& operator<<(std::ostream& os, const CalibrateCompass& caliComp);
|
||||
friend std::ostream &operator<<(std::ostream &stream, const CalibrateCompass &caliComp);
|
||||
|
||||
private:
|
||||
void runAsChild() override;
|
||||
void run() override;
|
||||
void checkDataValidity();
|
||||
private:
|
||||
void runAsChild() override;
|
||||
void run() override;
|
||||
void checkDataValidity();
|
||||
|
||||
QMC5883LCompass* compass;
|
||||
State state;
|
||||
CallibrationData data;
|
||||
QMC5883LCompass *compass;
|
||||
State state = State::Ready;
|
||||
CallibrationData data{};
|
||||
|
||||
void clearData();
|
||||
void clearData();
|
||||
|
||||
bool dataValid = false;
|
||||
const uint16_t maxTimeWithoutChange = 10000;
|
||||
uint32_t lastChange = 0;
|
||||
bool dataValid = false;
|
||||
const uint16_t maxTimeWithoutChange = 10000;
|
||||
uint32_t lastChange = 0;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user