clangtidy corrections part 1

This commit is contained in:
2023-10-11 17:35:40 +02:00
parent 77a52b82c3
commit 23d854a826
36 changed files with 2383 additions and 1165 deletions
+17 -15
View File
@@ -4,44 +4,46 @@
* @brief Implementation of the class DriveManager
* @version 0.1
* @date 2021-12-14
*
*
* @copyright Copyright (c) 2021
*
*
*/
#include "driveModi/driveManager.h"
DriveManager::DriveManager(MoveControl *moveControl, const SensorData* sensorData, const ControlPadInput *input) {
this->driveModiParams.input = input;
this->driveModiParams.moveControl = moveControl;
this->driveModiParams.sensorData = sensorData;
DriveManager::DriveManager(MoveControl *moveControl, const SensorData *sensorData, const ControlPadInput *input)
: driveModiParams{moveControl, input, sensorData}
{
this->init();
}
DriveManager::DriveManager(DriveModiParams params){
this->driveModiParams = params;
DriveManager::DriveManager(DriveModiParams params)
: driveModiParams{params}
{
this->init();
}
void DriveManager::changeModus(DriveModi* modus) {
if (this->currentModusPtr) {
void DriveManager::changeModus(DriveModi *modus)
{
if (static_cast<bool>(this->currentModusPtr))
{
this->removeChildComponent(this->currentModusPtr);
delete this->currentModusPtr;
this->currentModusPtr = nullptr;
}
this->currentModusPtr = modus;
if (this->currentModusPtr) {
if (static_cast<bool>(this->currentModusPtr))
{
this->currentModusPtr->activate(this->driveModiParams);
this->currentModusPtr->setSpeeds(this->drivingSpeeds);
this->addChildComponent(this->currentModusPtr);
}
}
void DriveManager::init() {
void DriveManager::init()
{
this->addChildComponent(this->driveModiParams.moveControl);
this->activateOnlyChilds();
}