Merge branch 'meier_eiveobsw' into meier/acuHkTable
This commit is contained in:
@ -6,7 +6,6 @@ GomspaceDeviceHandler::GomspaceDeviceHandler(object_id_t objectId, object_id_t c
|
||||
uint16_t hkTableReplySize, LocalPoolDataSetBase* hkTableDataset) :
|
||||
DeviceHandlerBase(objectId, comIF, comCookie), maxConfigTableAddress(maxConfigTableAddress),
|
||||
maxHkTableAddress(maxHkTableAddress), hkTableReplySize(hkTableReplySize), hkTableDataset(hkTableDataset) {
|
||||
mode = MODE_NORMAL;
|
||||
if (comCookie == NULL) {
|
||||
sif::error << "GomspaceDeviceHandler::GomspaceDeviceHandler: Invalid com cookie"
|
||||
<< std::endl;
|
||||
@ -392,3 +391,7 @@ LocalPoolDataSetBase* GomspaceDeviceHandler::getDataSetHandle(sid_t sid) {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void GomspaceDeviceHandler::setModeNormal() {
|
||||
mode = MODE_NORMAL;
|
||||
}
|
||||
|
@ -36,6 +36,12 @@ public:
|
||||
uint16_t hkTableReplySize, LocalPoolDataSetBase* hkTableDataset);
|
||||
virtual ~GomspaceDeviceHandler();
|
||||
|
||||
/**
|
||||
* @brief This function can be used to set a gomspace device to normal mode immediately after
|
||||
* object creation.
|
||||
*/
|
||||
void setModeNormal();
|
||||
|
||||
protected:
|
||||
|
||||
static const uint8_t MAX_PACKET_LEN = 36;
|
||||
|
@ -212,11 +212,10 @@ void HeaterHandler::handleSwitchOnCommand(HeaterMapIter heaterMapIter) {
|
||||
if (mainSwitchState == PowerSwitchIF::SWITCH_ON) {
|
||||
if (!checkSwitchState(switchNr)) {
|
||||
gpioId_t gpioId = getGpioIdFromSwitchNr(switchNr);
|
||||
// result = gpioInterface->pullHigh(gpioId);
|
||||
result = RETURN_OK;
|
||||
result = gpioInterface->pullHigh(gpioId);
|
||||
if (result != RETURN_OK) {
|
||||
sif::error << "HeaterHandler::handleSwitchOffCommand: Failed to pull gpio with id"
|
||||
<< gpioId << "high" << std::endl;
|
||||
sif::error << "HeaterHandler::handleSwitchOnCommand: Failed to pull gpio with id "
|
||||
<< gpioId << " high" << std::endl;
|
||||
triggerEvent(GPIO_PULL_HIGH_FAILED, result);
|
||||
}
|
||||
else {
|
||||
@ -263,8 +262,7 @@ void HeaterHandler::handleSwitchOffCommand(HeaterMapIter heaterMapIter) {
|
||||
/* Check whether switch is already off */
|
||||
if (checkSwitchState(switchNr)) {
|
||||
gpioId_t gpioId = getGpioIdFromSwitchNr(switchNr);
|
||||
// result = gpioInterface->pullLow(gpioId);
|
||||
result = RETURN_OK;
|
||||
result = gpioInterface->pullLow(gpioId);
|
||||
if (result != RETURN_OK) {
|
||||
sif::error << "HeaterHandler::handleSwitchOffCommand: Failed to pull gpio with id"
|
||||
<< gpioId << " low" << std::endl;
|
||||
@ -305,9 +303,30 @@ bool HeaterHandler::allSwitchesOff() {
|
||||
gpioId_t HeaterHandler::getGpioIdFromSwitchNr(int switchNr) {
|
||||
gpioId_t gpioId = 0xFFFF;
|
||||
switch(switchNr) {
|
||||
case heaterSwitches::PAYLOAD_CAMERA:
|
||||
case heaterSwitches::HEATER_0:
|
||||
gpioId = gpioIds::HEATER_0;
|
||||
break;
|
||||
case heaterSwitches::HEATER_1:
|
||||
gpioId = gpioIds::HEATER_1;
|
||||
break;
|
||||
case heaterSwitches::HEATER_2:
|
||||
gpioId = gpioIds::HEATER_2;
|
||||
break;
|
||||
case heaterSwitches::HEATER_3:
|
||||
gpioId = gpioIds::HEATER_3;
|
||||
break;
|
||||
case heaterSwitches::HEATER_4:
|
||||
gpioId = gpioIds::HEATER_4;
|
||||
break;
|
||||
case heaterSwitches::HEATER_5:
|
||||
gpioId = gpioIds::HEATER_5;
|
||||
break;
|
||||
case heaterSwitches::HEATER_6:
|
||||
gpioId = gpioIds::HEATER_6;
|
||||
break;
|
||||
case heaterSwitches::HEATER_7:
|
||||
gpioId = gpioIds::HEATER_7;
|
||||
break;
|
||||
default:
|
||||
sif::error << "HeaterHandler::getGpioIdFromSwitchNr: Unknown heater switch number"
|
||||
<< std::endl;
|
||||
|
@ -267,7 +267,7 @@ ReturnValue_t PCDUHandler::getFuseState( uint8_t fuseNr ) const {
|
||||
}
|
||||
|
||||
uint32_t PCDUHandler::getSwitchDelayMs(void) const {
|
||||
return 15000;
|
||||
return 20000;
|
||||
}
|
||||
|
||||
object_id_t PCDUHandler::getObjectId() const {
|
||||
|
Reference in New Issue
Block a user