mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 19:03:16 +00:00
- GitHub actions changed to build simulator on macOS (it's broken, but at least we get a good code portability check for now!) - `Buildscripts/` shell scripts updated to use `/bin/sh` so it works on macOS too - Various includes fixed in various subprojects so the code is more portable
26 lines
644 B
C++
26 lines
644 B
C++
#pragma once
|
|
|
|
#include "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();
|