Files
Bachelorarbeit-Rover/src/driveModi/driveManager.h
T
kleiax d0c5421ad9 - fix driveManager quit mode
- change com port
- edit todos
2023-09-23 16:38:34 +02:00

70 lines
1.7 KiB
C++

/**
* @file driveManager.h
* @author Alexander Klein (alex@kleiax.de)
* @brief Contains a class to switch the DriveModi
* @version 0.1
* @date 2021-12-14
*
* @copyright Copyright (c) 2021
*
*/
#ifndef DRIVE_MANAGER_H
#define DRIVE_MANAGER_H
#include "moveControl.h"
#include "driveModi/driveModi.h"
#include "navigation.h"
#include "config.h"
#include "controlPadInput.h"
#include "component.h"
#include "sensorData.h"
class DriveManager : public Component {
public:
/**
* @brief Construct a new Drive Manager object
*
* Creates a Navigation object
*
* @param moveControl
*/
DriveManager(MoveControl *moveControl, const SensorData* sensorData, const ControlPadInput *input);
DriveManager(DriveModiParams params);
/**
* @brief Change the DriveModi to a specific value
*
* Sets MoveControl to a safe state, delete the last
* DriveModi and than set the new DriveModi
*
* @param modus
*/
void changeModus(DriveModi* modus = nullptr);
/**
* @brief Get the DriveModi Ptr object
*
* This is a pointer to the Object of the current DriveMode.
* If you know which DriveMode is active, you can cast this
* pointer to it.
*
* @see getDriveModi
* @return DriveModi*
*/
DriveModi* getDriveModiPtr() const { return this->currentModusPtr; }
bool isActive() const { return this->currentModusPtr; }
private:
void run() override {};
void init();
DriveModi *currentModusPtr = nullptr;
DriveModiParams driveModiParams;
};
#endif // DRIVE_MANAGER_H