arduino-sketches/esp32/alarm.h

31 lines
564 B
C
Raw Normal View History

#ifndef _ALARM_H_
#define _ALARM_H_
const int DOOR_OPEN = HIGH;
const int DOOR_CLOSED = LOW;
struct AlarmStatus{
2025-04-13 22:51:47 -03:00
int doorStatus =DOOR_OPEN;
bool doorChanged =false;
bool isArmed = false;
bool isFired =false;
bool ledOn =true;
bool muted =false;
bool silent =false; //low sound
bool showError=false;
bool allowed=false;
long lastEntrance=0;
String userAllowed;
bool sendNotif=false;
long eventId=0;
};
void disarm(AlarmStatus* status)
{
status->isArmed = false;
status->isFired = false;
status->lastEntrance = millis();
}
#endif