mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-02-24 02:33:53 +08:00
implement display power (#21731)
* implement display power * FB_BLANK_POWERDOWN Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
This commit is contained in:
@@ -25,7 +25,13 @@ public:
|
||||
brightness_control.close();
|
||||
}
|
||||
};
|
||||
static void set_display_power(bool on) {};
|
||||
static void set_display_power(bool on) {
|
||||
std::ofstream bl_power_control("/sys/class/backlight/panel0-backlight/bl_power");
|
||||
if (bl_power_control.is_open()) {
|
||||
bl_power_control << (on ? "0" : "4") << "\n";
|
||||
bl_power_control.close();
|
||||
}
|
||||
};
|
||||
|
||||
static bool get_ssh_enabled() { return Params().getBool("SshEnabled"); };
|
||||
static void set_ssh_enabled(bool enabled) { Params().putBool("SshEnabled", enabled); };
|
||||
|
||||
Reference in New Issue
Block a user