Skip to content

Return packet type processed in process() - #27

Open
madleech wants to merge 1 commit into
masterfrom
return-packet-type-from-process
Open

Return packet type processed in process()#27
madleech wants to merge 1 commit into
masterfrom
return-packet-type-from-process

Conversation

@madleech

Copy link
Copy Markdown
Owner

The readme specifically says for process():

Return value is NULL for no valid packet received, or one of CMRI::INIT, CMRI::SET, CMRI::POLL depending on the packet type received.

However in reality it's just returning true / false. For some users, having it return the processed packet type is a useful enhancement. Lets update it to match the documentation.

Note: although this is a behaviour change, anyone doing if (cmri.process()) will see unchanged behaviour, as false and NOOP are both 0 and so equivalent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant