Closed hohmannc85 closed 1 year ago
Hi,
ja gibt es.
//======================================================================================================================
// Convert States
//======================================================================================================================
HACover::CoverState toCoverState(const SHCIState& doorState){
switch (doorState.doorState)
{
case DOOR_MOVE_OPENPOSITION:
return HACover::StateOpening;
case DOOR_MOVE_CLOSEPOSITION:
return HACover::StateClosing;
case DOOR_OPEN_POSITION:
return HACover::StateOpen;
case DOOR_CLOSE_POSITION:
return HACover::StateClosed;
case DOOR_HALF_POSITION:
return HACover::StateOpen;
default:
return HACover::StateStopped;
}
}
const char* doorStateToStr(const SHCIState& doorState){
switch (doorState.doorState)
{
case DOOR_MOVE_OPENPOSITION:
return "opening";
case DOOR_MOVE_CLOSEPOSITION:
return "closing";
case DOOR_OPEN_POSITION:
return "open";
case DOOR_CLOSE_POSITION:
return "closed";
case DOOR_HALF_POSITION:
return "ventilation";
default:
return "stopped";
}
}
Top danke
Danke für das geile Projekt, ist es möglich auszulesen ob der Motor aktuell fährt?