2021-03-24 10:12:09 -07:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <cstdlib>
|
|
|
|
|
#include <fstream>
|
2023-08-24 04:25:17 +08:00
|
|
|
#include <map>
|
|
|
|
|
#include <string>
|
|
|
|
|
|
2024-06-06 14:31:56 -07:00
|
|
|
#include "cereal/gen/cpp/log.capnp.h"
|
2021-03-30 17:36:04 +02:00
|
|
|
|
2021-03-24 10:12:09 -07:00
|
|
|
// no-op base hw class
|
|
|
|
|
class HardwareNone {
|
|
|
|
|
public:
|
2021-11-10 06:18:29 +08:00
|
|
|
static constexpr float MAX_VOLUME = 0.7;
|
|
|
|
|
static constexpr float MIN_VOLUME = 0.2;
|
2021-03-24 10:12:09 -07:00
|
|
|
|
2021-05-06 14:39:05 +02:00
|
|
|
static std::string get_os_version() { return ""; }
|
2023-08-24 01:13:46 +08:00
|
|
|
static std::string get_name() { return ""; }
|
|
|
|
|
static cereal::InitData::DeviceType get_device_type() { return cereal::InitData::DeviceType::UNKNOWN; }
|
|
|
|
|
static int get_voltage() { return 0; }
|
|
|
|
|
static int get_current() { return 0; }
|
2021-03-24 10:12:09 -07:00
|
|
|
|
2023-02-06 20:02:30 -08:00
|
|
|
static std::string get_serial() { return "cccccc"; }
|
|
|
|
|
|
2023-05-08 19:21:22 -07:00
|
|
|
static std::map<std::string, std::string> get_init_logs() {
|
|
|
|
|
return {};
|
|
|
|
|
}
|
|
|
|
|
|
2021-05-06 14:39:05 +02:00
|
|
|
static void reboot() {}
|
|
|
|
|
static void poweroff() {}
|
|
|
|
|
static void set_brightness(int percent) {}
|
2024-12-14 13:50:25 -08:00
|
|
|
static void set_ir_power(int percentage) {}
|
2021-05-06 14:39:05 +02:00
|
|
|
static void set_display_power(bool on) {}
|
2021-03-24 10:12:09 -07:00
|
|
|
|
2021-05-06 14:39:05 +02:00
|
|
|
static bool get_ssh_enabled() { return false; }
|
|
|
|
|
static void set_ssh_enabled(bool enabled) {}
|
|
|
|
|
|
|
|
|
|
static bool PC() { return false; }
|
|
|
|
|
static bool TICI() { return false; }
|
2022-06-02 15:20:51 +02:00
|
|
|
static bool AGNOS() { return false; }
|
2021-03-24 10:12:09 -07:00
|
|
|
};
|