Spur_tilt_GL, Spur_tilt_LC, Spur_tilt_FS
int Spur_tilt_GL(double d, double t);
int Spur_tilt_LC(double d, double t);
int Spur_tilt_FS(double d, double t);
Set floor tilt angle and its direction used for gravity compensation.
- d: floor tilt orientation [rad]
- t: tilt angle [rad]
On success, 1 is returned. On error, -1 is returned.
Spur_freeze, Spur_unfreeze
int Spur_freeze(void);
int Spur_unfreeze(void);
Ignore any other control command and stop the vehicle. Unfreeze to resume normal behavior.
On success, 1 is returned. On error, -1 is returned.
Spur_isfreeze
int Spur_isfreeze(void);
Get current emergency stop status.
On success, 1 is returned if vehicle is in emergency stop mode, and 0 is returned elsewise. On error, -1 is returned.
YP_get_ad_value
int YP_get_ad_value(int num);
Get the current value of analog/digital converter.
Note that num=15
is reserved for digital IO value.
- num: port id of the a/d port
On success, device dependent unsigned integer is returned. On error, -1 is returned.
YP_set_io_dir, YP_set_io_data
int YP_set_io_dir(unsigned char dir);
int YP_set_io_data(unsigned char data);
Set digital IO port directions and the output state. Results are device dependent.
- dir: 8-bit mask of output direction
- data: 8-bit output data
On success, 1 is returned. On error, -1 is returned.
YP_get_device_error_state
double YP_get_device_error_state(int id, int *err);
Get device error status.
- id: ID of the device
- err: pointer to store error number
note: id and err values are device configuration dependent. Error number zero means no-error.
On success, timestamp (unix time) of the data is returned. If the device doesn't provide error state, zero is returned. On error, -1 is returned.