1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2<html xmlns="http://www.w3.org/1999/xhtml"> 3<head> 4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> 5<meta http-equiv="X-UA-Compatible" content="IE=9"/> 6<meta name="generator" content="Doxygen 1.8.13"/> 7<meta name="viewport" content="width=device-width, initial-scale=1"/> 8<title>ISSDK: algorithms/sensorfusion/sources/DecodeCommandBytes.c Source File</title> 9<link href="tabs.css" rel="stylesheet" type="text/css"/> 10<script type="text/javascript" src="jquery.js"></script> 11<script type="text/javascript" src="dynsections.js"></script> 12<link href="issdk_stylesheet.css" rel="stylesheet" type="text/css" /> 13</head> 14<body> 15<div id="top"><!-- do not remove this div, it is closed by doxygen! --> 16<div id="titlearea"> 17<table cellspacing="0" cellpadding="0"> 18 <tbody> 19 <tr style="height: 56px;"> 20 <td id="projectlogo"><img alt="Logo" src="nxp_logo_small.png"/></td> 21 <td id="projectalign" style="padding-left: 0.5em;"> 22 <div id="projectname">ISSDK 23  <span id="projectnumber">1.8</span> 24 </div> 25 <div id="projectbrief">IoT Sensing Software Development Kit</div> 26 </td> 27 </tr> 28 </tbody> 29</table> 30</div> 31<!-- end header part --> 32<!-- Generated by Doxygen 1.8.13 --> 33<script type="text/javascript" src="menudata.js"></script> 34<script type="text/javascript" src="menu.js"></script> 35<script type="text/javascript"> 36$(function() { 37 initMenu('',false,false,'search.php','Search'); 38}); 39</script> 40<div id="main-nav"></div> 41<div id="nav-path" class="navpath"> 42 <ul> 43<li class="navelem"><a class="el" href="dir_c0ce462e37efe0a8d60c01d75f78f8a0.html">algorithms</a></li><li class="navelem"><a class="el" href="dir_cb8ed5ffd1f20a5af7e420f81f312621.html">sensorfusion</a></li><li class="navelem"><a class="el" href="dir_c60867674b20e7d761cd401b87ce879d.html">sources</a></li> </ul> 44</div> 45</div><!-- top --> 46<div class="header"> 47 <div class="headertitle"> 48<div class="title">DecodeCommandBytes.c</div> </div> 49</div><!--header--> 50<div class="contents"> 51<a href="a00794.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * Copyright (c) 2015, Freescale Semiconductor, Inc.</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> * Copyright 2016-2017 NXP</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * All rights reserved.</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> *</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * SPDX-License-Identifier: BSD-3-Clause</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> */</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"></span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment">/*! \file DecodeCommandBytes.c</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> \brief Command interpreter which interfaces to the Sensor Fusion Toolbox</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment">*/</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> </div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="preprocessor">#include "<a class="code" href="a00914.html">sensor_fusion.h</a>"</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="preprocessor">#include "<a class="code" href="a00779.html">control.h</a>"</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="preprocessor">#include "<a class="code" href="a00848.html">fusion.h</a>"</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="preprocessor">#include "<a class="code" href="a00773.html">calibration_storage.h</a>"</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment">// All commands for the command interpreter are exactly 4 characters long.</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment">// The command interpeter converts the incoming packet to a 32-bit integer, which is then</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment">// the index into a large switch statement for processing commands.</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment">// The following block of #define statements are responsible for the conversion from 4-characters</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment">// into an easier to use integer format.</span></div><div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="a00794.html#ae90e11c13d62e92a87653100abbae5f6"> 22</a></span> <span class="preprocessor">#define cmd_VGplus (((((('V' << 8) | 'G') << 8) | '+') << 8) | ' ') // "VG+ " = enable angular velocity packet transmission</span></div><div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="a00794.html#a8575115e8a73d926b79c784e257c6b80"> 23</a></span> <span class="preprocessor">#define cmd_VGminus (((((('V' << 8) | 'G') << 8) | '-') << 8) | ' ') // "VG- " = disable angular velocity packet transmission</span></div><div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="a00794.html#a30baca94d6d21194de5b2e2c5db4f47a"> 24</a></span> <span class="preprocessor">#define cmd_DBplus (((((('D' << 8) | 'B') << 8) | '+') << 8) | ' ') // "DB+ " = enable debug packet transmission</span></div><div class="line"><a name="l00025"></a><span class="lineno"><a class="line" href="a00794.html#a6cbd87a8022fb7f5194e2a915c4ba297"> 25</a></span> <span class="preprocessor">#define cmd_DBminus (((((('D' << 8) | 'B') << 8) | '-') << 8) | ' ') // "DB- " = disable debug packet transmission</span></div><div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="a00794.html#ae6181510482b0abbaac4d594b1bf2038"> 26</a></span> <span class="preprocessor">#define cmd_Q3 (((((('Q' << 8) | '3') << 8) | ' ') << 8) | ' ') // "Q3 " = transmit 3-axis accelerometer quaternion in standard packet</span></div><div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="a00794.html#a81db55b5fd6648ddbcd12565be5b9e6c"> 27</a></span> <span class="preprocessor">#define cmd_Q3M (((((('Q' << 8) | '3') << 8) | 'M') << 8) | ' ') // "Q3M " = transmit 3-axis magnetic quaternion in standard packet</span></div><div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="a00794.html#ac161c67ce40e2bd748d11aa7d89ef5c0"> 28</a></span> <span class="preprocessor">#define cmd_Q3G (((((('Q' << 8) | '3') << 8) | 'G') << 8) | ' ') // "Q3G " = transmit 3-axis gyro quaternion in standard packet</span></div><div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="a00794.html#aa0705e68b33dccd313303c5ca6bfd2c1"> 29</a></span> <span class="preprocessor">#define cmd_Q6MA (((((('Q' << 8) | '6') << 8) | 'M') << 8) | 'A') // "Q6MA" = transmit 6-axis mag/accel quaternion in standard packet</span></div><div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="a00794.html#aa3bc6121f421435af64bce070b01dbdc"> 30</a></span> <span class="preprocessor">#define cmd_Q6AG (((((('Q' << 8) | '6') << 8) | 'A') << 8) | 'G') // "Q6AG" = transmit 6-axis accel/gyro quaternion in standard packet</span></div><div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="a00794.html#a87d418912514db68d46a19488a880c2f"> 31</a></span> <span class="preprocessor">#define cmd_Q9 (((((('Q' << 8) | '9') << 8) | ' ') << 8) | ' ') // "Q9 " = transmit 9-axis quaternion in standard packet (default)</span></div><div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="a00794.html#a953d0fd1fea12cf41524b0a185417f06"> 32</a></span> <span class="preprocessor">#define cmd_RPCplus (((((('R' << 8) | 'P') << 8) | 'C') << 8) | '+') // "RPC+" = Roll/Pitch/Compass on</span></div><div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="a00794.html#a14df47d70ca8a588e5262fbb47b17f2d"> 33</a></span> <span class="preprocessor">#define cmd_RPCminus (((((('R' << 8) | 'P') << 8) | 'C') << 8) | '-') // "RPC-" = Roll/Pitch/Compass off</span></div><div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="a00794.html#a77aec193d3c012a98fdb4e8a561e5ac0"> 34</a></span> <span class="preprocessor">#define cmd_ALTplus (((((('A' << 8) | 'L') << 8) | 'T') << 8) | '+') // "ALT+" = Altitude packet on</span></div><div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="a00794.html#ac179cba01ef1197e611985a5ec22cab3"> 35</a></span> <span class="preprocessor">#define cmd_ALTminus (((((('A' << 8) | 'L') << 8) | 'T') << 8) | '-') // "ALT-" = Altitude packet off</span></div><div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="a00794.html#a50e5ea9fc776358f895a2968208bd03b"> 36</a></span> <span class="preprocessor">#define cmd_RST (((((('R' << 8) | 'S') << 8) | 'T') << 8) | ' ') // "RST " = Soft reset</span></div><div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="a00794.html#ab7d2798980bde69b87a1a81fde8a6f67"> 37</a></span> <span class="preprocessor">#define cmd_RINS (((((('R' << 8) | 'I') << 8) | 'N') << 8) | 'S') // "RINS" = Reset INS inertial navigation velocity and position</span></div><div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="a00794.html#a3cc848ec4b05581fe6ce5d8e6f56dc81"> 38</a></span> <span class="preprocessor">#define cmd_SVAC (((((('S' << 8) | 'V') << 8) | 'A') << 8) | 'C') // "SVAC" = save all calibrations to Kinetis flash</span></div><div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="a00794.html#a3a405d845cef7219b70ffda126a81628"> 39</a></span> <span class="preprocessor">#define cmd_SVMC (((((('S' << 8) | 'V') << 8) | 'M') << 8) | 'C') // "SVMC" = save magnetic calibration to Kinetis flash</span></div><div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="a00794.html#a3ff024f45923953ec5a745a5531a321c"> 40</a></span> <span class="preprocessor">#define cmd_SVYC (((((('S' << 8) | 'V') << 8) | 'Y') << 8) | 'C') // "SVYC" = save gyroscope calibration to Kinetis flash</span></div><div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="a00794.html#a3e8753c5d2c241fa11641aed410e4f8c"> 41</a></span> <span class="preprocessor">#define cmd_SVGC (((((('S' << 8) | 'V') << 8) | 'G') << 8) | 'C') // "SVGC" = save precision accelerometer calibration to Kinetis flash</span></div><div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="a00794.html#ae8e28a3f46f0d3ef5adb7d63e4088069"> 42</a></span> <span class="preprocessor">#define cmd_ERAC (((((('E' << 8) | 'R') << 8) | 'A') << 8) | 'C') // "ERAC" = erase all calibrations from Kinetis flash</span></div><div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="a00794.html#a6efbc8ec1703837c7adfa0811a2b161e"> 43</a></span> <span class="preprocessor">#define cmd_ERMC (((((('E' << 8) | 'R') << 8) | 'M') << 8) | 'C') // "ERMC" = erase magnetic calibration from Kinetis flash</span></div><div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="a00794.html#acfa5e01345e04a72281328adee65ab90"> 44</a></span> <span class="preprocessor">#define cmd_ERYC (((((('E' << 8) | 'R') << 8) | 'Y') << 8) | 'C') // "ERYC" = erase gyro offset calibration from Kinetis flash</span></div><div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="a00794.html#a36bd60163958f225c8f069d209fbe4be"> 45</a></span> <span class="preprocessor">#define cmd_ERGC (((((('E' << 8) | 'R') << 8) | 'G') << 8) | 'C') // "ERGC" = erase precision accelerometer calibration from Kinetis flash</span></div><div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="a00794.html#ad033b9f4b4e5b8be0287ae3c40276dbc"> 46</a></span> <span class="preprocessor">#define cmd_180X (((((('1' << 8) | '8') << 8) | '0') << 8) | 'X') // "180X" perturbation</span></div><div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="a00794.html#a52de366ecfe399da8ba3326fedf2f134"> 47</a></span> <span class="preprocessor">#define cmd_180Y (((((('1' << 8) | '8') << 8) | '0') << 8) | 'Y') // "180Y" perturbation</span></div><div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="a00794.html#a7e4a1d4a077dd963999e128207315013"> 48</a></span> <span class="preprocessor">#define cmd_180Z (((((('1' << 8) | '8') << 8) | '0') << 8) | 'Z') // "180Z" perturbation</span></div><div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="a00794.html#a587d3e585fef780d1e9797700bf167a1"> 49</a></span> <span class="preprocessor">#define cmd_M90X (((((('M' << 8) | '9') << 8) | '0') << 8) | 'X') // "M90X" perturbation</span></div><div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="a00794.html#acabfcfb0cdc412a7ce2a27741190b641"> 50</a></span> <span class="preprocessor">#define cmd_P90X (((((('P' << 8) | '9') << 8) | '0') << 8) | 'X') // "P90X" perturbation</span></div><div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="a00794.html#ac6da8c3ac3abee673486071cea68ce3b"> 51</a></span> <span class="preprocessor">#define cmd_M90Y (((((('M' << 8) | '9') << 8) | '0') << 8) | 'Y') // "M90Y" perturbation</span></div><div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="a00794.html#aa4ae8da7bfe2f6071b3ea9cf2daf7fce"> 52</a></span> <span class="preprocessor">#define cmd_P90Y (((((('P' << 8) | '9') << 8) | '0') << 8) | 'Y') // "P90Y" perturbation</span></div><div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="a00794.html#aa01c75cd9d2ed3ec5acec36d0cdfd945"> 53</a></span> <span class="preprocessor">#define cmd_M90Z (((((('M' << 8) | '9') << 8) | '0') << 8) | 'Z') // "M90Z" perturbation</span></div><div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="a00794.html#a95bc67aca1714fa6770555292aab7c92"> 54</a></span> <span class="preprocessor">#define cmd_P90Z (((((('P' << 8) | '9') << 8) | '0') << 8) | 'Z') // "P90Z" perturbation</span></div><div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="a00794.html#a6bb3c28d40d2b6aa9823b6756343dd26"> 55</a></span> <span class="preprocessor">#define cmd_PA00 (((((('P' << 8) | 'A') << 8) | '0') << 8) | '0') // "PA00" average precision accelerometer location 0</span></div><div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="a00794.html#a0e9e74197631e89642cbf30fd5ed24d1"> 56</a></span> <span class="preprocessor">#define cmd_PA01 (((((('P' << 8) | 'A') << 8) | '0') << 8) | '1') // "PA01" average precision accelerometer location 1</span></div><div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="a00794.html#ad85f9c00a94b924326f16034579b9039"> 57</a></span> <span class="preprocessor">#define cmd_PA02 (((((('P' << 8) | 'A') << 8) | '0') << 8) | '2') // "PA02" average precision accelerometer location 2</span></div><div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="a00794.html#af84fa2d4c0e6d418fdf1f1dfff441bfe"> 58</a></span> <span class="preprocessor">#define cmd_PA03 (((((('P' << 8) | 'A') << 8) | '0') << 8) | '3') // "PA03" average precision accelerometer location 3</span></div><div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="a00794.html#abb76efa2b507e0da516441a705efc24b"> 59</a></span> <span class="preprocessor">#define cmd_PA04 (((((('P' << 8) | 'A') << 8) | '0') << 8) | '4') // "PA04" average precision accelerometer location 4</span></div><div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="a00794.html#afc3b6aaa4ee5424ea531d9e783b7b69f"> 60</a></span> <span class="preprocessor">#define cmd_PA05 (((((('P' << 8) | 'A') << 8) | '0') << 8) | '5') // "PA05" average precision accelerometer location 5</span></div><div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="a00794.html#a5959c5ca910013194a971227e6ac7d57"> 61</a></span> <span class="preprocessor">#define cmd_PA06 (((((('P' << 8) | 'A') << 8) | '0') << 8) | '6') // "PA06" average precision accelerometer location 6</span></div><div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="a00794.html#ab8f562d6e310fcc50b3437b9c844d950"> 62</a></span> <span class="preprocessor">#define cmd_PA07 (((((('P' << 8) | 'A') << 8) | '0') << 8) | '7') // "PA07" average precision accelerometer location 7</span></div><div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="a00794.html#a5de3645a828c5df60ef915fb28c5882b"> 63</a></span> <span class="preprocessor">#define cmd_PA08 (((((('P' << 8) | 'A') << 8) | '0') << 8) | '8') // "PA08" average precision accelerometer location 8</span></div><div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="a00794.html#a59c9ff7a3b6b88513e8ece6ebaa0390b"> 64</a></span> <span class="preprocessor">#define cmd_PA09 (((((('P' << 8) | 'A') << 8) | '0') << 8) | '9') // "PA09" average precision accelerometer location 9</span></div><div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="a00794.html#aaf59580bf7ec60ec94973212786a1126"> 65</a></span> <span class="preprocessor">#define cmd_PA10 (((((('P' << 8) | 'A') << 8) | '1') << 8) | '0') // "PA10" average precision accelerometer location 10</span></div><div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="a00794.html#a2b71412b44a575e0733a1a43a266b15a"> 66</a></span> <span class="preprocessor">#define cmd_PA11 (((((('P' << 8) | 'A') << 8) | '1') << 8) | '1') // "PA11" average precision accelerometer location 11</span></div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span> </div><div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="a00794.html#a2d80b68d03de87c2d3cce67273f8a165"> 68</a></span> <span class="keywordtype">void</span> <a class="code" href="a00794.html#a2d80b68d03de87c2d3cce67273f8a165">DecodeCommandBytes</a>(<a class="code" href="a04047.html">SensorFusionGlobals</a> *<a class="code" href="a00470.html#afa81c629d378fe700f351a1bce411ad5">sfg</a>, <span class="keywordtype">char</span> iCommandBuffer[], <a class="code" href="a00914.html#a33a5e996e7a90acefb8b1c0bea47e365">uint8</a> sUART_InputBuffer[], <a class="code" href="a00914.html#ac2a9e79eb120216f855626495b7bd18a">uint16</a> nbytes)</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span> {</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  <a class="code" href="a00914.html#ab7903878916593daecbeb95b98115ab0">int32</a> isum; <span class="comment">// 32 bit command identifier</span></div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  <a class="code" href="a00914.html#aa0d0fdc87fd135ef2bedb030901cdb9c">int16</a> i, j; <span class="comment">// loop counters</span></div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span> </div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  <span class="comment">// parse all received bytes in sUARTInputBuf into the iCommandBuffer delay line</span></div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  <span class="keywordflow">for</span> (i = 0; i < nbytes; i++) {</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <span class="comment">// shuffle the iCommandBuffer delay line and add the new command byte</span></div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <span class="keywordflow">for</span> (j = 0; j < 3; j++)</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  iCommandBuffer[j] = iCommandBuffer[j + 1];</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  iCommandBuffer[3] = sUART_InputBuffer[i];</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span> </div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  <span class="comment">// check if we have a valid command yet</span></div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  isum = ((((((<a class="code" href="a00914.html#ab7903878916593daecbeb95b98115ab0">int32</a>)iCommandBuffer[0] << 8) | iCommandBuffer[1]) << 8) | iCommandBuffer[2]) << 8) | iCommandBuffer[3];</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  <span class="keywordflow">switch</span> (isum) {</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#ae90e11c13d62e92a87653100abbae5f6">cmd_VGplus</a>: <span class="comment">// "VG+ " = enable angular velocity packet transmission</span></div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  sfg-><a class="code" href="a04047.html#a51cbe943cdee0fd0a2ff72d2a04fad9a">pControlSubsystem</a>-><a class="code" href="a03967.html#a527b159143188ef9b66bd4c8a6aefcdf">AngularVelocityPacketOn</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span> </div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#a8575115e8a73d926b79c784e257c6b80">cmd_VGminus</a>: <span class="comment">// "VG- " = disable angular velocity packet transmission</span></div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  sfg-><a class="code" href="a04047.html#a51cbe943cdee0fd0a2ff72d2a04fad9a">pControlSubsystem</a>-><a class="code" href="a03967.html#a527b159143188ef9b66bd4c8a6aefcdf">AngularVelocityPacketOn</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span> </div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#a30baca94d6d21194de5b2e2c5db4f47a">cmd_DBplus</a>: <span class="comment">// "DB+ " = enable debug packet transmission</span></div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  sfg-><a class="code" href="a04047.html#a51cbe943cdee0fd0a2ff72d2a04fad9a">pControlSubsystem</a>-><a class="code" href="a03967.html#a41ad90f99ac3c14b2bdce3967df14f1b">DebugPacketOn</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span> </div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#a6cbd87a8022fb7f5194e2a915c4ba297">cmd_DBminus</a>: <span class="comment">// "DB- " = disable debug packet transmission</span></div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  sfg-><a class="code" href="a04047.html#a51cbe943cdee0fd0a2ff72d2a04fad9a">pControlSubsystem</a>-><a class="code" href="a03967.html#a41ad90f99ac3c14b2bdce3967df14f1b">DebugPacketOn</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span> </div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#ae6181510482b0abbaac4d594b1bf2038">cmd_Q3</a>: <span class="comment">// "Q3 " = transmit 3-axis accelerometer quaternion in standard packet</span></div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span> <span class="preprocessor">#if F_3DOF_G_BASIC</span></div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  sfg-><a class="code" href="a04047.html#a51cbe943cdee0fd0a2ff72d2a04fad9a">pControlSubsystem</a>-><a class="code" href="a03967.html#a560615429c69fcefa85de0624fa6d83e">QuaternionPacketType</a> = <a class="code" href="a00914.html#a5f469312b3865f2d3efea2edd6f8afaaa19bd87b11e82b9047ad750fb62711ba8">Q3</a>;</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span> </div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#a81db55b5fd6648ddbcd12565be5b9e6c">cmd_Q3M</a>: <span class="comment">// "Q3M " = transmit 3-axis magnetometer quaternion in standard packet</span></div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span> <span class="preprocessor">#if F_3DOF_B_BASIC</span></div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  sfg-><a class="code" href="a04047.html#a51cbe943cdee0fd0a2ff72d2a04fad9a">pControlSubsystem</a>-><a class="code" href="a03967.html#a560615429c69fcefa85de0624fa6d83e">QuaternionPacketType</a> = <a class="code" href="a00914.html#a5f469312b3865f2d3efea2edd6f8afaaada2dae63d5865a8446caa7938c73c5dc">Q3M</a>;</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span> </div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#ac161c67ce40e2bd748d11aa7d89ef5c0">cmd_Q3G</a>: <span class="comment">// "Q3G " = transmit 3-axis gyro quaternion in standard packet</span></div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span> <span class="preprocessor">#if F_3DOF_Y_BASIC</span></div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  sfg-><a class="code" href="a04047.html#a51cbe943cdee0fd0a2ff72d2a04fad9a">pControlSubsystem</a>-><a class="code" href="a03967.html#a560615429c69fcefa85de0624fa6d83e">QuaternionPacketType</a> = <a class="code" href="a00914.html#a5f469312b3865f2d3efea2edd6f8afaaaf63c9f6fec59717499a84048f682cf8a">Q3G</a>;</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span> </div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#aa0705e68b33dccd313303c5ca6bfd2c1">cmd_Q6MA</a>: <span class="comment">// "Q6MA" = transmit 6-axis mag/accel quaternion in standard packet</span></div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span> <span class="preprocessor">#if F_6DOF_GB_BASIC</span></div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  sfg-><a class="code" href="a04047.html#a51cbe943cdee0fd0a2ff72d2a04fad9a">pControlSubsystem</a>-><a class="code" href="a03967.html#a560615429c69fcefa85de0624fa6d83e">QuaternionPacketType</a> = <a class="code" href="a00914.html#a5f469312b3865f2d3efea2edd6f8afaaa0cf62dda224dcbac09ae26cd46ccce01">Q6MA</a>;</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span> </div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#aa3bc6121f421435af64bce070b01dbdc">cmd_Q6AG</a>: <span class="comment">// "Q6AG" = transmit 6-axis accel/gyro quaternion in standard packet</span></div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span> <span class="preprocessor">#if F_6DOF_GY_KALMAN</span></div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  sfg-><a class="code" href="a04047.html#a51cbe943cdee0fd0a2ff72d2a04fad9a">pControlSubsystem</a>-><a class="code" href="a03967.html#a560615429c69fcefa85de0624fa6d83e">QuaternionPacketType</a> = <a class="code" href="a00914.html#a5f469312b3865f2d3efea2edd6f8afaaa59c8dc55b720396019ef93eb943a3b96">Q6AG</a>;</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span> </div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#a87d418912514db68d46a19488a880c2f">cmd_Q9</a>: <span class="comment">// "Q9 " = transmit 9-axis quaternion in standard packet (default)</span></div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span> <span class="preprocessor">#if F_9DOF_GBY_KALMAN</span></div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  sfg-><a class="code" href="a04047.html#a51cbe943cdee0fd0a2ff72d2a04fad9a">pControlSubsystem</a>-><a class="code" href="a03967.html#a560615429c69fcefa85de0624fa6d83e">QuaternionPacketType</a> = <a class="code" href="a00914.html#a5f469312b3865f2d3efea2edd6f8afaaa9c5ceeb2bc9bf27379c7e72bc4d0ff13">Q9</a>;</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span> </div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#a953d0fd1fea12cf41524b0a185417f06">cmd_RPCplus</a>: <span class="comment">// "RPC+" = Roll/Pitch/Compass on</span></div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  sfg-><a class="code" href="a04047.html#a51cbe943cdee0fd0a2ff72d2a04fad9a">pControlSubsystem</a>-><a class="code" href="a03967.html#a6c5365ebe170e2ee207212da7531ccea">RPCPacketOn</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span> </div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#a14df47d70ca8a588e5262fbb47b17f2d">cmd_RPCminus</a>: <span class="comment">// "RPC-" = Roll/Pitch/Compass off</span></div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  sfg-><a class="code" href="a04047.html#a51cbe943cdee0fd0a2ff72d2a04fad9a">pControlSubsystem</a>-><a class="code" href="a03967.html#a6c5365ebe170e2ee207212da7531ccea">RPCPacketOn</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span> </div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#a77aec193d3c012a98fdb4e8a561e5ac0">cmd_ALTplus</a>: <span class="comment">// "ALT+" = Altitude packet on</span></div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  sfg-><a class="code" href="a04047.html#a51cbe943cdee0fd0a2ff72d2a04fad9a">pControlSubsystem</a>-><a class="code" href="a03967.html#af46ef3a1af714f7d40707053964db4a8">AltPacketOn</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span> </div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#ac179cba01ef1197e611985a5ec22cab3">cmd_ALTminus</a>: <span class="comment">// "ALT-" = Altitude packet off</span></div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  sfg-><a class="code" href="a04047.html#a51cbe943cdee0fd0a2ff72d2a04fad9a">pControlSubsystem</a>-><a class="code" href="a03967.html#af46ef3a1af714f7d40707053964db4a8">AltPacketOn</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span> </div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#a50e5ea9fc776358f895a2968208bd03b">cmd_RST</a>: <span class="comment">// "RST " = Soft reset</span></div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  <span class="comment">// reset sensor fusion</span></div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  <a class="code" href="a00845.html#ad9cb3659204ae7a30109ceaf4d94ecec">fInitializeFusion</a>(sfg);</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span> </div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  <span class="comment">// reset magnetic calibration and magnetometer data buffer</span></div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span> <span class="preprocessor">#if F_USING_MAG</span></div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  <a class="code" href="a00854.html#a0671e3b0a0f73cd25a9880f1e14d5cb0">fInitializeMagCalibration</a>(&sfg-><a class="code" href="a04047.html#ab9b83bac9b472c5ce93500d07485d826">MagCal</a>, &sfg-><a class="code" href="a04047.html#a987fc4c5dd36f2058beb0ca0a340174c">MagBuffer</a>);</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  <span class="comment">// reset precision accelerometer calibration and accelerometer measurements</span></div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span> <span class="preprocessor">#if F_USING_ACCEL</span></div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  <a class="code" href="a00905.html#ab8572ce21837538a984e62035db4d89e">fInitializeAccelCalibration</a>(&sfg->AccelCal, &sfg->AccelBuffer, &(sfg-><a class="code" href="a04047.html#a51cbe943cdee0fd0a2ff72d2a04fad9a">pControlSubsystem</a>-><a class="code" href="a03967.html#aa62f07fac570bf67c0832d4bf7d38e76">AccelCalPacketOn</a>)) ;</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span> </div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#ab7d2798980bde69b87a1a81fde8a6f67">cmd_RINS</a>: <span class="comment">// "RINS" = Reset INS inertial navigation velocity and position</span></div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span> <span class="preprocessor">#if F_9DOF_GBY_KALMAN</span></div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  <span class="keywordflow">for</span> (i = <a class="code" href="a00914.html#a48bbd27e913de8d7749dff9dec2fe816">CHX</a>; i <= <a class="code" href="a00914.html#a76143891435bdd7248857e45b93521ed">CHZ</a>; i++) {</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  sfg->SV_9DOF_GBY_KALMAN.fVelGl[i] = 0.0F;</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  sfg->SV_9DOF_GBY_KALMAN.fDisGl[i] = 0.0F;</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  }</div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span> </div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#a3cc848ec4b05581fe6ce5d8e6f56dc81">cmd_SVAC</a>: <span class="comment">// "SVAC" = save all calibrations to Kinetis flash</span></div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  <a class="code" href="a00770.html#ad08799ac63701e755fe2414b32f69b50">SaveMagCalibrationToNVM</a>(sfg);</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  <a class="code" href="a00770.html#aa5684d700f135264e542f33071ed6a45">SaveGyroCalibrationToNVM</a>(sfg);</div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  <a class="code" href="a00770.html#a6cbf0fc4417e3a411a9685e2a92f1816">SaveAccelCalibrationToNVM</a>(sfg);</div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span> </div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#a3a405d845cef7219b70ffda126a81628">cmd_SVMC</a>: <span class="comment">// "SVMC" = save magnetic calibration to Kinetis flash</span></div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  <a class="code" href="a00770.html#ad08799ac63701e755fe2414b32f69b50">SaveMagCalibrationToNVM</a>(sfg);</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span> </div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#a3ff024f45923953ec5a745a5531a321c">cmd_SVYC</a>: <span class="comment">// "SVYC" = save gyroscope calibration to Kinetis flash</span></div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  <a class="code" href="a00770.html#aa5684d700f135264e542f33071ed6a45">SaveGyroCalibrationToNVM</a>(sfg);</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span> </div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#a3e8753c5d2c241fa11641aed410e4f8c">cmd_SVGC</a>: <span class="comment">// "SVGC" = save precision accelerometer calibration to Kinetis flash</span></div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  <a class="code" href="a00770.html#a6cbf0fc4417e3a411a9685e2a92f1816">SaveAccelCalibrationToNVM</a>(sfg);</div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span> </div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#ae8e28a3f46f0d3ef5adb7d63e4088069">cmd_ERAC</a>: <span class="comment">// "ERAC" = erase all calibrations from Kinetis flash</span></div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  <a class="code" href="a00770.html#a5004646fd5b485a74892b17e4a3af15b">EraseMagCalibrationFromNVM</a>();</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  <a class="code" href="a00770.html#a98044dd5ba8a80f7e92b4567725e5193">EraseGyroCalibrationFromNVM</a>();</div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  <a class="code" href="a00770.html#a3b4a1193ece3947c38651156293a7623">EraseAccelCalibrationFromNVM</a>();</div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span> </div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#a6efbc8ec1703837c7adfa0811a2b161e">cmd_ERMC</a>: <span class="comment">// "ERMC" = erase magnetic calibration offset 0 bytes from Kinetis flash</span></div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  <a class="code" href="a00770.html#a5004646fd5b485a74892b17e4a3af15b">EraseMagCalibrationFromNVM</a>();</div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00223"></a><span class="lineno"> 223</span> </div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#acfa5e01345e04a72281328adee65ab90">cmd_ERYC</a>: <span class="comment">// "ERYC" = erase gyro offset calibrationoffset 128 bytes from Kinetis flash</span></div><div class="line"><a name="l00225"></a><span class="lineno"> 225</span>  <a class="code" href="a00770.html#a98044dd5ba8a80f7e92b4567725e5193">EraseGyroCalibrationFromNVM</a>();</div><div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span> </div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#a36bd60163958f225c8f069d209fbe4be">cmd_ERGC</a>: <span class="comment">// "ERGC" = erase precision accelerometer calibration offset 192 bytesfrom Kinetis flash</span></div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  <a class="code" href="a00770.html#a3b4a1193ece3947c38651156293a7623">EraseAccelCalibrationFromNVM</a>();</div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00233"></a><span class="lineno"> 233</span> </div><div class="line"><a name="l00234"></a><span class="lineno"> 234</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#ad033b9f4b4e5b8be0287ae3c40276dbc">cmd_180X</a>: <span class="comment">// "180X" perturbation</span></div><div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  sfg-><a class="code" href="a04047.html#a571184d82a99a987a2ca72b53e2fa100">iPerturbation</a> = 1;</div><div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00238"></a><span class="lineno"> 238</span> </div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#a52de366ecfe399da8ba3326fedf2f134">cmd_180Y</a>: <span class="comment">// "180Y" perturbation</span></div><div class="line"><a name="l00240"></a><span class="lineno"> 240</span>  sfg-><a class="code" href="a04047.html#a571184d82a99a987a2ca72b53e2fa100">iPerturbation</a> = 2;</div><div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00242"></a><span class="lineno"> 242</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00243"></a><span class="lineno"> 243</span> </div><div class="line"><a name="l00244"></a><span class="lineno"> 244</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#a7e4a1d4a077dd963999e128207315013">cmd_180Z</a>: <span class="comment">// "180Z" perturbation</span></div><div class="line"><a name="l00245"></a><span class="lineno"> 245</span>  sfg-><a class="code" href="a04047.html#a571184d82a99a987a2ca72b53e2fa100">iPerturbation</a> = 3;</div><div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00247"></a><span class="lineno"> 247</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00248"></a><span class="lineno"> 248</span> </div><div class="line"><a name="l00249"></a><span class="lineno"> 249</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#a587d3e585fef780d1e9797700bf167a1">cmd_M90X</a>: <span class="comment">// "M90X" perturbation</span></div><div class="line"><a name="l00250"></a><span class="lineno"> 250</span>  sfg-><a class="code" href="a04047.html#a571184d82a99a987a2ca72b53e2fa100">iPerturbation</a> = 4;</div><div class="line"><a name="l00251"></a><span class="lineno"> 251</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00252"></a><span class="lineno"> 252</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00253"></a><span class="lineno"> 253</span> </div><div class="line"><a name="l00254"></a><span class="lineno"> 254</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#acabfcfb0cdc412a7ce2a27741190b641">cmd_P90X</a>: <span class="comment">// "P90X" perturbation</span></div><div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  sfg-><a class="code" href="a04047.html#a571184d82a99a987a2ca72b53e2fa100">iPerturbation</a> = 5;</div><div class="line"><a name="l00256"></a><span class="lineno"> 256</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00257"></a><span class="lineno"> 257</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00258"></a><span class="lineno"> 258</span> </div><div class="line"><a name="l00259"></a><span class="lineno"> 259</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#ac6da8c3ac3abee673486071cea68ce3b">cmd_M90Y</a>: <span class="comment">// "M90Y" perturbation</span></div><div class="line"><a name="l00260"></a><span class="lineno"> 260</span>  sfg-><a class="code" href="a04047.html#a571184d82a99a987a2ca72b53e2fa100">iPerturbation</a> = 6;</div><div class="line"><a name="l00261"></a><span class="lineno"> 261</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00262"></a><span class="lineno"> 262</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00263"></a><span class="lineno"> 263</span> </div><div class="line"><a name="l00264"></a><span class="lineno"> 264</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#aa4ae8da7bfe2f6071b3ea9cf2daf7fce">cmd_P90Y</a>: <span class="comment">// "P90Y" perturbation</span></div><div class="line"><a name="l00265"></a><span class="lineno"> 265</span>  sfg-><a class="code" href="a04047.html#a571184d82a99a987a2ca72b53e2fa100">iPerturbation</a> = 7;</div><div class="line"><a name="l00266"></a><span class="lineno"> 266</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00267"></a><span class="lineno"> 267</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00268"></a><span class="lineno"> 268</span> </div><div class="line"><a name="l00269"></a><span class="lineno"> 269</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#aa01c75cd9d2ed3ec5acec36d0cdfd945">cmd_M90Z</a>: <span class="comment">// "M90Z" perturbation</span></div><div class="line"><a name="l00270"></a><span class="lineno"> 270</span>  sfg-><a class="code" href="a04047.html#a571184d82a99a987a2ca72b53e2fa100">iPerturbation</a> = 8;</div><div class="line"><a name="l00271"></a><span class="lineno"> 271</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00272"></a><span class="lineno"> 272</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00273"></a><span class="lineno"> 273</span> </div><div class="line"><a name="l00274"></a><span class="lineno"> 274</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#a95bc67aca1714fa6770555292aab7c92">cmd_P90Z</a>: <span class="comment">// "P90Z" perturbation</span></div><div class="line"><a name="l00275"></a><span class="lineno"> 275</span>  sfg-><a class="code" href="a04047.html#a571184d82a99a987a2ca72b53e2fa100">iPerturbation</a> = 9;</div><div class="line"><a name="l00276"></a><span class="lineno"> 276</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00277"></a><span class="lineno"> 277</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00278"></a><span class="lineno"> 278</span> </div><div class="line"><a name="l00279"></a><span class="lineno"> 279</span> <span class="preprocessor">#if F_USING_ACCEL</span></div><div class="line"><a name="l00280"></a><span class="lineno"> 280</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#a6bb3c28d40d2b6aa9823b6756343dd26">cmd_PA00</a>: <span class="comment">// "PA00" average precision accelerometer location 0</span></div><div class="line"><a name="l00281"></a><span class="lineno"> 281</span>  sfg->AccelBuffer.iStoreLocation = 0;</div><div class="line"><a name="l00282"></a><span class="lineno"> 282</span>  sfg->AccelBuffer.iStoreCounter = (<a class="code" href="a00908.html#a2b9b9bab44fce8ba83b6da0bc9edb21c">ACCEL_CAL_AVERAGING_SECS</a> * <a class="code" href="a00917.html#a470d8d33fe0efafcc0c0835fbea14f5e">FUSION_HZ</a>);</div><div class="line"><a name="l00283"></a><span class="lineno"> 283</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00284"></a><span class="lineno"> 284</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00285"></a><span class="lineno"> 285</span> </div><div class="line"><a name="l00286"></a><span class="lineno"> 286</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#a0e9e74197631e89642cbf30fd5ed24d1">cmd_PA01</a>: <span class="comment">// "PA01" average precision accelerometer location 1</span></div><div class="line"><a name="l00287"></a><span class="lineno"> 287</span>  sfg->AccelBuffer.iStoreLocation = 1;</div><div class="line"><a name="l00288"></a><span class="lineno"> 288</span>  sfg->AccelBuffer.iStoreCounter = (<a class="code" href="a00908.html#a2b9b9bab44fce8ba83b6da0bc9edb21c">ACCEL_CAL_AVERAGING_SECS</a> * <a class="code" href="a00917.html#a470d8d33fe0efafcc0c0835fbea14f5e">FUSION_HZ</a>);</div><div class="line"><a name="l00289"></a><span class="lineno"> 289</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00290"></a><span class="lineno"> 290</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00291"></a><span class="lineno"> 291</span> </div><div class="line"><a name="l00292"></a><span class="lineno"> 292</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#ad85f9c00a94b924326f16034579b9039">cmd_PA02</a>: <span class="comment">// "PA02" average precision accelerometer location 2</span></div><div class="line"><a name="l00293"></a><span class="lineno"> 293</span>  sfg->AccelBuffer.iStoreLocation = 2;</div><div class="line"><a name="l00294"></a><span class="lineno"> 294</span>  sfg->AccelBuffer.iStoreCounter = (<a class="code" href="a00908.html#a2b9b9bab44fce8ba83b6da0bc9edb21c">ACCEL_CAL_AVERAGING_SECS</a> * <a class="code" href="a00917.html#a470d8d33fe0efafcc0c0835fbea14f5e">FUSION_HZ</a>);</div><div class="line"><a name="l00295"></a><span class="lineno"> 295</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00296"></a><span class="lineno"> 296</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00297"></a><span class="lineno"> 297</span> </div><div class="line"><a name="l00298"></a><span class="lineno"> 298</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#af84fa2d4c0e6d418fdf1f1dfff441bfe">cmd_PA03</a>: <span class="comment">// "PA03" average precision accelerometer location 3</span></div><div class="line"><a name="l00299"></a><span class="lineno"> 299</span>  sfg->AccelBuffer.iStoreLocation = 3;</div><div class="line"><a name="l00300"></a><span class="lineno"> 300</span>  sfg->AccelBuffer.iStoreCounter = (<a class="code" href="a00908.html#a2b9b9bab44fce8ba83b6da0bc9edb21c">ACCEL_CAL_AVERAGING_SECS</a> * <a class="code" href="a00917.html#a470d8d33fe0efafcc0c0835fbea14f5e">FUSION_HZ</a>);</div><div class="line"><a name="l00301"></a><span class="lineno"> 301</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00302"></a><span class="lineno"> 302</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00303"></a><span class="lineno"> 303</span> </div><div class="line"><a name="l00304"></a><span class="lineno"> 304</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#abb76efa2b507e0da516441a705efc24b">cmd_PA04</a>: <span class="comment">// "PA04" average precision accelerometer location 4</span></div><div class="line"><a name="l00305"></a><span class="lineno"> 305</span>  sfg->AccelBuffer.iStoreLocation = 4;</div><div class="line"><a name="l00306"></a><span class="lineno"> 306</span>  sfg->AccelBuffer.iStoreCounter = (<a class="code" href="a00908.html#a2b9b9bab44fce8ba83b6da0bc9edb21c">ACCEL_CAL_AVERAGING_SECS</a> * <a class="code" href="a00917.html#a470d8d33fe0efafcc0c0835fbea14f5e">FUSION_HZ</a>);</div><div class="line"><a name="l00307"></a><span class="lineno"> 307</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00308"></a><span class="lineno"> 308</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00309"></a><span class="lineno"> 309</span> </div><div class="line"><a name="l00310"></a><span class="lineno"> 310</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#afc3b6aaa4ee5424ea531d9e783b7b69f">cmd_PA05</a>: <span class="comment">// "PA05" average precision accelerometer location 5</span></div><div class="line"><a name="l00311"></a><span class="lineno"> 311</span>  sfg->AccelBuffer.iStoreLocation = 5;</div><div class="line"><a name="l00312"></a><span class="lineno"> 312</span>  sfg->AccelBuffer.iStoreCounter = (<a class="code" href="a00908.html#a2b9b9bab44fce8ba83b6da0bc9edb21c">ACCEL_CAL_AVERAGING_SECS</a> * <a class="code" href="a00917.html#a470d8d33fe0efafcc0c0835fbea14f5e">FUSION_HZ</a>);</div><div class="line"><a name="l00313"></a><span class="lineno"> 313</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00314"></a><span class="lineno"> 314</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00315"></a><span class="lineno"> 315</span> </div><div class="line"><a name="l00316"></a><span class="lineno"> 316</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#a5959c5ca910013194a971227e6ac7d57">cmd_PA06</a>: <span class="comment">// "PA06" average precision accelerometer location 6</span></div><div class="line"><a name="l00317"></a><span class="lineno"> 317</span>  sfg->AccelBuffer.iStoreLocation = 6;</div><div class="line"><a name="l00318"></a><span class="lineno"> 318</span>  sfg->AccelBuffer.iStoreCounter = (<a class="code" href="a00908.html#a2b9b9bab44fce8ba83b6da0bc9edb21c">ACCEL_CAL_AVERAGING_SECS</a> * <a class="code" href="a00917.html#a470d8d33fe0efafcc0c0835fbea14f5e">FUSION_HZ</a>);</div><div class="line"><a name="l00319"></a><span class="lineno"> 319</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00320"></a><span class="lineno"> 320</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00321"></a><span class="lineno"> 321</span> </div><div class="line"><a name="l00322"></a><span class="lineno"> 322</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#ab8f562d6e310fcc50b3437b9c844d950">cmd_PA07</a>: <span class="comment">// "PA07" average precision accelerometer location 7</span></div><div class="line"><a name="l00323"></a><span class="lineno"> 323</span>  sfg->AccelBuffer.iStoreLocation = 7;</div><div class="line"><a name="l00324"></a><span class="lineno"> 324</span>  sfg->AccelBuffer.iStoreCounter = (<a class="code" href="a00908.html#a2b9b9bab44fce8ba83b6da0bc9edb21c">ACCEL_CAL_AVERAGING_SECS</a> * <a class="code" href="a00917.html#a470d8d33fe0efafcc0c0835fbea14f5e">FUSION_HZ</a>);</div><div class="line"><a name="l00325"></a><span class="lineno"> 325</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00326"></a><span class="lineno"> 326</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00327"></a><span class="lineno"> 327</span> </div><div class="line"><a name="l00328"></a><span class="lineno"> 328</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#a5de3645a828c5df60ef915fb28c5882b">cmd_PA08</a>: <span class="comment">// "PA08" average precision accelerometer location 8</span></div><div class="line"><a name="l00329"></a><span class="lineno"> 329</span>  sfg->AccelBuffer.iStoreLocation = 8;</div><div class="line"><a name="l00330"></a><span class="lineno"> 330</span>  sfg->AccelBuffer.iStoreCounter = (<a class="code" href="a00908.html#a2b9b9bab44fce8ba83b6da0bc9edb21c">ACCEL_CAL_AVERAGING_SECS</a> * <a class="code" href="a00917.html#a470d8d33fe0efafcc0c0835fbea14f5e">FUSION_HZ</a>);</div><div class="line"><a name="l00331"></a><span class="lineno"> 331</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00332"></a><span class="lineno"> 332</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00333"></a><span class="lineno"> 333</span> </div><div class="line"><a name="l00334"></a><span class="lineno"> 334</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#a59c9ff7a3b6b88513e8ece6ebaa0390b">cmd_PA09</a>: <span class="comment">// "PA09" average precision accelerometer location 9</span></div><div class="line"><a name="l00335"></a><span class="lineno"> 335</span>  sfg->AccelBuffer.iStoreLocation = 9;</div><div class="line"><a name="l00336"></a><span class="lineno"> 336</span>  sfg->AccelBuffer.iStoreCounter = (<a class="code" href="a00908.html#a2b9b9bab44fce8ba83b6da0bc9edb21c">ACCEL_CAL_AVERAGING_SECS</a> * <a class="code" href="a00917.html#a470d8d33fe0efafcc0c0835fbea14f5e">FUSION_HZ</a>);</div><div class="line"><a name="l00337"></a><span class="lineno"> 337</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00338"></a><span class="lineno"> 338</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00339"></a><span class="lineno"> 339</span> </div><div class="line"><a name="l00340"></a><span class="lineno"> 340</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#aaf59580bf7ec60ec94973212786a1126">cmd_PA10</a>: <span class="comment">// "PA10" average precision accelerometer location 10</span></div><div class="line"><a name="l00341"></a><span class="lineno"> 341</span>  sfg->AccelBuffer.iStoreLocation = 10;</div><div class="line"><a name="l00342"></a><span class="lineno"> 342</span>  sfg->AccelBuffer.iStoreCounter = (<a class="code" href="a00908.html#a2b9b9bab44fce8ba83b6da0bc9edb21c">ACCEL_CAL_AVERAGING_SECS</a> * <a class="code" href="a00917.html#a470d8d33fe0efafcc0c0835fbea14f5e">FUSION_HZ</a>);</div><div class="line"><a name="l00343"></a><span class="lineno"> 343</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00344"></a><span class="lineno"> 344</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00345"></a><span class="lineno"> 345</span> </div><div class="line"><a name="l00346"></a><span class="lineno"> 346</span>  <span class="keywordflow">case</span> <a class="code" href="a00794.html#a2b71412b44a575e0733a1a43a266b15a">cmd_PA11</a>: <span class="comment">// "PA11" average precision accelerometer location 11</span></div><div class="line"><a name="l00347"></a><span class="lineno"> 347</span>  sfg->AccelBuffer.iStoreLocation = 11;</div><div class="line"><a name="l00348"></a><span class="lineno"> 348</span>  sfg->AccelBuffer.iStoreCounter = (<a class="code" href="a00908.html#a2b9b9bab44fce8ba83b6da0bc9edb21c">ACCEL_CAL_AVERAGING_SECS</a> * <a class="code" href="a00917.html#a470d8d33fe0efafcc0c0835fbea14f5e">FUSION_HZ</a>);</div><div class="line"><a name="l00349"></a><span class="lineno"> 349</span>  iCommandBuffer[3] = <span class="charliteral">'~'</span>;</div><div class="line"><a name="l00350"></a><span class="lineno"> 350</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00351"></a><span class="lineno"> 351</span> <span class="preprocessor">#endif // precision accelerometer calibration</span></div><div class="line"><a name="l00352"></a><span class="lineno"> 352</span> </div><div class="line"><a name="l00353"></a><span class="lineno"> 353</span>  <span class="keywordflow">default</span>:</div><div class="line"><a name="l00354"></a><span class="lineno"> 354</span>  <span class="comment">// no action</span></div><div class="line"><a name="l00355"></a><span class="lineno"> 355</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00356"></a><span class="lineno"> 356</span>  }</div><div class="line"><a name="l00357"></a><span class="lineno"> 357</span>  } <span class="comment">// end of loop over received characters</span></div><div class="line"><a name="l00358"></a><span class="lineno"> 358</span> </div><div class="line"><a name="l00359"></a><span class="lineno"> 359</span>  <span class="keywordflow">return</span>;</div><div class="line"><a name="l00360"></a><span class="lineno"> 360</span> }</div><div class="ttc" id="a00794_html_af84fa2d4c0e6d418fdf1f1dfff441bfe"><div class="ttname"><a href="a00794.html#af84fa2d4c0e6d418fdf1f1dfff441bfe">cmd_PA03</a></div><div class="ttdeci">#define cmd_PA03</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00058">DecodeCommandBytes.c:58</a></div></div> 52<div class="ttc" id="a03967_html_a6c5365ebe170e2ee207212da7531ccea"><div class="ttname"><a href="a03967.html#a6c5365ebe170e2ee207212da7531ccea">ControlSubsystem::RPCPacketOn</a></div><div class="ttdeci">volatile uint8_t RPCPacketOn</div><div class="ttdoc">flag to enable roll, pitch, compass packet </div><div class="ttdef"><b>Definition:</b> <a href="a00779_source.html#l00047">control.h:47</a></div></div> 53<div class="ttc" id="a00794_html_acabfcfb0cdc412a7ce2a27741190b641"><div class="ttname"><a href="a00794.html#acabfcfb0cdc412a7ce2a27741190b641">cmd_P90X</a></div><div class="ttdeci">#define cmd_P90X</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00050">DecodeCommandBytes.c:50</a></div></div> 54<div class="ttc" id="a04047_html_a571184d82a99a987a2ca72b53e2fa100"><div class="ttname"><a href="a04047.html#a571184d82a99a987a2ca72b53e2fa100">SensorFusionGlobals::iPerturbation</a></div><div class="ttdeci">volatile uint8_t iPerturbation</div><div class="ttdoc">test perturbation to be applied </div><div class="ttdef"><b>Definition:</b> <a href="a00914_source.html#l00469">sensor_fusion.h:469</a></div></div> 55<div class="ttc" id="a00794_html_a52de366ecfe399da8ba3326fedf2f134"><div class="ttname"><a href="a00794.html#a52de366ecfe399da8ba3326fedf2f134">cmd_180Y</a></div><div class="ttdeci">#define cmd_180Y</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00047">DecodeCommandBytes.c:47</a></div></div> 56<div class="ttc" id="a03967_html_a527b159143188ef9b66bd4c8a6aefcdf"><div class="ttname"><a href="a03967.html#a527b159143188ef9b66bd4c8a6aefcdf">ControlSubsystem::AngularVelocityPacketOn</a></div><div class="ttdeci">volatile uint8_t AngularVelocityPacketOn</div><div class="ttdoc">flag to enable angular velocity packet </div><div class="ttdef"><b>Definition:</b> <a href="a00779_source.html#l00045">control.h:45</a></div></div> 57<div class="ttc" id="a00914_html_ab7903878916593daecbeb95b98115ab0"><div class="ttname"><a href="a00914.html#ab7903878916593daecbeb95b98115ab0">int32</a></div><div class="ttdeci">int32_t int32</div><div class="ttdef"><b>Definition:</b> <a href="a00914_source.html#l00041">sensor_fusion.h:41</a></div></div> 58<div class="ttc" id="a00908_html_a2b9b9bab44fce8ba83b6da0bc9edb21c"><div class="ttname"><a href="a00908.html#a2b9b9bab44fce8ba83b6da0bc9edb21c">ACCEL_CAL_AVERAGING_SECS</a></div><div class="ttdeci">#define ACCEL_CAL_AVERAGING_SECS</div><div class="ttdoc">calibration constants </div><div class="ttdef"><b>Definition:</b> <a href="a00908_source.html#l00017">precisionAccelerometer.h:17</a></div></div> 59<div class="ttc" id="a00794_html_ad033b9f4b4e5b8be0287ae3c40276dbc"><div class="ttname"><a href="a00794.html#ad033b9f4b4e5b8be0287ae3c40276dbc">cmd_180X</a></div><div class="ttdeci">#define cmd_180X</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00046">DecodeCommandBytes.c:46</a></div></div> 60<div class="ttc" id="a00914_html_a76143891435bdd7248857e45b93521ed"><div class="ttname"><a href="a00914.html#a76143891435bdd7248857e45b93521ed">CHZ</a></div><div class="ttdeci">#define CHZ</div><div class="ttdoc">Used to access Z-channel entries in various data data structures. </div><div class="ttdef"><b>Definition:</b> <a href="a00914_source.html#l00062">sensor_fusion.h:62</a></div></div> 61<div class="ttc" id="a00770_html_a3b4a1193ece3947c38651156293a7623"><div class="ttname"><a href="a00770.html#a3b4a1193ece3947c38651156293a7623">EraseAccelCalibrationFromNVM</a></div><div class="ttdeci">void EraseAccelCalibrationFromNVM(void)</div><div class="ttdef"><b>Definition:</b> <a href="a00770_source.html#l00170">calibration_storage.c:170</a></div></div> 62<div class="ttc" id="a00794_html_a95bc67aca1714fa6770555292aab7c92"><div class="ttname"><a href="a00794.html#a95bc67aca1714fa6770555292aab7c92">cmd_P90Z</a></div><div class="ttdeci">#define cmd_P90Z</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00054">DecodeCommandBytes.c:54</a></div></div> 63<div class="ttc" id="a00914_html_a5f469312b3865f2d3efea2edd6f8afaaa0cf62dda224dcbac09ae26cd46ccce01"><div class="ttname"><a href="a00914.html#a5f469312b3865f2d3efea2edd6f8afaaa0cf62dda224dcbac09ae26cd46ccce01">Q6MA</a></div><div class="ttdoc">Quaternion derived from 3-axis accel + 3 axis mag (eCompass) </div><div class="ttdef"><b>Definition:</b> <a href="a00914_source.html#l00052">sensor_fusion.h:52</a></div></div> 64<div class="ttc" id="a00794_html_afc3b6aaa4ee5424ea531d9e783b7b69f"><div class="ttname"><a href="a00794.html#afc3b6aaa4ee5424ea531d9e783b7b69f">cmd_PA05</a></div><div class="ttdeci">#define cmd_PA05</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00060">DecodeCommandBytes.c:60</a></div></div> 65<div class="ttc" id="a00794_html_a6cbd87a8022fb7f5194e2a915c4ba297"><div class="ttname"><a href="a00794.html#a6cbd87a8022fb7f5194e2a915c4ba297">cmd_DBminus</a></div><div class="ttdeci">#define cmd_DBminus</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00025">DecodeCommandBytes.c:25</a></div></div> 66<div class="ttc" id="a00779_html"><div class="ttname"><a href="a00779.html">control.h</a></div><div class="ttdoc">Defines control sub-system. </div></div> 67<div class="ttc" id="a00770_html_aa5684d700f135264e542f33071ed6a45"><div class="ttname"><a href="a00770.html#aa5684d700f135264e542f33071ed6a45">SaveGyroCalibrationToNVM</a></div><div class="ttdeci">void SaveGyroCalibrationToNVM(SensorFusionGlobals *sfg)</div><div class="ttdef"><b>Definition:</b> <a href="a00770_source.html#l00055">calibration_storage.c:55</a></div></div> 68<div class="ttc" id="a04047_html"><div class="ttname"><a href="a04047.html">SensorFusionGlobals</a></div><div class="ttdoc">The top level fusion structure. </div><div class="ttdef"><b>Definition:</b> <a href="a00914_source.html#l00454">sensor_fusion.h:454</a></div></div> 69<div class="ttc" id="a03967_html_a41ad90f99ac3c14b2bdce3967df14f1b"><div class="ttname"><a href="a03967.html#a41ad90f99ac3c14b2bdce3967df14f1b">ControlSubsystem::DebugPacketOn</a></div><div class="ttdeci">volatile uint8_t DebugPacketOn</div><div class="ttdoc">flag to enable debug packet </div><div class="ttdef"><b>Definition:</b> <a href="a00779_source.html#l00046">control.h:46</a></div></div> 70<div class="ttc" id="a00794_html_a50e5ea9fc776358f895a2968208bd03b"><div class="ttname"><a href="a00794.html#a50e5ea9fc776358f895a2968208bd03b">cmd_RST</a></div><div class="ttdeci">#define cmd_RST</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00036">DecodeCommandBytes.c:36</a></div></div> 71<div class="ttc" id="a00905_html_ab8572ce21837538a984e62035db4d89e"><div class="ttname"><a href="a00905.html#ab8572ce21837538a984e62035db4d89e">fInitializeAccelCalibration</a></div><div class="ttdeci">void fInitializeAccelCalibration(struct AccelCalibration *pthisAccelCal, struct AccelBuffer *pthisAccelBuffer, volatile int8 *AccelCalPacketOn)</div><div class="ttdoc">Initialize the accelerometer calibration functions. </div><div class="ttdef"><b>Definition:</b> <a href="a00905_source.html#l00018">precisionAccelerometer.c:18</a></div></div> 72<div class="ttc" id="a00794_html_a59c9ff7a3b6b88513e8ece6ebaa0390b"><div class="ttname"><a href="a00794.html#a59c9ff7a3b6b88513e8ece6ebaa0390b">cmd_PA09</a></div><div class="ttdeci">#define cmd_PA09</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00064">DecodeCommandBytes.c:64</a></div></div> 73<div class="ttc" id="a00794_html_a81db55b5fd6648ddbcd12565be5b9e6c"><div class="ttname"><a href="a00794.html#a81db55b5fd6648ddbcd12565be5b9e6c">cmd_Q3M</a></div><div class="ttdeci">#define cmd_Q3M</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00027">DecodeCommandBytes.c:27</a></div></div> 74<div class="ttc" id="a00794_html_aa3bc6121f421435af64bce070b01dbdc"><div class="ttname"><a href="a00794.html#aa3bc6121f421435af64bce070b01dbdc">cmd_Q6AG</a></div><div class="ttdeci">#define cmd_Q6AG</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00030">DecodeCommandBytes.c:30</a></div></div> 75<div class="ttc" id="a00794_html_a30baca94d6d21194de5b2e2c5db4f47a"><div class="ttname"><a href="a00794.html#a30baca94d6d21194de5b2e2c5db4f47a">cmd_DBplus</a></div><div class="ttdeci">#define cmd_DBplus</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00024">DecodeCommandBytes.c:24</a></div></div> 76<div class="ttc" id="a00794_html_a953d0fd1fea12cf41524b0a185417f06"><div class="ttname"><a href="a00794.html#a953d0fd1fea12cf41524b0a185417f06">cmd_RPCplus</a></div><div class="ttdeci">#define cmd_RPCplus</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00032">DecodeCommandBytes.c:32</a></div></div> 77<div class="ttc" id="a00914_html_a5f469312b3865f2d3efea2edd6f8afaaa19bd87b11e82b9047ad750fb62711ba8"><div class="ttname"><a href="a00914.html#a5f469312b3865f2d3efea2edd6f8afaaa19bd87b11e82b9047ad750fb62711ba8">Q3</a></div><div class="ttdoc">Quaternion derived from 3-axis accel (tilt) </div><div class="ttdef"><b>Definition:</b> <a href="a00914_source.html#l00049">sensor_fusion.h:49</a></div></div> 78<div class="ttc" id="a00794_html_aa0705e68b33dccd313303c5ca6bfd2c1"><div class="ttname"><a href="a00794.html#aa0705e68b33dccd313303c5ca6bfd2c1">cmd_Q6MA</a></div><div class="ttdeci">#define cmd_Q6MA</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00029">DecodeCommandBytes.c:29</a></div></div> 79<div class="ttc" id="a00794_html_a3cc848ec4b05581fe6ce5d8e6f56dc81"><div class="ttname"><a href="a00794.html#a3cc848ec4b05581fe6ce5d8e6f56dc81">cmd_SVAC</a></div><div class="ttdeci">#define cmd_SVAC</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00038">DecodeCommandBytes.c:38</a></div></div> 80<div class="ttc" id="a00914_html_a5f469312b3865f2d3efea2edd6f8afaaada2dae63d5865a8446caa7938c73c5dc"><div class="ttname"><a href="a00914.html#a5f469312b3865f2d3efea2edd6f8afaaada2dae63d5865a8446caa7938c73c5dc">Q3M</a></div><div class="ttdoc">Quaternion derived from 3-axis mag only (auto compass algorithm) </div><div class="ttdef"><b>Definition:</b> <a href="a00914_source.html#l00050">sensor_fusion.h:50</a></div></div> 81<div class="ttc" id="a00794_html_a6bb3c28d40d2b6aa9823b6756343dd26"><div class="ttname"><a href="a00794.html#a6bb3c28d40d2b6aa9823b6756343dd26">cmd_PA00</a></div><div class="ttdeci">#define cmd_PA00</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00055">DecodeCommandBytes.c:55</a></div></div> 82<div class="ttc" id="a03967_html_a560615429c69fcefa85de0624fa6d83e"><div class="ttname"><a href="a03967.html#a560615429c69fcefa85de0624fa6d83e">ControlSubsystem::QuaternionPacketType</a></div><div class="ttdeci">volatile quaternion_type QuaternionPacketType</div><div class="ttdoc">quaternion type transmitted over UART </div><div class="ttdef"><b>Definition:</b> <a href="a00779_source.html#l00044">control.h:44</a></div></div> 83<div class="ttc" id="a00914_html_aa0d0fdc87fd135ef2bedb030901cdb9c"><div class="ttname"><a href="a00914.html#aa0d0fdc87fd135ef2bedb030901cdb9c">int16</a></div><div class="ttdeci">int16_t int16</div><div class="ttdef"><b>Definition:</b> <a href="a00914_source.html#l00040">sensor_fusion.h:40</a></div></div> 84<div class="ttc" id="a04047_html_ab9b83bac9b472c5ce93500d07485d826"><div class="ttname"><a href="a04047.html#ab9b83bac9b472c5ce93500d07485d826">SensorFusionGlobals::MagCal</a></div><div class="ttdeci">struct MagCalibration MagCal</div><div class="ttdoc">mag cal storage </div><div class="ttdef"><b>Definition:</b> <a href="a00914_source.html#l00490">sensor_fusion.h:490</a></div></div> 85<div class="ttc" id="a04047_html_a987fc4c5dd36f2058beb0ca0a340174c"><div class="ttname"><a href="a04047.html#a987fc4c5dd36f2058beb0ca0a340174c">SensorFusionGlobals::MagBuffer</a></div><div class="ttdeci">struct MagBuffer MagBuffer</div><div class="ttdoc">mag cal constellation points </div><div class="ttdef"><b>Definition:</b> <a href="a00914_source.html#l00491">sensor_fusion.h:491</a></div></div> 86<div class="ttc" id="a00794_html_ab8f562d6e310fcc50b3437b9c844d950"><div class="ttname"><a href="a00794.html#ab8f562d6e310fcc50b3437b9c844d950">cmd_PA07</a></div><div class="ttdeci">#define cmd_PA07</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00062">DecodeCommandBytes.c:62</a></div></div> 87<div class="ttc" id="a00794_html_a3ff024f45923953ec5a745a5531a321c"><div class="ttname"><a href="a00794.html#a3ff024f45923953ec5a745a5531a321c">cmd_SVYC</a></div><div class="ttdeci">#define cmd_SVYC</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00040">DecodeCommandBytes.c:40</a></div></div> 88<div class="ttc" id="a00914_html_a5f469312b3865f2d3efea2edd6f8afaaa9c5ceeb2bc9bf27379c7e72bc4d0ff13"><div class="ttname"><a href="a00914.html#a5f469312b3865f2d3efea2edd6f8afaaa9c5ceeb2bc9bf27379c7e72bc4d0ff13">Q9</a></div><div class="ttdoc">Quaternion derived from full 9-axis sensor fusion. </div><div class="ttdef"><b>Definition:</b> <a href="a00914_source.html#l00054">sensor_fusion.h:54</a></div></div> 89<div class="ttc" id="a00794_html_ae90e11c13d62e92a87653100abbae5f6"><div class="ttname"><a href="a00794.html#ae90e11c13d62e92a87653100abbae5f6">cmd_VGplus</a></div><div class="ttdeci">#define cmd_VGplus</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00022">DecodeCommandBytes.c:22</a></div></div> 90<div class="ttc" id="a00794_html_acfa5e01345e04a72281328adee65ab90"><div class="ttname"><a href="a00794.html#acfa5e01345e04a72281328adee65ab90">cmd_ERYC</a></div><div class="ttdeci">#define cmd_ERYC</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00044">DecodeCommandBytes.c:44</a></div></div> 91<div class="ttc" id="a00794_html_a2d80b68d03de87c2d3cce67273f8a165"><div class="ttname"><a href="a00794.html#a2d80b68d03de87c2d3cce67273f8a165">DecodeCommandBytes</a></div><div class="ttdeci">void DecodeCommandBytes(SensorFusionGlobals *sfg, char iCommandBuffer[], uint8 sUART_InputBuffer[], uint16 nbytes)</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00068">DecodeCommandBytes.c:68</a></div></div> 92<div class="ttc" id="a00794_html_a8575115e8a73d926b79c784e257c6b80"><div class="ttname"><a href="a00794.html#a8575115e8a73d926b79c784e257c6b80">cmd_VGminus</a></div><div class="ttdeci">#define cmd_VGminus</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00023">DecodeCommandBytes.c:23</a></div></div> 93<div class="ttc" id="a00794_html_a36bd60163958f225c8f069d209fbe4be"><div class="ttname"><a href="a00794.html#a36bd60163958f225c8f069d209fbe4be">cmd_ERGC</a></div><div class="ttdeci">#define cmd_ERGC</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00045">DecodeCommandBytes.c:45</a></div></div> 94<div class="ttc" id="a00914_html"><div class="ttname"><a href="a00914.html">sensor_fusion.h</a></div><div class="ttdoc">The sensor_fusion.h file implements the top level programming interface. </div></div> 95<div class="ttc" id="a00770_html_ad08799ac63701e755fe2414b32f69b50"><div class="ttname"><a href="a00770.html#ad08799ac63701e755fe2414b32f69b50">SaveMagCalibrationToNVM</a></div><div class="ttdeci">void SaveMagCalibrationToNVM(SensorFusionGlobals *sfg)</div><div class="ttdef"><b>Definition:</b> <a href="a00770_source.html#l00021">calibration_storage.c:21</a></div></div> 96<div class="ttc" id="a00794_html_aa4ae8da7bfe2f6071b3ea9cf2daf7fce"><div class="ttname"><a href="a00794.html#aa4ae8da7bfe2f6071b3ea9cf2daf7fce">cmd_P90Y</a></div><div class="ttdeci">#define cmd_P90Y</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00052">DecodeCommandBytes.c:52</a></div></div> 97<div class="ttc" id="a00794_html_a6efbc8ec1703837c7adfa0811a2b161e"><div class="ttname"><a href="a00794.html#a6efbc8ec1703837c7adfa0811a2b161e">cmd_ERMC</a></div><div class="ttdeci">#define cmd_ERMC</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00043">DecodeCommandBytes.c:43</a></div></div> 98<div class="ttc" id="a00770_html_a5004646fd5b485a74892b17e4a3af15b"><div class="ttname"><a href="a00770.html#a5004646fd5b485a74892b17e4a3af15b">EraseMagCalibrationFromNVM</a></div><div class="ttdeci">void EraseMagCalibrationFromNVM(void)</div><div class="ttdef"><b>Definition:</b> <a href="a00770_source.html#l00128">calibration_storage.c:128</a></div></div> 99<div class="ttc" id="a03967_html_af46ef3a1af714f7d40707053964db4a8"><div class="ttname"><a href="a03967.html#af46ef3a1af714f7d40707053964db4a8">ControlSubsystem::AltPacketOn</a></div><div class="ttdeci">volatile uint8_t AltPacketOn</div><div class="ttdoc">flag to enable altitude packet </div><div class="ttdef"><b>Definition:</b> <a href="a00779_source.html#l00048">control.h:48</a></div></div> 100<div class="ttc" id="a00794_html_a77aec193d3c012a98fdb4e8a561e5ac0"><div class="ttname"><a href="a00794.html#a77aec193d3c012a98fdb4e8a561e5ac0">cmd_ALTplus</a></div><div class="ttdeci">#define cmd_ALTplus</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00034">DecodeCommandBytes.c:34</a></div></div> 101<div class="ttc" id="a00794_html_ae8e28a3f46f0d3ef5adb7d63e4088069"><div class="ttname"><a href="a00794.html#ae8e28a3f46f0d3ef5adb7d63e4088069">cmd_ERAC</a></div><div class="ttdeci">#define cmd_ERAC</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00042">DecodeCommandBytes.c:42</a></div></div> 102<div class="ttc" id="a00794_html_ad85f9c00a94b924326f16034579b9039"><div class="ttname"><a href="a00794.html#ad85f9c00a94b924326f16034579b9039">cmd_PA02</a></div><div class="ttdeci">#define cmd_PA02</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00057">DecodeCommandBytes.c:57</a></div></div> 103<div class="ttc" id="a00794_html_a5de3645a828c5df60ef915fb28c5882b"><div class="ttname"><a href="a00794.html#a5de3645a828c5df60ef915fb28c5882b">cmd_PA08</a></div><div class="ttdeci">#define cmd_PA08</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00063">DecodeCommandBytes.c:63</a></div></div> 104<div class="ttc" id="a00854_html_a0671e3b0a0f73cd25a9880f1e14d5cb0"><div class="ttname"><a href="a00854.html#a0671e3b0a0f73cd25a9880f1e14d5cb0">fInitializeMagCalibration</a></div><div class="ttdeci">void fInitializeMagCalibration(struct MagCalibration *pthisMagCal, struct MagBuffer *pthisMagBuffer)</div><div class="ttdef"><b>Definition:</b> <a href="a00854_source.html#l00024">magnetic.c:24</a></div></div> 105<div class="ttc" id="a00794_html_ae6181510482b0abbaac4d594b1bf2038"><div class="ttname"><a href="a00794.html#ae6181510482b0abbaac4d594b1bf2038">cmd_Q3</a></div><div class="ttdeci">#define cmd_Q3</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00026">DecodeCommandBytes.c:26</a></div></div> 106<div class="ttc" id="a00470_html_afa81c629d378fe700f351a1bce411ad5"><div class="ttname"><a href="a00470.html#afa81c629d378fe700f351a1bce411ad5">sfg</a></div><div class="ttdeci">SensorFusionGlobals sfg</div><div class="ttdef"><b>Definition:</b> <a href="a00470_source.html#l00075">orientaion_application_baremetal_agm01.c:75</a></div></div> 107<div class="ttc" id="a00917_html_a470d8d33fe0efafcc0c0835fbea14f5e"><div class="ttname"><a href="a00917.html#a470d8d33fe0efafcc0c0835fbea14f5e">FUSION_HZ</a></div><div class="ttdeci">#define FUSION_HZ</div><div class="ttdoc">(int) actual rate of fusion algorithm execution and sensor FIFO reads </div><div class="ttdef"><b>Definition:</b> <a href="a00917_source.html#l00068">standard_build.h:68</a></div></div> 108<div class="ttc" id="a00794_html_a3a405d845cef7219b70ffda126a81628"><div class="ttname"><a href="a00794.html#a3a405d845cef7219b70ffda126a81628">cmd_SVMC</a></div><div class="ttdeci">#define cmd_SVMC</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00039">DecodeCommandBytes.c:39</a></div></div> 109<div class="ttc" id="a04047_html_a51cbe943cdee0fd0a2ff72d2a04fad9a"><div class="ttname"><a href="a04047.html#a51cbe943cdee0fd0a2ff72d2a04fad9a">SensorFusionGlobals::pControlSubsystem</a></div><div class="ttdeci">struct ControlSubsystem * pControlSubsystem</div><div class="ttdef"><b>Definition:</b> <a href="a00914_source.html#l00462">sensor_fusion.h:462</a></div></div> 110<div class="ttc" id="a00794_html_ac161c67ce40e2bd748d11aa7d89ef5c0"><div class="ttname"><a href="a00794.html#ac161c67ce40e2bd748d11aa7d89ef5c0">cmd_Q3G</a></div><div class="ttdeci">#define cmd_Q3G</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00028">DecodeCommandBytes.c:28</a></div></div> 111<div class="ttc" id="a00794_html_ac179cba01ef1197e611985a5ec22cab3"><div class="ttname"><a href="a00794.html#ac179cba01ef1197e611985a5ec22cab3">cmd_ALTminus</a></div><div class="ttdeci">#define cmd_ALTminus</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00035">DecodeCommandBytes.c:35</a></div></div> 112<div class="ttc" id="a00914_html_a5f469312b3865f2d3efea2edd6f8afaaaf63c9f6fec59717499a84048f682cf8a"><div class="ttname"><a href="a00914.html#a5f469312b3865f2d3efea2edd6f8afaaaf63c9f6fec59717499a84048f682cf8a">Q3G</a></div><div class="ttdoc">Quaternion derived from 3-axis gyro only (rotation) </div><div class="ttdef"><b>Definition:</b> <a href="a00914_source.html#l00051">sensor_fusion.h:51</a></div></div> 113<div class="ttc" id="a00794_html_a3e8753c5d2c241fa11641aed410e4f8c"><div class="ttname"><a href="a00794.html#a3e8753c5d2c241fa11641aed410e4f8c">cmd_SVGC</a></div><div class="ttdeci">#define cmd_SVGC</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00041">DecodeCommandBytes.c:41</a></div></div> 114<div class="ttc" id="a00794_html_ab7d2798980bde69b87a1a81fde8a6f67"><div class="ttname"><a href="a00794.html#ab7d2798980bde69b87a1a81fde8a6f67">cmd_RINS</a></div><div class="ttdeci">#define cmd_RINS</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00037">DecodeCommandBytes.c:37</a></div></div> 115<div class="ttc" id="a00914_html_a48bbd27e913de8d7749dff9dec2fe816"><div class="ttname"><a href="a00914.html#a48bbd27e913de8d7749dff9dec2fe816">CHX</a></div><div class="ttdeci">#define CHX</div><div class="ttdoc">Used to access X-channel entries in various data data structures. </div><div class="ttdef"><b>Definition:</b> <a href="a00914_source.html#l00060">sensor_fusion.h:60</a></div></div> 116<div class="ttc" id="a00794_html_ac6da8c3ac3abee673486071cea68ce3b"><div class="ttname"><a href="a00794.html#ac6da8c3ac3abee673486071cea68ce3b">cmd_M90Y</a></div><div class="ttdeci">#define cmd_M90Y</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00051">DecodeCommandBytes.c:51</a></div></div> 117<div class="ttc" id="a00794_html_aa01c75cd9d2ed3ec5acec36d0cdfd945"><div class="ttname"><a href="a00794.html#aa01c75cd9d2ed3ec5acec36d0cdfd945">cmd_M90Z</a></div><div class="ttdeci">#define cmd_M90Z</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00053">DecodeCommandBytes.c:53</a></div></div> 118<div class="ttc" id="a00845_html_ad9cb3659204ae7a30109ceaf4d94ecec"><div class="ttname"><a href="a00845.html#ad9cb3659204ae7a30109ceaf4d94ecec">fInitializeFusion</a></div><div class="ttdeci">void fInitializeFusion(SensorFusionGlobals *sfg)</div><div class="ttdef"><b>Definition:</b> <a href="a00845_source.html#l00033">fusion.c:33</a></div></div> 119<div class="ttc" id="a00914_html_a33a5e996e7a90acefb8b1c0bea47e365"><div class="ttname"><a href="a00914.html#a33a5e996e7a90acefb8b1c0bea47e365">uint8</a></div><div class="ttdeci">uint8_t uint8</div><div class="ttdef"><b>Definition:</b> <a href="a00914_source.html#l00042">sensor_fusion.h:42</a></div></div> 120<div class="ttc" id="a00914_html_a5f469312b3865f2d3efea2edd6f8afaaa59c8dc55b720396019ef93eb943a3b96"><div class="ttname"><a href="a00914.html#a5f469312b3865f2d3efea2edd6f8afaaa59c8dc55b720396019ef93eb943a3b96">Q6AG</a></div><div class="ttdoc">Quaternion derived from 3-axis accel + 3-axis gyro (gaming) </div><div class="ttdef"><b>Definition:</b> <a href="a00914_source.html#l00053">sensor_fusion.h:53</a></div></div> 121<div class="ttc" id="a00914_html_ac2a9e79eb120216f855626495b7bd18a"><div class="ttname"><a href="a00914.html#ac2a9e79eb120216f855626495b7bd18a">uint16</a></div><div class="ttdeci">uint16_t uint16</div><div class="ttdef"><b>Definition:</b> <a href="a00914_source.html#l00043">sensor_fusion.h:43</a></div></div> 122<div class="ttc" id="a00794_html_a14df47d70ca8a588e5262fbb47b17f2d"><div class="ttname"><a href="a00794.html#a14df47d70ca8a588e5262fbb47b17f2d">cmd_RPCminus</a></div><div class="ttdeci">#define cmd_RPCminus</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00033">DecodeCommandBytes.c:33</a></div></div> 123<div class="ttc" id="a00794_html_a0e9e74197631e89642cbf30fd5ed24d1"><div class="ttname"><a href="a00794.html#a0e9e74197631e89642cbf30fd5ed24d1">cmd_PA01</a></div><div class="ttdeci">#define cmd_PA01</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00056">DecodeCommandBytes.c:56</a></div></div> 124<div class="ttc" id="a00794_html_aaf59580bf7ec60ec94973212786a1126"><div class="ttname"><a href="a00794.html#aaf59580bf7ec60ec94973212786a1126">cmd_PA10</a></div><div class="ttdeci">#define cmd_PA10</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00065">DecodeCommandBytes.c:65</a></div></div> 125<div class="ttc" id="a00794_html_a87d418912514db68d46a19488a880c2f"><div class="ttname"><a href="a00794.html#a87d418912514db68d46a19488a880c2f">cmd_Q9</a></div><div class="ttdeci">#define cmd_Q9</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00031">DecodeCommandBytes.c:31</a></div></div> 126<div class="ttc" id="a00794_html_a7e4a1d4a077dd963999e128207315013"><div class="ttname"><a href="a00794.html#a7e4a1d4a077dd963999e128207315013">cmd_180Z</a></div><div class="ttdeci">#define cmd_180Z</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00048">DecodeCommandBytes.c:48</a></div></div> 127<div class="ttc" id="a00794_html_a587d3e585fef780d1e9797700bf167a1"><div class="ttname"><a href="a00794.html#a587d3e585fef780d1e9797700bf167a1">cmd_M90X</a></div><div class="ttdeci">#define cmd_M90X</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00049">DecodeCommandBytes.c:49</a></div></div> 128<div class="ttc" id="a00770_html_a6cbf0fc4417e3a411a9685e2a92f1816"><div class="ttname"><a href="a00770.html#a6cbf0fc4417e3a411a9685e2a92f1816">SaveAccelCalibrationToNVM</a></div><div class="ttdeci">void SaveAccelCalibrationToNVM(SensorFusionGlobals *sfg)</div><div class="ttdef"><b>Definition:</b> <a href="a00770_source.html#l00094">calibration_storage.c:94</a></div></div> 129<div class="ttc" id="a00794_html_abb76efa2b507e0da516441a705efc24b"><div class="ttname"><a href="a00794.html#abb76efa2b507e0da516441a705efc24b">cmd_PA04</a></div><div class="ttdeci">#define cmd_PA04</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00059">DecodeCommandBytes.c:59</a></div></div> 130<div class="ttc" id="a00770_html_a98044dd5ba8a80f7e92b4567725e5193"><div class="ttname"><a href="a00770.html#a98044dd5ba8a80f7e92b4567725e5193">EraseGyroCalibrationFromNVM</a></div><div class="ttdeci">void EraseGyroCalibrationFromNVM(void)</div><div class="ttdef"><b>Definition:</b> <a href="a00770_source.html#l00149">calibration_storage.c:149</a></div></div> 131<div class="ttc" id="a00794_html_a2b71412b44a575e0733a1a43a266b15a"><div class="ttname"><a href="a00794.html#a2b71412b44a575e0733a1a43a266b15a">cmd_PA11</a></div><div class="ttdeci">#define cmd_PA11</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00066">DecodeCommandBytes.c:66</a></div></div> 132<div class="ttc" id="a00773_html"><div class="ttname"><a href="a00773.html">calibration_storage.h</a></div><div class="ttdoc">Provides functions to store calibration to NVM. </div></div> 133<div class="ttc" id="a00848_html"><div class="ttname"><a href="a00848.html">fusion.h</a></div><div class="ttdoc">Lower level sensor fusion interface. </div></div> 134<div class="ttc" id="a03967_html_aa62f07fac570bf67c0832d4bf7d38e76"><div class="ttname"><a href="a03967.html#aa62f07fac570bf67c0832d4bf7d38e76">ControlSubsystem::AccelCalPacketOn</a></div><div class="ttdeci">volatile int8_t AccelCalPacketOn</div><div class="ttdoc">variable used to coordinate accelerometer calibration </div><div class="ttdef"><b>Definition:</b> <a href="a00779_source.html#l00049">control.h:49</a></div></div> 135<div class="ttc" id="a00794_html_a5959c5ca910013194a971227e6ac7d57"><div class="ttname"><a href="a00794.html#a5959c5ca910013194a971227e6ac7d57">cmd_PA06</a></div><div class="ttdeci">#define cmd_PA06</div><div class="ttdef"><b>Definition:</b> <a href="a00794_source.html#l00061">DecodeCommandBytes.c:61</a></div></div> 136</div><!-- fragment --></div><!-- contents --> 137 138<hr class="footer"/><address class="footer"><small> 139© Copyright 2016-2022 NXP. All Rights Reserved. SPDX-License-Identifier: BSD-3-Clause 140</small></address> 141</body> 142</html> 143