Tactility/Boards/simulator/Source/hal/SimulatorPower.h
Ken Van Hoeylandt 61277e74b8
Align board project names with board ids (#399)
To avoid keeping track of a list that maps board project names to board ids.
Because of this change, we don't have to manually edit `boards.cmake` anymore when adding a new board.
2025-10-28 09:07:54 +01:00

27 lines
762 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 override { return "Power Mock"; }
std::string getDescription() const override { 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; }
};