?? readprotocols.m
字號:
function protocols = ReadProtocols(gps)
% READPROTOCOLS Read the Protocol Capability Protocol data from the GPS
% Return a structure with two fields:
% tag: Character tag identifying protocol family
% id: Numeric protocol identifier (within family)
global pid_protocol_array pid_ack_byte;
protocols = [];
if (get(gps, 'BytesAvailable') > 0)
[id, sz] = ReadPacketHeader(gps);
if (id == pid_protocol_array)
for i=1:sz
protocols(i).tag = fread(gps, 1);
protocols(i).id = fread(gps, 1, 'int16');
end
end
cksum = ReadPacketTerminator(gps);
csum = ComputeChecksum(id, [protocols.tag protocols.id]);
WritePacket(gps, pid_ack_byte, 0);
end
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -