Update FSFW #51

Merged
meierj merged 8 commits from mueller/master into eive/develop 2022-04-01 14:51:32 +02:00
3 changed files with 13 additions and 18 deletions
Showing only changes of commit 1bc7a91869 - Show all commits

View File

@ -12,16 +12,13 @@
class Gpio { class Gpio {
public: public:
Gpio(gpioId_t gpioId, GpioIF* gpioIF) : gpioId(gpioId), gpioIF(gpioIF) { Gpio(gpioId_t gpioId, GpioIF* gpioIF) : gpioId(gpioId), gpioIF(gpioIF) {
if (gpioIF == nullptr) { if (gpioIF == nullptr) {
sif::error << "Gpio::Gpio: Invalid GpioIF" << std::endl; sif::error << "Gpio::Gpio: Invalid GpioIF" << std::endl;
} }
}
ReturnValue_t pullHigh() {
return gpioIF->pullHigh(gpioId);
}
ReturnValue_t pullLow() {
return gpioIF->pullLow(gpioId);
} }
ReturnValue_t pullHigh() { return gpioIF->pullHigh(gpioId); }
ReturnValue_t pullLow() { return gpioIF->pullLow(gpioId); }
private: private:
gpioId_t gpioId = gpio::NO_GPIO; gpioId_t gpioId = gpio::NO_GPIO;
GpioIF* gpioIF = nullptr; GpioIF* gpioIF = nullptr;

View File

@ -18,8 +18,7 @@ class CommandActionHelper {
virtual ~CommandActionHelper(); virtual ~CommandActionHelper();
ReturnValue_t commandAction(object_id_t commandTo, ActionId_t actionId, ReturnValue_t commandAction(object_id_t commandTo, ActionId_t actionId,
const uint8_t* data = nullptr, uint32_t size = 0); const uint8_t* data = nullptr, uint32_t size = 0);
ReturnValue_t commandAction(object_id_t commandTo, ActionId_t actionId, ReturnValue_t commandAction(object_id_t commandTo, ActionId_t actionId, SerializeIF* data);
SerializeIF* data);
ReturnValue_t initialize(); ReturnValue_t initialize();
ReturnValue_t handleReply(CommandMessage* reply); ReturnValue_t handleReply(CommandMessage* reply);
uint8_t getCommandCount() const; uint8_t getCommandCount() const;

View File

@ -466,16 +466,15 @@ size_t DeviceHandlerBase::getNextReplyLength(DeviceCommandId_t commandId) {
DeviceCommandId_t replyId = NO_COMMAND_ID; DeviceCommandId_t replyId = NO_COMMAND_ID;
DeviceCommandMap::iterator command = cookieInfo.pendingCommand; DeviceCommandMap::iterator command = cookieInfo.pendingCommand;
if (command->second.useAlternativeReplyId) { if (command->second.useAlternativeReplyId) {
replyId = command->second.alternativeReplyId; replyId = command->second.alternativeReplyId;
} } else {
else { replyId = commandId;
replyId = commandId;
} }
DeviceReplyIter iter = deviceReplyMap.find(replyId); DeviceReplyIter iter = deviceReplyMap.find(replyId);
if (iter != deviceReplyMap.end()) { if (iter != deviceReplyMap.end()) {
if (iter->second.delayCycles != 0) { if (iter->second.delayCycles != 0) {
return iter->second.replyLen; return iter->second.replyLen;
} }
} }
return 0; return 0;
} }