mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-05-19 14:15:02 -04:00
37 lines
1.2 KiB
C++
37 lines
1.2 KiB
C++
// Copyright (c) 2017-2024, Mudita Sp. z.o.o. All rights reserved.
|
|
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
|
|
|
|
#pragma once
|
|
|
|
#include "ScreenLightControlParameters.hpp"
|
|
#include <Timers/TimerHandle.hpp>
|
|
|
|
namespace settings
|
|
{
|
|
class Settings;
|
|
} // namespace settings
|
|
|
|
namespace sys
|
|
{
|
|
class Service;
|
|
} // namespace sys
|
|
|
|
/// Screen light control algorithm. Automatic/Manual mode of operation.
|
|
/// Processing of ambient light sensor input to screen brightness output.
|
|
namespace screen_light_control
|
|
{
|
|
class ScreenLightController
|
|
{
|
|
public:
|
|
virtual ~ScreenLightController() noexcept = default;
|
|
|
|
virtual void processRequest(Action action) = 0;
|
|
virtual void processRequest(Action action, const Parameters ¶ms) = 0;
|
|
[[nodiscard]] virtual auto isLightOn() const noexcept -> bool = 0;
|
|
[[nodiscard]] virtual auto isAutoModeOn() const noexcept -> bool = 0;
|
|
[[nodiscard]] virtual auto getBrightnessValue() const noexcept
|
|
-> bsp::eink_frontlight::BrightnessPercentage = 0;
|
|
[[nodiscard]] virtual auto isFadeOutOngoing() -> bool = 0;
|
|
};
|
|
} // namespace screen_light_control
|