Skip to content

Commit

Permalink
Correctly unpack protocol commands (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
Xenoamor authored and kanflo committed Oct 20, 2019
1 parent 5cb7f72 commit e870b15
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions opendps/protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ bool protocol_unpack_response(frame_t *frame, command_t *cmd, uint8_t *success)

bool protocol_unpack_query_response(frame_t *frame, uint16_t *v_in, uint16_t *v_out_setting, uint16_t *v_out, uint16_t *i_out, uint16_t *i_limit, uint8_t *power_enabled)
{
command_t cmd;
uint8_t cmd;
uint8_t status;

start_frame_unpacking(frame);
Expand All @@ -104,7 +104,7 @@ bool protocol_unpack_query_response(frame_t *frame, uint16_t *v_in, uint16_t *v_

bool protocol_unpack_wifi_status(frame_t *frame, wifi_status_t *status)
{
command_t cmd;
uint8_t cmd;

start_frame_unpacking(frame);
UNPACK8(frame, &cmd);
Expand All @@ -115,7 +115,7 @@ bool protocol_unpack_wifi_status(frame_t *frame, wifi_status_t *status)

bool protocol_unpack_lock(frame_t *frame, uint8_t *locked)
{
command_t cmd;
uint8_t cmd;

start_frame_unpacking(frame);
UNPACK8(frame, &cmd);
Expand All @@ -127,7 +127,7 @@ bool protocol_unpack_lock(frame_t *frame, uint8_t *locked)

bool protocol_unpack_upgrade_start(frame_t *frame, uint16_t *chunk_size, uint16_t *crc)
{
command_t cmd;
uint8_t cmd;

start_frame_unpacking(frame);
UNPACK8(frame, &cmd);
Expand All @@ -139,7 +139,7 @@ bool protocol_unpack_upgrade_start(frame_t *frame, uint16_t *chunk_size, uint16_

bool protocol_unpack_ocp(frame_t *frame, uint16_t *i_cut)
{
command_t cmd;
uint8_t cmd;

start_frame_unpacking(frame);
UNPACK8(frame, &cmd);
Expand Down

0 comments on commit e870b15

Please sign in to comment.