Skip to content

Commit 25e2b76

Browse files
committed
Add ActiveSensing message
1 parent 7d4c2c2 commit 25e2b76

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

adafruit_midi/active_sensing.py

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# SPDX-FileCopyrightText: 2024 Matthew Badeau
2+
#
3+
# SPDX-License-Identifier: MIT
4+
5+
"""
6+
`adafruit_midi.active_sensing`
7+
================================================================================
8+
9+
Active Sensing MIDI message.
10+
11+
12+
* Author(s): Matthew Badeau
13+
14+
Implementation Notes
15+
--------------------
16+
17+
"""
18+
19+
from .midi_message import MIDIMessage
20+
21+
__version__ = "0.0.0+auto.0"
22+
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_MIDI.git"
23+
24+
25+
class ActiveSensing(MIDIMessage):
26+
"""Active Sensing MIDI message.
27+
28+
Active Sensing message is a keepalive message sent every 300 milliseconds
29+
to tell the bus that the session is still good and alive.
30+
"""
31+
32+
_STATUS = 0xFE
33+
_STATUSMASK = 0xFF
34+
LENGTH = 1
35+
_slots = []
36+
37+
38+
ActiveSensing.register_message_type()

docs/api.rst

+3
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,6 @@
5151

5252
.. automodule:: adafruit_midi.timing_clock
5353
:members:
54+
55+
.. automodule:: adafruit_midi.active_sensing
56+
:members:

0 commit comments

Comments
 (0)