Clarified a few comments
This commit is contained in:
parent
f754f6422c
commit
b141fbdb2b
@ -15,6 +15,8 @@
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
//Needed for usleep to work
|
||||||
#define _DEFAULT_SOURCE
|
#define _DEFAULT_SOURCE
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -32,7 +34,7 @@ static const char* backlight_dir = "/sys/class/backlight/";
|
|||||||
static const char* backlight_file = "brightness";
|
static const char* backlight_file = "brightness";
|
||||||
static const char* max_backlight_file = "max_brightness";
|
static const char* max_backlight_file = "max_brightness";
|
||||||
|
|
||||||
//Used to store a dynamic array of dynamic strings and size
|
//Used to store a dynamic array of dynamic strings and number of strings
|
||||||
struct string_array{
|
struct string_array{
|
||||||
char** list;
|
char** list;
|
||||||
int size;
|
int size;
|
||||||
@ -127,7 +129,7 @@ void fade_out(int iv, int fv, int ms_duration, int steps){
|
|||||||
float value = iv; //current value to write to file
|
float value = iv; //current value to write to file
|
||||||
int step_delta = ms_duration / steps;
|
int step_delta = ms_duration / steps;
|
||||||
int step_inc = step_delta;
|
int step_inc = step_delta;
|
||||||
float brdelta = (float)(fv - iv) / steps; //amount brightness needs to change overall
|
float brdelta = (float)(fv - iv) / steps; //amount brightness needs to change per iteration
|
||||||
|
|
||||||
while(ms_duration > tdelta){
|
while(ms_duration > tdelta){
|
||||||
//write
|
//write
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user