Go to the source code of this file.
Defines | |
#define | LRF_DATA_NB 682 |
Functions | |
int | kb_lrf_Init (char *LRF_DeviceName) |
int | kb_lrf_GetDistances (int LRF_DeviceHandle) |
int | kb_lrf_GetDistances_Averaged (int LRF_DeviceHandle, int average) |
void | kb_lrf_Power_On (void) |
void | kb_lrf_Power_Off (void) |
void | kb_lrf_Laser_On (int LRF_DeviceHandle) |
void | kb_lrf_Laser_Off (int LRF_DeviceHandle) |
void | kb_lrf_Close (int LRF_DeviceHandle) |
long | kb_lrf_Get_Timestamp (void) |
Variables | |
long | kb_lrf_DistanceData [LRF_DATA_NB] |
#define LRF_DATA_NB 682 |
Definition at line 11 of file kb_lrf.h.
Referenced by kb_lrf_GetDistances(), kb_lrf_GetDistances_Averaged(), lrfmeasure(), and main().
void kb_lrf_Close | ( | int | LRF_DeviceHandle | ) |
kb_lrf_Close does powering off the LRF, the close the port device
LRF_DeviceHandle | Handle to the lrf port which as been openned by kb_lrf_openComPort or kb_lrf_init |
Definition at line 737 of file kb_lrf.c.
References kb_lrf_Laser_Off().
Referenced by ctrlc_handler(), handle_kill(), main(), and poweroff().
long kb_lrf_Get_Timestamp | ( | void | ) |
kb_lrf_get_timestamp : get the last timestep in [ms]
Definition at line 628 of file kb_lrf.c.
References urg_state_t::last_timestamp.
Referenced by lrfmeasure().
int kb_lrf_GetDistances | ( | int | LRF_DeviceHandle | ) |
kb_lrf_GetDistances is a high level function that does whole mechanism certify the link, get some distances.
LRF_DeviceHandle | Handle to the lrf port which as been openned by kb_lrf_openComPort or kb_lrf_init |
Definition at line 761 of file kb_lrf.c.
References kb_lrf_DistanceData, LRF_DATA_NB, urg_captureByMD(), and urg_receiveData().
Referenced by kb_lrf_GetDistances_Averaged(), koa_lrf_task(), lrfmeasure(), and main().
int kb_lrf_GetDistances_Averaged | ( | int | LRF_DeviceHandle, | |
int | average | |||
) |
kb_lrf_GetDistances is a high level function that does whole mechanism certify the link, get some distances, averages then receive back the data from LRF,
LRF_DeviceHandle | Handle to the lrf port which as been openned by kb_lrf_openComPort or kb_lrf_init | |
average | number of acquisitions needed for averaging |
Definition at line 797 of file kb_lrf.c.
References kb_lrf_DistanceData, kb_lrf_DistanceDataSum, kb_lrf_DistanceGoodCounter, kb_lrf_GetDistances(), and LRF_DATA_NB.
Referenced by lrfmeasure().
int kb_lrf_Init | ( | char * | LRF_DeviceName | ) |
kb_lrf_Init does openning port, turn power on the LRF then certify the link,
LRF_DeviceName | String name of the serial port device where the laser is connected |
Definition at line 701 of file kb_lrf.c.
References BAUDRATE, ErrorMessage, HComm, KB_ERROR, KB_ERROR_OPENLRF, kb_lrf_Laser_On(), and urg_connect().
Referenced by koa_lrf_task(), lrfinit(), and main().
void kb_lrf_Laser_Off | ( | int | LRF_DeviceHandle | ) |
kb_lrf_Laser_Off : set LRF laser beam OFF
Definition at line 652 of file kb_lrf.c.
References Timeout, and urg_sendMessage().
Referenced by kb_lrf_Close(), laseroff(), and poweroff().
void kb_lrf_Laser_On | ( | int | LRF_DeviceHandle | ) |
kb_lrf_Laser_On : set LRF laser beam ON
Definition at line 639 of file kb_lrf.c.
References Timeout, and urg_sendMessage().
Referenced by kb_lrf_Init(), and laseron().
void kb_lrf_Power_Off | ( | void | ) |
kb_lrf_Power_Off : power off the LRF battery supply module
Definition at line 682 of file kb_lrf.c.
References GPIO_POWER, kb_gpio_cleanup(), kb_gpio_clear(), kb_gpio_dir(), kb_gpio_function(), and kb_gpio_init().
Referenced by poweroff().
void kb_lrf_Power_On | ( | void | ) |
kb_lrf_Power_On : power on the LRF battery supply module
Definition at line 665 of file kb_lrf.c.
References GPIO_POWER, kb_gpio_cleanup(), kb_gpio_dir(), kb_gpio_function(), kb_gpio_init(), and kb_gpio_set().
Referenced by main(), and poweron().
long kb_lrf_DistanceData[LRF_DATA_NB] |
Definition at line 78 of file kb_lrf.c.
Referenced by kb_lrf_GetDistances(), kb_lrf_GetDistances_Averaged(), koa_lrf_task(), lrfmeasure(), and main().