LCOV - code coverage report
Current view: top level - src/MIDI_Senders - DigitalNoteSender.hpp (source / functions) Hit Total Coverage
Test: 19d2efc7037c2e176feca44750a12594c76f466f Lines: 8 8 100.0 %
Date: 2019-11-24 14:50:27 Functions: 4 4 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : #pragma once
       2             : 
       3             : #include <Control_Surface/Control_Surface_Class.hpp>
       4             : 
       5             : BEGIN_CS_NAMESPACE
       6             : 
       7             : class DigitalNoteSender {
       8             :   public:
       9          26 :     DigitalNoteSender(uint8_t velocity = 0x7F) : velocity(velocity) {}
      10          18 :     void sendOn(MIDICNChannelAddress address) {
      11          18 :         Control_Surface.MIDI().sendNoteOn(address, getVelocity());
      12          18 :     }
      13          18 :     void sendOff(MIDICNChannelAddress address) {
      14          18 :         Control_Surface.MIDI().sendNoteOff(address, 0x7F);
      15          18 :     }
      16             : 
      17             :     void setVelocity(uint8_t velocity) { this->velocity = velocity; }
      18          18 :     uint8_t getVelocity() const { return this->velocity; }
      19             : 
      20             :   private:
      21             :     uint8_t velocity;
      22             : };
      23             : 
      24             : END_CS_NAMESPACE

Generated by: LCOV version 1.14-5-g4ff2ed6