SprinklerD/zone_ctrl.h

26 lines
441 B
C
Raw Normal View History

2018-06-16 21:52:48 +00:00
#ifndef ZONE_CTRL_H_
#define ZONE_CTRL_H_
#include <time.h>
#include <stdbool.h>
//#define SEC2MIN 1
#define SEC2MIN 60
typedef enum {zcNONE, zcSINGLE, zcALL, zcCRON} zcRunType;
typedef enum {zcON, zcOFF} zcState;
struct szRunning {
zcRunType type;
time_t started_time;
int duration;
//time_t *end_time;
2018-06-19 01:34:58 +00:00
int timeleft;
2018-06-16 21:52:48 +00:00
int zone;
};
bool zc_check();
bool zc_zone(zcRunType type, int zone, zcState state, int length);
#endif