Skip to content

Commit 9ef5692

Browse files
authored
Merge pull request #1 from midi2-dev/KMI
-Changed len in concatSysexArray from a uint8_t to a uint16_t, which …
2 parents d862d58 + ebe5e8d commit 9ef5692

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

docs/midiCICreate.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ messages. Here is an examples of how this can be done.
9595
__Example Sending a JSON string in 512 byte Sysex message chunks__
9696
```c++
9797
void returnPE(uint8_t umpGroup, uint32_t remoteMUID, uint8_t requestId, char *propertyData,
98-
unint32_t propertyDataLength){
98+
uint32_t propertyDataLength){
9999
uint8_t sysexBuffer[512];
100100
std::string header = "{\"status\":200}";
101101
int totalChunks = ceil((double)(strL + header.length())/480); //480 is 512 minus the bytes used for heading etc.

include/utils.h

+14
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,20 @@
127127
#define MIDICI_PE_SUBREPLY 0x39
128128
#define MIDICI_PE_NOTIFY 0x3F
129129

130+
#define MIDICI_PE_STATUS_OK 200
131+
#define MIDICI_PE_STATUS_ACCEPTED 202
132+
#define MIDICI_PE_STATUS_RESOURCE_UNAVAILABLE 341
133+
#define MIDICI_PE_STATUS_BAD_DATA 342
134+
#define MIDICI_PE_STATUS_TOO_MANY_REQS 343
135+
#define MIDICI_PE_STATUS_BAD_REQ 400
136+
#define MIDICI_PE_STATUS_REQ_UNAUTHORIZED 403
137+
#define MIDICI_PE_STATUS_RESOURCE_UNSUPPORTED 404
138+
#define MIDICI_PE_STATUS_RESOURCE_NOT_ALLOWED 405
139+
#define MIDICI_PE_STATUS_PAYLOAD_TOO_LARGE 413
140+
#define MIDICI_PE_STATUS_UNSUPPORTED_MEDIA_TYPE 415
141+
#define MIDICI_PE_STATUS_INVALID_DATA_VERSION 445
142+
#define MIDICI_PE_STATUS_INTERNAL_DEVICE_ERROR 500
143+
130144
#define MIDICI_PI_CAPABILITY 0x40
131145
#define MIDICI_PI_CAPABILITYREPLY 0x41
132146
#define MIDICI_PI_MM_REPORT 0x42

src/midiCIMessageCreate.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -420,8 +420,7 @@ uint16_t CIMessage::sendPESet(uint8_t *sysex, uint8_t midiCIVer, uint32_t srcMUI
420420
bodyLength, body, (uint8_t) MIDICI_PE_SET);
421421
}
422422

423-
uint16_t
424-
CIMessage::sendPEGetReply(uint8_t *sysex, uint8_t midiCIVer, uint32_t srcMUID, uint32_t destMUID, uint8_t requestId,
423+
uint16_t CIMessage::sendPEGetReply(uint8_t *sysex, uint8_t midiCIVer, uint32_t srcMUID, uint32_t destMUID, uint8_t requestId,
425424
uint16_t headerLen, uint8_t *header, uint16_t numberOfChunks,
426425
uint16_t numberOfThisChunk, uint16_t bodyLength, uint8_t *body) {
427426
return sendPEWithBody(sysex, midiCIVer, srcMUID, destMUID, requestId, headerLen, header, numberOfChunks,

0 commit comments

Comments
 (0)