Skip to content

Request for change: Change "LN_BUF_SIZE" in "if (Buffer->WriteIndex >= LN_BUF_SIZE)" to a number or a Variable #52

Description

@stighelmerpersson

In the file ln_buf.h there is this section:

static inline void addByteLnBuf(LnBuf Buffer, uint8_t newByte)
{
Buffer->Buf[Buffer->WriteIndex++] = newByte;
if (Buffer->WriteIndex >= LN_BUF_SIZE)
Buffer->WriteIndex = 0;
}
*

The change is to change the text "LN_BUF_SIZE" to a number or a new variable, so a number lower than LN_BUF_SIZE can be selected.

By changing the text "LN_BUF_SIZE" to a number or a new variable, ex. 100, it will then count up to 100 - and then reset to 0 - and then preventing doing the reset "inside" a package - and crash.

The number must be determined by the max. size of the package "minus" 128.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions