I2C autoreset, driver status refactor, VC_TEMP fix

This commit is contained in:
2023-11-12 01:04:53 +03:00
parent fe054c3c4e
commit 2e21362fd8
32 changed files with 102 additions and 187 deletions

View File

@@ -1,4 +1,5 @@
#include "item.h"
#include "abstractout.h"
#include "itemCmd.h"
@@ -24,4 +25,16 @@ int abstractOut::Setup()
{
if (item && (item->getCmd()==-1)) item->setCmd(CMD_OFF);
return 1;
}
}
int abstractOut::Status()
{
if (item && item->itemArr)
return item->itemArr->subtype;
return CST_UNKNOWN;
}
void abstractOut::setStatus(uint8_t status)
{
if (item && item->itemArr) item->itemArr->subtype = status & 0xF;
}