mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 19:03:16 +00:00
Implemented more consistent naming: - Moved all HAL devices into their own namespace (and related folder) - Post-fixed all HAL device names with "Device"
29 lines
804 B
C++
29 lines
804 B
C++
#pragma once
|
|
|
|
#include "Tactility/hal/power/PowerDevice.h"
|
|
#include <memory>
|
|
|
|
using tt::hal::power::PowerDevice;
|
|
|
|
class SimulatorPower final : public PowerDevice {
|
|
|
|
bool allowedToCharge = false;
|
|
|
|
public:
|
|
|
|
SimulatorPower() = default;
|
|
~SimulatorPower() override = default;
|
|
|
|
std::string getName() const final { return "Power Mock"; }
|
|
std::string getDescription() const final { return ""; }
|
|
|
|
bool supportsMetric(MetricType type) const override;
|
|
bool getMetric(MetricType type, MetricData& data) override;
|
|
|
|
bool supportsChargeControl() const override { return true; }
|
|
bool isAllowedToCharge() const override { return allowedToCharge; }
|
|
void setAllowedToCharge(bool canCharge) override { allowedToCharge = canCharge; }
|
|
};
|
|
|
|
std::shared_ptr<PowerDevice> simulatorPower();
|