- 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`)
26 lines
654 B
C++
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();
|