I hope to get more accurate gyro angles. With Labview Mindstorms you can do a raw reading to get a value between 0 and 4095 instead of 0 and 360 degrees.
I would like to use GetData_UART to read the raw gyro data, hopefully get a higher resolution.
But I don't know what kind of data is read via GetData_UART(E_Port_1, E_UART_Type_Gyro, E_UART_Mode_GyroAngle);
I get a const void *, but what can I cast this to? That is not clear from the documentation.
Reading Raw Gyro data
Moderator: cpp4robots_admin
-
- Administrátor fóra
- Posts: 21
- Joined: 04 Nov 2020 14:34
- Contact:
Re: Reading Raw Gyro data
Hi,
according to the original firmware(lms2012), the return type is array of "signed char" and the length of this array is 32.
You can cast to pointer to "const signed char".
according to the original firmware(lms2012), the return type is array of "signed char" and the length of this array is 32.
You can cast to pointer to "const signed char".
Code: Select all
const signed char* pGyroData = static_cast<const signed char*>(GetData_UART(E_Port_1, E_UART_Type_Gyro, E_UART_Mode_GyroAngle));
Who is online
Users browsing this forum: No registered users and 2 guests