Skip to content

Sending empty (0-byte) data  #24

Description

@hillin

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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions