This commit is contained in:
@ -5,7 +5,7 @@ Stack5VHandler::Stack5VHandler(PowerSwitchIF& switcher) : switcher(switcher) {
|
||||
}
|
||||
|
||||
ReturnValue_t Stack5VHandler::deviceToOn(StackCommander commander, bool updateStates) {
|
||||
MutexGuard mg(stackLock);
|
||||
MutexGuard mg(stackLock, LOCK_TYPE, LOCK_TIMEOUT, LOCK_CTX);
|
||||
if (updateStates) {
|
||||
updateInternalStates();
|
||||
}
|
||||
@ -27,7 +27,7 @@ ReturnValue_t Stack5VHandler::deviceToOn(StackCommander commander, bool updateSt
|
||||
}
|
||||
|
||||
ReturnValue_t Stack5VHandler::deviceToOff(StackCommander commander, bool updateStates) {
|
||||
MutexGuard mg(stackLock);
|
||||
MutexGuard mg(stackLock, LOCK_TYPE, LOCK_TIMEOUT, LOCK_CTX);
|
||||
if (updateStates) {
|
||||
updateInternalStates();
|
||||
}
|
||||
@ -55,12 +55,12 @@ ReturnValue_t Stack5VHandler::deviceToOff(StackCommander commander, bool updateS
|
||||
}
|
||||
|
||||
bool Stack5VHandler::isSwitchOn() {
|
||||
MutexGuard mg(stackLock);
|
||||
MutexGuard mg(stackLock, LOCK_TYPE, LOCK_TIMEOUT, LOCK_CTX);
|
||||
return updateInternalStates();
|
||||
}
|
||||
|
||||
void Stack5VHandler::update() {
|
||||
MutexGuard mg(stackLock);
|
||||
MutexGuard mg(stackLock, LOCK_TYPE, LOCK_TIMEOUT, LOCK_CTX);
|
||||
updateInternalStates();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user