mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-20 23:03:54 +08:00
* test changing sound volume
* create system/hardware/pc/hardware.h
* soundd: use Hardware::set_volume
* implement Hardware::set_volume using pactl
* Revert "test changing sound volume"
This reverts commit 4bbd870746ec86d1c9871a6175def96cf7f751a6.
* don't run command in background
* pactl: use default sink
old-commit-hash: 02b5b6fe1f
32 lines
928 B
C++
32 lines
928 B
C++
#pragma once
|
|
|
|
#include <cstdlib>
|
|
#include <fstream>
|
|
#include "cereal/messaging/messaging.h"
|
|
|
|
// no-op base hw class
|
|
class HardwareNone {
|
|
public:
|
|
static constexpr float MAX_VOLUME = 0.7;
|
|
static constexpr float MIN_VOLUME = 0.2;
|
|
|
|
static std::string get_os_version() { return ""; }
|
|
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; };
|
|
|
|
static void reboot() {}
|
|
static void poweroff() {}
|
|
static void set_brightness(int percent) {}
|
|
static void set_display_power(bool on) {}
|
|
static void set_volume(float volume) {}
|
|
|
|
static bool get_ssh_enabled() { return false; }
|
|
static void set_ssh_enabled(bool enabled) {}
|
|
|
|
static bool PC() { return false; }
|
|
static bool TICI() { return false; }
|
|
static bool AGNOS() { return false; }
|
|
};
|