Skip to content
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

Sending empty (0-byte) data #24

Open
hillin opened this issue Jan 3, 2020 · 3 comments
Open

Sending empty (0-byte) data #24

hillin opened this issue Jan 3, 2020 · 3 comments

Comments

@hillin
Copy link

hillin commented Jan 3, 2020

Sending a 0-byte data actually does nothing on PacketSerial (returns directly in the send method).
However I find it quite common to send such empty data. For example, a simple protobuf struct:

message SimpleMessage
{
    bool value = 1;
}

with its value set to false will be encoded as a 0-byte buffer by nanopb. I guess it's better to just send a PacketMarker for this kind of data.

Expected Behavior

Send a PacketMarker for 0-byte data.

Current Behavior

Does nothing on 0-byte data.

Your Environment

  • Version used: 1.4.0
  • IDE Name and version: N/A
  • Operating System and version (desktop or mobile): Arduino
  • Link to your project: N/A
@PowerBroker2
Copy link

This lib seems to be unsupported. A much easier to use and supported serial packet library can be found here.

@bakercp
Copy link
Owner

bakercp commented May 13, 2020

This library is in fact supported.

@bakercp
Copy link
Owner

bakercp commented May 13, 2020

Hi @hillin, pull requests are definitely welcomed!

https://github.com/bakercp/PacketSerial/blob/master/docs/CONTRIBUTING.md

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

No branches or pull requests

3 participants