pins protection,core fixes for grp ch stat& sched

This commit is contained in:
Климов Андрей Николаевич
2023-10-25 00:28:26 +03:00
parent 1e58ad90eb
commit 45d925ba88
13 changed files with 126 additions and 66 deletions

View File

@@ -51,6 +51,7 @@ int out_Motor::Setup()
abstractOut::Setup();
getConfig();
debugSerial.println("Motor: Init");
if (isProtectedPin(pinUp)||isProtectedPin(pinDown)) {errorSerial<<F("pin disabled")<<endl;return 0;}
pinMode(pinUp,OUTPUT);
pinMode(pinDown,OUTPUT);
@@ -71,11 +72,13 @@ return 1;
int out_Motor::Stop()
{
debugSerial.println("Motor: De-Init");
item->setExt(0);
driverStatus = CST_UNKNOWN;
if (isProtectedPin(pinUp)||isProtectedPin(pinDown)) {errorSerial<<F("pin disabled")<<endl;return 0;}
digitalWrite(pinUp,INACTIVE);
digitalWrite(pinDown,INACTIVE);
item->setExt(0);
driverStatus = CST_UNKNOWN;
return 1;
}
@@ -116,6 +119,8 @@ if (!item->getFlag(FLAG_ACTION_IN_PROCESS))
}
else return 0;
}
if (isProtectedPin(pinUp)||isProtectedPin(pinDown)) {return 0;}
uint32_t motorOfftime = item->getExt();
itemCmd st;