LCOV - code coverage report
Current view: top level - src/MIDI_Outputs - PBPotentiometer.hpp (source / functions) Coverage Total Hit
Test: 73449d9b107c772cf65493691543348214e5d5eb Lines: 100.0 % 2 2
Test Date: 2026-06-06 17:44:35 Functions: 100.0 % 1 1
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 2.4-beta