Fixed bug in zone 0

master
sfeakes 2018-12-03 10:06:44 -06:00
parent a2e9714a92
commit a7f0d1875f
4 changed files with 4 additions and 3 deletions

View File

@ -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,

View File

@ -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.

View File

@ -1,6 +1,6 @@
#ifndef SD_VERSION_H
#define SD_VERSION_H
#define SD_VERSION "1.0c"
#define SD_VERSION "1.0d"
#endif