1
0
forked from fsfw/fsfw

updating code from Flying Laptop

This is the framework of Flying Laptop OBSW version A.13.0.
This commit is contained in:
2018-07-12 16:29:32 +02:00
parent 1d22a6c97e
commit 575f70ba03
395 changed files with 12807 additions and 8404 deletions

View File

@ -1,10 +1,3 @@
/*
* PowerSwitcher.cpp
*
* Created on: 21.01.2014
* Author: baetz
*/
#include <framework/objectmanager/ObjectManagerIF.h>
#include <framework/power/PowerSwitcher.h>
#include <framework/serviceinterface/ServiceInterfaceStream.h>
@ -14,8 +7,8 @@ PowerSwitcher::PowerSwitcher(uint8_t setSwitch1, uint8_t setSwitch2,
state(setStartState), firstSwitch(setSwitch1), secondSwitch(setSwitch2), power(NULL) {
}
ReturnValue_t PowerSwitcher::initialize() {
power = objectManager->get<PowerSwitchIF>(objects::PCDU_HANDLER);
ReturnValue_t PowerSwitcher::initialize(object_id_t powerSwitchId) {
power = objectManager->get<PowerSwitchIF>(powerSwitchId);
if (power == NULL) {
return HasReturnvaluesIF::RETURN_FAILED;
}
@ -47,7 +40,7 @@ void PowerSwitcher::commandSwitches(ReturnValue_t onOff) {
switch (result) {
case TWO_SWITCHES:
power->sendSwitchCommand(secondSwitch, onOff);
/*NO BREAK*/
/* NO BREAK falls through*/
case ONE_SWITCH:
power->sendSwitchCommand(firstSwitch, onOff);
break;