LCOV - code coverage report
Current view: top level - src/MIDI_Senders - PitchBendSender.hpp (source / functions) Hit Total Coverage
Test: 90a1b9beff85a60dc6ebcea034a947a845e56960 Lines: 8 8 100.0 %
Date: 2019-11-30 15:53:32 Functions: 1 1 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : #pragma once
       2             : 
       3             : #include <AH/Math/IncreaseBitDepth.hpp>
       4             : #include <Control_Surface/Control_Surface_Class.hpp>
       5             : 
       6             : BEGIN_CS_NAMESPACE
       7             : 
       8             : template <uint8_t INPUT_PRECISION_BITS>
       9             : class PitchBendSender {
      10             :   public:
      11           9 :     static void send(uint16_t value, MIDICNChannelAddress address) {
      12           9 :         value =
      13           9 :             AH::increaseBitDepth<14, INPUT_PRECISION_BITS, uint16_t, uint16_t>(
      14           9 :                 value);
      15             :         // ignore address byte, just use channel and cable numbers
      16          18 :         MIDICNChannel channelCN = {address.getChannel(),
      17           9 :                                    address.getCableNumber()};
      18           9 :         Control_Surface.MIDI().sendPB(channelCN, value);
      19           9 :     }
      20             : 
      21             :     constexpr static uint8_t precision() { return INPUT_PRECISION_BITS; }
      22             : };
      23             : 
      24             : END_CS_NAMESPACE

Generated by: LCOV version 1.14-5-g4ff2ed6