mirror of
https://github.com/Derisis13/Shutter.git
synced 2025-12-06 19:32:48 +01:00
Reworked channel changing: now it tracks the current ch. and resets only once. This makes the program to finish faster. Added rolltime_down and percentage values to shutter structure: now the schedule file needs to contain a percentage column after the timestamp for lowering, and a rolltime needs to be defined for each shutter in the beginning of the program. When lowering shutters, there's a calculation to sleep until the desired percentage is reached, when the shutter is stopped The way to deactivate shutters has changed: now you need to set the percentage to 0.
34 lines
455 B
C
34 lines
455 B
C
//
|
|
// Created by lacko on 08/08/2021.
|
|
//
|
|
|
|
#ifndef _REDONY_H_
|
|
#define _REDONY_H_
|
|
|
|
#include <time.h>
|
|
|
|
typedef char byte;
|
|
|
|
typedef struct ido {
|
|
byte tm_hour;
|
|
byte tm_min;
|
|
} ido;
|
|
|
|
typedef struct redony {
|
|
byte ch;
|
|
ido up;
|
|
ido down;
|
|
byte rolltime_up; //measured in seconds
|
|
byte rolltime_down; //measured in seconds
|
|
byte percentage;
|
|
} redony;
|
|
|
|
typedef enum buttons {
|
|
up = 17,
|
|
stop,
|
|
down,
|
|
prev,
|
|
next
|
|
} buttons;
|
|
#endif //_REDONY_H_
|