aboutsummaryrefslogtreecommitdiff
path: root/brightness_ctrl.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'brightness_ctrl.hpp')
-rw-r--r--brightness_ctrl.hpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/brightness_ctrl.hpp b/brightness_ctrl.hpp
index c1e8a34..fce960d 100644
--- a/brightness_ctrl.hpp
+++ b/brightness_ctrl.hpp
@@ -1,3 +1,5 @@
+//Chris Xiong 2018
+//3-Clause BSD License
#ifndef BRIGHTNESS_CTRL_HPP
#define BRIGHTNESS_CTRL_HPP
#include <chrono>
@@ -13,6 +15,7 @@ private:
filesystem::path cpath,brpath,maxbrpath;
std::vector<int> thresh,value;
int delay,direction,br,maxbr,minabr,tr,offset;
+ int doffset;
size_t cur;
SensorALS *als;
std::mutex interrupt_m,threshnotify_m,adjust_m;
@@ -21,13 +24,16 @@ private:
public:
void init(float initv,SensorALS *s);
void set_path(filesystem::path p);
- void set_thresh(std::vector<int> _th);
- void set_value(std::vector<int> _v);
+ void set_thresh(const std::vector<int> &_th);
+ void set_value(const std::vector<int> &_v);
void set_delay(int _d);
void set_trigrange(int _tr);
void set_minabr(int _mbr);
void set_offset(int rel,int off);
+ void set_frozen(bool frozen);
+ int get_offset();
+ int get_brightness();
void force_adjust();
void on_sensor_report(float v);