Skip to content

Add FirmataMarshaller::sendCapabilityQuery #330

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions FirmataMarshaller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,17 @@ const
sendValueAsTwo7bitBytes(value);
}

/**
* Send a capability query to the Firmata host application. The resulting sysex message will have
* a CAPABILITY_RESPONSE command byte, followed by a list of byte tuples (mode and mode resolution)
* for each pin; where each pin list is terminated by 0x7F (128).
*/
void FirmataMarshaller::sendCapabilityQuery(void)
const
{
sendSysex(CAPABILITY_QUERY, 0, NULL);
}

/* (intentionally left out asterix here)
* STUB - NOT IMPLEMENTED
* Send a single digital pin value to the Firmata host application.
Expand Down
1 change: 1 addition & 0 deletions FirmataMarshaller.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class FirmataMarshaller

/* serial send handling */
void sendAnalog(uint8_t pin, uint16_t value) const;
void sendCapabilityQuery(void) const;
void sendDigital(uint8_t pin, uint16_t value) const;
void sendDigitalPort(uint8_t portNumber, uint16_t portData) const;
void sendString(const char *string) const;
Expand Down