Fixed bug in zone 0
parent
a2e9714a92
commit
a7f0d1875f
3
config.c
3
config.c
|
@ -306,7 +306,8 @@ void readCfg(char *inifile)
|
|||
_sdconfig_.zonecfg[i].dz_idx = ini_getl(str, "DOMOTICZ_IDX", -1, inifile);
|
||||
//_sdconfig_.zonecfg[i].master_valve = ini_getl(str, "MASTER_VALVE", NO, inifile);
|
||||
_sdconfig_.zonecfg[i].default_runtime = ini_getl(str, "DEFAULT_RUNTIME", 10, inifile);
|
||||
ini_gets(str, "NAME", NULL, _sdconfig_.zonecfg[idx].name, sizearray(_sdconfig_.zonecfg[idx].name), inifile);
|
||||
//ini_gets(str, "NAME", NULL, _sdconfig_.zonecfg[idx].name, sizearray(_sdconfig_.zonecfg[idx].name), inifile);
|
||||
ini_gets(str, "NAME", NULL, _sdconfig_.zonecfg[i].name, sizearray(_sdconfig_.zonecfg[i].name), inifile);
|
||||
/*
|
||||
logMessage (LOG_DEBUG,"Zone Config : %s\n%25s : %d\n%25s : %d\n%25s : %d\n%25s : %d\n%25s : %d\n",
|
||||
_sdconfig_.zonecfg[i].name,
|
||||
|
|
|
@ -173,7 +173,7 @@ int build_homebridge_sprinkler_JSON(char* buffer, int size)
|
|||
length += sprintf(buffer+length, "{ \"title\" : \"%s\", ", _sdconfig_.name);
|
||||
|
||||
length += sprintf(buffer+length, " \"devices\": [");
|
||||
for (i=0; i <= _sdconfig_.zones ; i++)
|
||||
for (i=(_sdconfig_.master_valve?0:1); i <= _sdconfig_.zones ; i++)
|
||||
{
|
||||
length += sprintf(buffer+length, "{\"type\" : \"zone\", \"zone\": %d, \"name\": \"%s\", \"state\": \"%s\", \"duration\": %d, \"id\" : \"zone%d\" },",
|
||||
_sdconfig_.zonecfg[i].zone,
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue