Created
March 24, 2020 21:57
-
-
Save Micrified/95f2908690efd3d5f5d5350a7cf2324e to your computer and use it in GitHub Desktop.
Inline example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\begin{lstlisting}[caption={Packing routine for input control}, label={lst:code-packing}] | |
static void pack_msg_input_ctrl (msg_data_input_ctrl *data, unsigned char *b) { | |
b[0] = data->desired_phi >> 8; b[1] = data->desired_phi & 0xFF; | |
b[2] = data->desired_theta >> 8; b[3] = data->desired_theta & 0xFF; | |
b[4] = data->desired_sr >> 8; b[5] = data->desired_sr & 0xFF; | |
b[6] = data->desired_lift >> 8; b[7] = data->desired_lift & 0xFF; | |
b[8] = data->P >> 8; b[9] = data->P & 0xFF; | |
b[10] = data->P1 >> 8; b[11] = data->P1 & 0xFF; | |
b[12] = data->P2 >> 8; b[13] = data->P2 & 0xFF; | |
b[14] = data->H >> 8; b[15] = data->H & 0xFF; | |
\end{lstlisting} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment