LCOV - code coverage report
Current view: top level - src/MIDI_Outputs - PBPotentiometer.hpp (source / functions) Hit Total Coverage
Test: 169c36a3797bc662d84b5726f34a3f37d3c58247 Lines: 2 2 100.0 %
Date: 2024-11-09 15:32:27 Functions: 1 1 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : #pragma once
       2             : 
       3             : #include <MIDI_Outputs/Abstract/MIDIFilteredAnalog.hpp>
       4             : #include <MIDI_Senders/PitchBendSender.hpp>
       5             : 
       6             : BEGIN_CS_NAMESPACE
       7             : 
       8             : /**
       9             :  * @brief   A class of MIDIOutputElement%s that read the analog input from a
      10             :  *          **potentiometer or fader**, and send out 14-bit MIDI **Pitch Bend** 
      11             :  *          events.
      12             :  * 
      13             :  * The analog input is filtered and hysteresis is applied for maximum
      14             :  * stability.  
      15             :  * The actual precision is "only" 10 bits, because this is the resolution of the
      16             :  * built-in ADC, and this is the default resolution used by the Mackie Control
      17             :  * Universal protocol.  
      18             :  * This version cannot be banked.
      19             :  *
      20             :  * @ingroup MIDIOutputElements
      21             :  */
      22             : class PBPotentiometer : public MIDIFilteredAnalog<PitchBendSender<10>> {
      23             :   public:
      24             :     /** 
      25             :      * @brief   Create a new PBPotentiometer object with the given analog pin
      26             :      *          and channel.
      27             :      * 
      28             :      * @param   analogPin
      29             :      *          The analog input pin to read from.
      30             :      * @param   address
      31             :      *          The MIDI channel [Channel_1, Channel_16] and optional Cable
      32             :      *          Number [Cable_1, Cable_16].
      33             :      */
      34           4 :     PBPotentiometer(pin_t analogPin, MIDIChannelCable address = Channel_1)
      35           4 :         : MIDIFilteredAnalog(analogPin, address, {}) {}
      36             : };
      37             : 
      38             : END_CS_NAMESPACE

Generated by: LCOV version 1.15