ETP 519 Update Sensor/State packet

Revision for “ETP 519 Update Sensor/State packet” created on November 18, 2015 @ 15:05:23

ETP 519 Update Sensor/State packet
<h6>1. PURPOSE / DESCRIPTION</h6> 1.1 To add/modify a state packet on DRONA firmware for WiRa_Board option <h6>2. TEST SET-UP</h6> 2.1 Drona: <a href=""></a>, version: 816ee47 <h6>3. PROCEDURE</h6> <p style="text-align: justify">3.1 The state packet requests are from WiRa, then the states will be sent back to WiRa. Currently, the state packets are STATE, SENSOR, GPS, and GAINS. Note that The GPS packet is unimplemented since GPS had not been interfaced then. For more details about the gains system, please check the ETP-520. 3.2 Every state packet request has its own command ID. The created ID should be put in <em>SDCommands.h</em>. For example, there are <em><strong>SDGetGainsCmdID</strong></em>, <em><strong>SDGetSensorsCmdID</strong></em>, <em><strong>SDGetGPSCmdID</strong></em>, and <em><strong>SDGetStateCmdID</strong></em>. 3.3 The function <em><strong>SDP_Process_Command()</strong> </em>processes the commands and remember to update the variable <em><strong>PacketState</strong> </em>to <em><strong>STATE_PACKET</strong> </em>for each command. 3.4 <em><strong>SDP_Continue</strong></em>() determines what kind of the packets should be built. The build packet function should be called here. (e.g. <em><strong>SDP_Build_Sensor_Packet()</strong></em>). 3.5 Update the <em><strong>WHICH_PACKET</strong> </em>enum which is defined in SDProtocol.c. Each state packet has its own number in the enum. That will be used for 3.4. 3.6 The packet structures are defined in SDProtocol.c (e.g. <em><strong>SDStatePacket</strong></em>, <em><strong>SDSensorPacket</strong></em>, and <em><strong>SDGPSPacket</strong></em>). The structure must follow the protocol. For more details about the SPI frame structure (protocol), please check the readme file ( under Selfi-Drone-Flight-Control (the codebase) directory. 3.6.1 Note that for all the state packet requests, the “Response” field in the packet header must be set to 1. 3.7 To build the state packets, please refer to functions “<em><strong>SDP_Build_xxx_Packet()</strong></em>”. You just need to fill the values you want in the structure fields. 3.8 Note that for the client APP, the command sets should be consistent with those defined in DRONA.</p>

OldNewDate CreatedAuthorActions
November 18, 2015 @ 15:05:23 Wanchen
November 18, 2015 @ 05:13:24 admin
November 17, 2015 @ 21:22:40 Wanchen
November 10, 2015 @ 20:10:25 Wanchen