Skip to content

Commit 74df903

Browse files
committed
Add FirmataMarshaller::sendCapabilityQuery
1 parent ae028fb commit 74df903

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

FirmataMarshaller.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,17 @@ const
9898
sendValueAsTwo7bitBytes(value);
9999
}
100100

101+
/**
102+
* Send a capability query to the Firmata host application. The resulting sysex message will have
103+
* a CAPABILITY_RESPONSE command byte, followed by a list of byte tuples (mode and mode resolution)
104+
* for each pin; where each pin list is terminated by 0x7F (128).
105+
*/
106+
void FirmataMarshaller::sendCapabilityQuery(void)
107+
const
108+
{
109+
sendSysex(CAPABILITY_QUERY, 0, NULL);
110+
}
111+
101112
/* (intentionally left out asterix here)
102113
* STUB - NOT IMPLEMENTED
103114
* Send a single digital pin value to the Firmata host application.

FirmataMarshaller.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ class FirmataMarshaller
3737

3838
/* serial send handling */
3939
void sendAnalog(uint8_t pin, uint16_t value) const;
40+
void sendCapabilityQuery(void) const;
4041
void sendDigital(uint8_t pin, uint16_t value) const;
4142
void sendDigitalPort(uint8_t portNumber, uint16_t portData) const;
4243
void sendString(const char *string) const;

0 commit comments

Comments
 (0)