Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added acknowledgement packet, of all zeros, to be sent back to the IR…
…C when the PC receives a packet with no status bits assigned.
  • Loading branch information
Christian committed May 15, 2020
1 parent 8126db8 commit 1f87163
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions msgHandler.m
Expand Up @@ -25,6 +25,13 @@ function msgHandler(msgData,fsm)
% Pass the current PoseID to the FSM
fsm.curPoseID = uint8(msgData(2));
fsm.ev_Req_Image_Capture();

% If none of the status bits are set, simply respond with an all-zeros
% message acknowledging receipt of the message.
else
bits = logical(zeros(1,64));
msg = uint8(bi2de(reshape(bits,8,[])','left-msb'))';
fwrite(fsm.dataStore.tcpConn,msg,'uint8');
end


Expand Down

0 comments on commit 1f87163

Please sign in to comment.