Skip to content

Commit

Permalink
Merge pull request #347 from bbingju/master
Browse files Browse the repository at this point in the history
Fixed wrong assertions
  • Loading branch information
ataffanel authored Jul 4, 2018
2 parents ad62b75 + e5c7bfa commit ac99881
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/modules/src/crtp_commander_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ static void zDistanceDecoder(setpoint_t *setpoint, uint8_t type, const void *dat
{
const struct zDistancePacket_s *values = data;

ASSERT(datalen == sizeof(struct velocityPacket_s));

ASSERT(datalen == sizeof(struct zDistancePacket_s));

setpoint->mode.z = modeAbs;

Expand Down Expand Up @@ -245,7 +245,7 @@ static void altHoldDecoder(setpoint_t *setpoint, uint8_t type, const void *data,
{
const struct altHoldPacket_s *values = data;

ASSERT(datalen == sizeof(struct velocityPacket_s));
ASSERT(datalen == sizeof(struct altHoldPacket_s));


setpoint->mode.z = modeVelocity;
Expand Down Expand Up @@ -278,7 +278,7 @@ static void hoverDecoder(setpoint_t *setpoint, uint8_t type, const void *data, s
{
const struct hoverPacket_s *values = data;

ASSERT(datalen == sizeof(struct velocityPacket_s));
ASSERT(datalen == sizeof(struct hoverPacket_s));

setpoint->mode.z = modeAbs;
setpoint->position.z = values->zDistance;
Expand Down

0 comments on commit ac99881

Please sign in to comment.