Clarified a few comments

This commit is contained in:
rexy712 2018-02-01 17:17:26 -08:00
parent f754f6422c
commit b141fbdb2b

View File

@ -15,6 +15,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
//Needed for usleep to work
#define _DEFAULT_SOURCE
#include <stdio.h>
@ -32,7 +34,7 @@ static const char* backlight_dir = "/sys/class/backlight/";
static const char* backlight_file = "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{
char** list;
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
int step_delta = ms_duration / steps;
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){
//write