add: pulse mode
add: editorconfig
This commit is contained in:
parent
679175f1a9
commit
0f342b4aa8
13 changed files with 151 additions and 70 deletions
src/models
|
@ -15,6 +15,8 @@ relay_create(uint8_t number)
|
|||
new_relay->name[0] = '\0';
|
||||
|
||||
new_relay->is_on = -1;
|
||||
new_relay->is_on_schedule = -1;
|
||||
new_relay->pulse_timer = 0;
|
||||
new_relay->sent_to_broker = 0;
|
||||
|
||||
uuid_t off_id;
|
||||
|
@ -37,7 +39,7 @@ relay_set_name(relay_t *relay, const char *name)
|
|||
}
|
||||
|
||||
int
|
||||
relay_is_active(relay_t *relay, struct tm *time_struct)
|
||||
relay_is_on_schedule(relay_t *relay, struct tm *time_struct)
|
||||
{
|
||||
schedule_t *schedule = relay->schedules[helper_get_weekday(time_struct)];
|
||||
if(schedule->length == 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue