Fix PCF8574 JSON (#12088)

Fix PCF8574 JSON (#12088)
This commit is contained in:
Theo Arends 2021-05-12 17:17:35 +02:00
parent 817c7ce0a1
commit ccb7fc7da7
1 changed files with 1 additions and 1 deletions

View File

@ -219,7 +219,7 @@ void Pcf8574Show(bool json)
for (int idx = 0 ; idx < Pcf8574.max_devices ; idx++)
{
uint8_t gpio = Pcf8574Read(idx);
ResponseAppend_P(PSTR(",\"PCF8574%c%d\":{\"D0\":%i,\"D1\":%i,\"D2\":%i,\"D3\":%i,\"D4\":%i,\"D5\":%i,\"D6\":%i,\"D7\":%i"),
ResponseAppend_P(PSTR(",\"PCF8574%c%d\":{\"D0\":%i,\"D1\":%i,\"D2\":%i,\"D3\":%i,\"D4\":%i,\"D5\":%i,\"D6\":%i,\"D7\":%i}"),
IndexSeparator(), idx +1,
(gpio>>0)&1,(gpio>>1)&1,(gpio>>2)&1,(gpio>>3)&1,(gpio>>4)&1,(gpio>>5)&1,(gpio>>6)&1,(gpio>>7)&1);
}