|
TR-mbed 1.0
|
#include "Jetson.h"Macros | |
| #define | MAGICBYTE 0xEE |
| #define | JETSON_READ_BUFF_SIZE 500 |
| #define | JETSON_READ_MSG_SIZE 11 |
Functions | |
| void | getBytesFromFloat (char *byteArr, float value) |
| void | decode_toSTM32 (char *read_buf, float &received_one, float &received_two, char &received_three, uint8_t &checksum) |
| void | copy4Char (char *srcBuf, char *destBuf, int offset) |
| void | jetson_send_feedback (BufferedSerial &bcJetson, const Jetson_send_data &data) |
| ssize_t | jetson_read_values (BufferedSerial &bcJetson, Jetson_read_data &read_data) |
Variables | |
| char | nucleo_value [30] = {0} |
| char | jetson_read_buff [JETSON_READ_BUFF_SIZE] = {0} |
| int | jetson_read_buff_pos = 0 |
| #define JETSON_READ_BUFF_SIZE 500 |
| #define JETSON_READ_MSG_SIZE 11 |
| #define MAGICBYTE 0xEE |
| void copy4Char | ( | char * | srcBuf, |
| char * | destBuf, | ||
| int | offset | ||
| ) |
Copies 4 bytes from srcBuf[0] into destBuf[offset]
| srcBuf | source buffer |
| destBuf | destination buffer |
| offset | the starting position into destBuf |
| void decode_toSTM32 | ( | char * | read_buf, |
| float & | received_one, | ||
| float & | received_two, | ||
| char & | received_three, | ||
| uint8_t & | checksum | ||
| ) |
Writes 9 bytes of read_buf into received_one and received_two as floats for pitch & yaw positions Used for receiving desired position data from CV in read_buf, write out as floats to received_one/two.
| read_buf | - Source data |
| received_one | - Destination buffer |
| void getBytesFromFloat | ( | char * | byteArr, |
| float | value | ||
| ) |
Copy float value bytes into single bytes in byteArr array
| byteArr | destination char array for value individual bytes |
| value | float value to copy into byteArr |
| ssize_t jetson_read_values | ( | BufferedSerial & | bcJetson, |
| Jetson_read_data & | read_data | ||
| ) |
Read desired pitch and yaw position data from Jetson
| pitch_move | buffer to store desired pitch position |
| yaw_move | buffer to store desired yaw position |
| void jetson_send_feedback | ( | BufferedSerial & | bcJetson, |
| const Jetson_send_data & | data | ||
| ) |
Read motor values and send to CV
| char jetson_read_buff[JETSON_READ_BUFF_SIZE] = {0} |
| int jetson_read_buff_pos = 0 |
| char nucleo_value[30] = {0} |