Hi,
I am trying to just print the data that is sent by the demo through the UART.
In this case I'm trying to get the 3, x, y and z coordinates contained in the array result-> objOut which are of type float.
I print them but I don't understand the format data and if what I get is correct? I'm thinking that is a format data issue ...
Here is the code I am using:
/* Send detected Objects */
if ((pGuiMonSel->detectedObjects == 1) || (pGuiMonSel->detectedObjects == 2) &&
(result->numObjOut > 0))
{
UART_writePolling (uartHandle,
(uint8_t*)&tl[tlvIdx],
sizeof(MmwDemo_output_message_tl));
/*Send array of objects */
UART_writePolling (uartHandle, (uint8_t*)result->objOut,
sizeof(DPIF_PointCloudCartesian) * result->numObjOut);
printf("NUM OBJECTS %d \n",result->numObjOut);
for(loop = 0; loop <result->numObjOut; loop++){
printf("############## Object %d ########### \n",loop);
printf("Item x, %.2f \n",loop,result->objOut[loop].x);
printf("Item y, %.2f \n",loop,result->objOut[loop].y);
printf("Item z, %.2f \n",loop,result->objOut[loop].z);
}
tlvIdx++;
}
and the result obtained:
NUM OBJECTS 6
I############## Object 0 ###########
Item x, -0.50
Item y, 0.29
Item z, -0.21
############## Object 1 ###########
Item x, 0.71
Item y, 0.83
Item z, -0.32
############## Object 2 ###########
Item x, 0.47
Item y, 2.30
Item z, 0.95
############## Object 3 ###########
Item x, 0.17
Item y, 2.63
Item z, 0.33
############## Object 4 ###########
Item x, 0.17
Item y, 2.68
Item z, 0.34
############## Object 5 ###########
Item x, -0.46
Item y, 2.32
Item z, 4.27
[...]
How to obtain the good data in meters ?
Why can i not print the same data with System_printf()?
I obtain "f" whithout any data.
Thank you ,
Daniel C.