rw wip
This commit is contained in:
@ -6,7 +6,8 @@
|
||||
|
||||
RwHandler::RwHandler(object_id_t objectId, object_id_t comIF, CookieIF * comCookie,
|
||||
LinuxLibgpioIF* gpioComIF, gpioId_t enableGpio) :
|
||||
DeviceHandlerBase(objectId, comIF, comCookie), temperatureSet(this), statusSet(this) {
|
||||
DeviceHandlerBase(objectId, comIF, comCookie), gpioComIF(gpioComIF), enableGpio(enableGpio),
|
||||
temperatureSet(this), statusSet(this) {
|
||||
if (comCookie == NULL) {
|
||||
sif::error << "RwHandler: Invalid com cookie" << std::endl;
|
||||
}
|
||||
@ -19,6 +20,9 @@ RwHandler::~RwHandler() {
|
||||
}
|
||||
|
||||
void RwHandler::doStartUp() {
|
||||
if(gpioComIF->pullHigh(enableGpio) != RETURN_OK) {
|
||||
sif::debug << "RwHandler::doStartUp: Failed to pull enable gpio to high";
|
||||
}
|
||||
#if OBSW_SWITCH_TO_NORMAL_MODE_AFTER_STARTUP == 1
|
||||
setMode(MODE_NORMAL);
|
||||
#else
|
||||
@ -27,7 +31,9 @@ void RwHandler::doStartUp() {
|
||||
}
|
||||
|
||||
void RwHandler::doShutDown() {
|
||||
|
||||
if(gpioComIF->pullLow(enableGpio) != RETURN_OK) {
|
||||
sif::debug << "RwHandler::doStartUp: Failed to pull enable gpio to low";
|
||||
}
|
||||
}
|
||||
|
||||
ReturnValue_t RwHandler::buildNormalDeviceCommand(DeviceCommandId_t * id) {
|
||||
|
Reference in New Issue
Block a user