anyKode Marilou
|
Getting the last scan data.
M32 GetScan(xkode::lib::Array<MU8> & Scan, M32 * pDeviceResponse);
Parameters |
Description |
xkode::lib::Array<MU8> & Scan |
[in/out] Array of BYTES to be filled by the device. In return the array contains scan header and scan values. If an error occured, the array is empty. |
M32 * pDeviceResponse |
(see Message) |
MODA_EOK if a valid scan was received,
MODA_ENULLRESULT if no data was available.
GetScan gets the latest scan values (non blocking call). User have to use a LidarScan structure pointer for getting access to scan values:
xkode::lib::Array<MU8> _Scan; M32 DeviceResponse; M32 SystemResponse=pLidar->GetScanWaitComplete(_Scan,&DeviceResponse); if(_Scan.Count()!=0) { //Data is valid if array the is not empty Moda::Commons::LidarScan *pScan=(Moda::Commons::LidarScan *)_Scan.GetData(); DisplayScan(pScan); } else { _cprintf("error while getting scan data (system:%d device:%d)\r\n",SystemResponse,DeviceResponse); }
v4.7.17
Documentation v4.7 (18/01/2015), Copyright (c) 2015 anyKode. All rights reserved.
|
What do you think about this topic? Send feedback!
|