Skip to content

Commit

Permalink
Improved schmitt_trigger doc
Browse files Browse the repository at this point in the history
  • Loading branch information
djowel committed Sep 13, 2024
1 parent a2ea01b commit e808ceb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
8 changes: 4 additions & 4 deletions docs/modules/ROOT/pages/reference/misc/schmitt_trigger.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ include::../../common.adoc[]

== Overview

The output of a simple comparator is determined by its inputs. The output is `1` if the input signal is greater than the reference signal plus a specified hysteresis. Otherwise, the output is `0` if the input signal is less than the reference signal minus the specified hysteresis.
The output of a simple comparator is determined by its inputs. The output is `1` if the input signal is greater than the reference signal plus a specified hysteresis. The output is `0` if the input signal is less than the reference signal minus the specified hysteresis. Otherwise, the previous result is retained.

== Include

Expand Down Expand Up @@ -58,14 +58,14 @@ NOTE: C++ brace initialization may also be used.
| Expression | Semantics | Return Type

| `st()` | Return the latest result. | `float`
| `st(s, ref)` | Processes the input sample `s`. The
output is `1` if the input signal `s`
| `st(s, ref)` | Output is `1` if the input signal `s`
is greater than the reference signal
`ref` plus the specified hysteresis.
Otherwise, the output is `0` if the
input signal `s` is less than the
reference signal `ref` minus the
specified hysteresis. | `bool`
specified hysteresis. Otherwise, the
previous result is retained. | `bool`
|===


7 changes: 3 additions & 4 deletions q_lib/include/q/fx/schmitt_trigger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ namespace cycfi::q
////////////////////////////////////////////////////////////////////////////
// The output of a simple comparator is determined by its inputs. The
// output is `1` if the input signal is greater than the reference signal
// plus a specified hysteresis. Otherwise, the output is `0` if the input
// signal `is less than the reference signal minus the specified
// hysteresis. Hysteresis should be a fraction greater than or equal to
// zero, and less than 1.0, or less than 0_dB, if specified in decibels.
// plus a specified hysteresis. The output is `0` if the input signal is
// less than the reference signal minus the specified hysteresis.
// Otherwise, the previous result is retained.
//
// Note: the result is a bool.
////////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit e808ceb

Please sign in to comment.