Tactiliest/Boards/Simulator/Source/hal/SimulatorPower.h
Ken Van Hoeylandt c87200a80d
Project restructuring (fixes macOS builds) (#198)
- Create `Include/` folder for all main projects
- Fix some issues here and there (found while moving things)
- All includes are now in `Tactility/` subfolder and must be included with that prefix. This fixes issues with clashing POSIX headers (e.g. `<semaphore.h>` versus Tactility's `Semaphore.h`)
2025-02-01 18:13:20 +01:00

26 lines
654 B
C++

#pragma once
#include <Tactility/hal/Power.h>
#include <memory>
using namespace tt::hal;
class SimulatorPower : public Power {
bool allowedToCharge = false;
public:
SimulatorPower() = default;
~SimulatorPower() override = default;
bool supportsMetric(MetricType type) const override;
bool getMetric(Power::MetricType type, Power::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<Power> simulatorPower();