mpsoc startup command

This commit is contained in:
Jakob Meier
2022-03-30 09:19:30 +02:00
parent 25c3f39c82
commit 2dca9d598d
14 changed files with 571 additions and 414 deletions

View File

@ -15,7 +15,7 @@ extern "C" {
}
StarTrackerHandler::StarTrackerHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie,
StrHelper* strHelper)
StrHelper* strHelper, power::Switch_t powerSwitch)
: DeviceHandlerBase(objectId, comIF, comCookie),
temperatureSet(this),
versionSet(this),
@ -39,7 +39,8 @@ StarTrackerHandler::StarTrackerHandler(object_id_t objectId, object_id_t comIF,
subscriptionSet(this),
logSubscriptionSet(this),
debugCameraSet(this),
strHelper(strHelper) {
strHelper(strHelper),
powerSwitch(powerSwitch) {
if (comCookie == nullptr) {
sif::error << "StarTrackerHandler: Invalid com cookie" << std::endl;
}
@ -1223,8 +1224,10 @@ ReturnValue_t StarTrackerHandler::doSendReadHook() {
return RETURN_OK;
}
ReturnValue_t StarTrackerHandler::getSwitches(const uint8_t** switches,
uint8_t* numberOfSwitches) {
ReturnValue_t StarTrackerHandler::getSwitches(const uint8_t** switches, uint8_t* numberOfSwitches) {
if (powerSwitch == power::NO_SWITCH) {
return DeviceHandlerBase::NO_SWITCH;
}
*numberOfSwitches = 1;
*switches = &powerSwitch;
return RETURN_OK;