ztcl::motion has
Tells whether the device has a sensor.
ztcl::motion has accelerometer|gyroscope|rotation|heading
Description
Gives 1 when the host can watch the sensor, and 0 otherwise.
Returns
1 or 0.
Examples
# A host with no sensors, as a desktop.
% ztcl::motion has heading
0
Errors
% ztcl::motion has compass
bad sensor "compass": must be accelerometer, gyroscope, rotation, or heading
-errorcode NONE
Facts
- Capability
sensors. A new interpreter does not have it until the host turns it on.- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztcl 1.0.0-beta.6