Overdrivr / Telemetry

Data visualization and communication with embedded devices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve transports + options

Overdrivr opened this issue · comments

For now, transports will allow to not send a frame if buffer is full.

void send(void * buf, uint32_t size)
{
  // If user forgot to define transport by calling init_telemetry, abort
  if(!transportPtr)
    return;

  if(transportPtr->writeable() && size > 0)
  {
    transportPtr->write(outgoingBuffer, size);
  }
}

User should be given the choice to wait or discard

After preliminary testing, not sure having a block option is such a good idea. It could induce hidden latency hard to debug.

Instead, provide a way to the user to choose TX buffer size, and teach about how to size this buffer properly.

User only has to modify value in telemetry_utils.h. Closing