small tweaks

This commit is contained in:
Robin Müller 2020-09-29 15:48:42 +02:00
parent 1ea1c8c02f
commit e1eb1a3be1

View File

@ -7,8 +7,8 @@
CService201HealthCommanding::CService201HealthCommanding(object_id_t objectId, CService201HealthCommanding::CService201HealthCommanding(object_id_t objectId,
uint16_t apid, uint8_t serviceId): uint16_t apid, uint8_t serviceId):
CommandingServiceBase(objectId, apid, serviceId, CommandingServiceBase(objectId, apid, serviceId,
NUMBER_OF_PARALLEL_COMMANDS,COMMAND_TIMEOUT_SECONDS) { NUMBER_OF_PARALLEL_COMMANDS,COMMAND_TIMEOUT_SECONDS) {
} }
CService201HealthCommanding::~CService201HealthCommanding() { CService201HealthCommanding::~CService201HealthCommanding() {
@ -56,8 +56,8 @@ ReturnValue_t CService201HealthCommanding::prepareCommand
if (result != RETURN_OK) { if (result != RETURN_OK) {
return result; return result;
} else { } else {
HealthMessage::setHealthMessage(dynamic_cast<CommandMessage*>(message), HealthMessage::setHealthMessage(message, HealthMessage::HEALTH_SET,
HealthMessage::HEALTH_SET, healthCommand.getHealth()); healthCommand.getHealth());
return result; return result;
} }
} }
@ -79,6 +79,6 @@ void CService201HealthCommanding::prepareHealthSetReply(
uint8_t health = static_cast<uint8_t>(HealthMessage::getHealth(reply)); uint8_t health = static_cast<uint8_t>(HealthMessage::getHealth(reply));
uint8_t oldHealth = static_cast<uint8_t>(HealthMessage::getOldHealth(reply)); uint8_t oldHealth = static_cast<uint8_t>(HealthMessage::getOldHealth(reply));
HealthSetReply healthSetReply(health, oldHealth); HealthSetReply healthSetReply(health, oldHealth);
sendTmPacket(Subservice::REPLY_HEALTH_SET,&healthSetReply); sendTmPacket(Subservice::REPLY_HEALTH_SET, &healthSetReply);
} }