17#include "sygah-metadata.hpp"
18#include "sygah-endpoints.hpp"
20namespace sygaldry {
namespace sygsa {
28, description_<"A capacitive touch sensor with 30 electrodes to be connected by "
29 "the user. Operates in DIFF mode only. See "
30 "https://learn.bela.io/using-trill/settings-and-sensitivity/ "
31 "for more information on configuration."
33, author_<"Edu Meneses, Travis J. West">
34, copyright_<"Copyright 2023 Sygaldry Contributors">
35, license_<"SPDX-License-Identifier: MIT">
38 static constexpr unsigned int channels = 30;
41 slider_message<
"prescaler",
"measurement gain adjustment"
45 slider_message<
"noise threshold",
"threshold for ignoring low-level noise"
49 slider_message<
"sampling speed"
50 ,
"0 - ultra fast (57 to 2800 us per sensor), "
51 "3 - slow (205 to 22000 us per sensor). "
52 "Broad sampling rate adjustment; see also resolution"
56 slider_message<
"resolution"
57 ,
"measurement resolution in bits; "
58 "higher resolutions reduce effective sampling rate"
63 ,
"reset the baseline capacitance based on the current sensor state."
64 "Avoid touching the sensor while updating the baseline reading."
78 ,
"mapping from raw channel to normalized channel, "
79 "e.g. if the 0th element in the map is 5, then the 0th raw"
80 "channel will be written to the normalized channel with index 5."
87 toggle<
"running",
"indicates successful connection and polling status"> running;
88 text_message<
"error status",
"indicates error conditions"> error_status;
91 ,
"unprocessed difference in capacitance with respect to baseline"
92 , int, 0, std::numeric_limits<int>::max(), 0
95 toggle<
"any",
"indicates presence of any touch"> any;
96 array<
"max seen", channels,
"the maximum reading seen"
97 , int, 0,
decltype(raw)::max(), 0
99 array<
"normalized", channels
100 ,
"normalized capacitance reading"
102 array<
"mask", channels,
"indicates which electrodes are touched"
105 slider<
"instant max",
"the maximum normalized reading currently"
110 void * pimpl =
nullptr;