GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
inputanalog_query(3) Arcan Lua API inputanalog_query(3)

inputanalog_query - Query analog devices for filtering details.

analogtbl_tbl or analogtbl
inputanalog_query(

devnum, axnum, rescan )

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.

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) upper_bound, lower_bound (value > upper and < lower will be discarded) deadzone (abs(value) within deadzone will be discarded. kernel_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

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

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

June 2022 iodev

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.