~aleteoryx/muditaos

ref: b3f228878dcebeb519d2206c9d333091abe650d0 muditaos/module-services/service-evtmgr/screen-light-control/ControlFunctions.hpp -rw-r--r-- 879 bytes
b3f22887 — GravisZro [EGD-7254] Fix submodule update script 4 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once

#include <bsp/eink_frontlight/eink_frontlight.hpp>
#include <bsp/light_sensor/light_sensor.hpp>
#include <vector>
#include <utility>

namespace screen_light_control::functions
{
    using BrightnessFunction =
        std::vector<std::pair<bsp::light_sensor::IlluminanceLux, bsp::eink_frontlight::BrightnessPercentage>>;

    bsp::eink_frontlight::BrightnessPercentage brightnessRampOut();

    void calculateBrightness(bsp::light_sensor::IlluminanceLux measurement);

    void setRampStep(float step);

    void setHysteresis(float hyst);

    void setFunctionFromPoints(const BrightnessFunction &points);

    void setRampTarget(bsp::eink_frontlight::BrightnessPercentage value);

} // namespace screen_light_control::functions