Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
inputanalog_query(3)		  Arcan Lua API 	    inputanalog_query(3)

NAME
     inputanalog_query - Query analog devices for filtering details.

SYNOPSIS
     analogtbl_tbl or analogtbl
     inputanalog_query( devnum, axnum, rescan )

DESCRIPTION
     This  function  allows  you to query a device for analog device options and
     current values, either globally (no arguments, table of analogtbl returned)
     or from a specific device (and, optionally) axis. If rescan is set to != 0,
     the input subsystem will first scan for new devices.

NOTES
     1	    rescan is a rather costly operation and may possibly lose  data  for
	    devices that doesn't identify properly.

     2	    analogtbl  members:  devid,  subid	(device  and  axis  indices) up-
	    per_bound, lower_bound (value > upper and < lower will be discarded)
	    deadzone  (abs(value)  within  deadzone  will  be  discarded.   ker-
	    nel_size,  number  of  samples in for every sample out.  mode(drop),
	    analog processing disabled mode(pass), emit every sample  mode(avg),
	    average  the  kernel_size buffer mode(latest), only emit when buffer
	    full, and keep only most recent value

EXAMPLE
     function inputanalog_query0()
	   local antbl = inputanalog_query();
	   print(#antbl, "devices found.");
	   for i = 1, #antbl do
		 print("-----0);
		 print(string.format("%d:%d, upper:%d, lower: %d, deadzone: %d, " ..
		       "kernel_size: %d, filter_mode: %s0, antbl[i].devid, antbl[i].subid,
		       antbl[i].upper_bound, antbl[i].lower_bound, antbl[i].deadzone,
		       antbl[i].kernel_size, antbl[i].mode));
		 print("-----0);
	   end
     end

MISUSE
     function inputanalog_query0()
	   inputanalog_query("ind");
     end

SEE ALSO:
iodev				   August 2026		    inputanalog_query(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=inputanalog_query&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help