Skip to content

Add return value checks for xQueueSend in keyboard drivers #397

Description

@coderabbitai

Description

Both TpagerKeyboard and CardputerKeyboard (Adv) currently call xQueueSend with a 50ms timeout but do not check the return value. If the queue is full and the timeout expires, keypresses will be silently dropped, leading to a poor user experience during rapid typing.

Affected Files

  • Boards/LilygoTLoraPager/Source/devices/TpagerKeyboard.cpp (line 93)
  • Boards/M5stackCardputerAdv/Source/devices/CardputerKeyboard.cpp

Expected Behavior

The code should check the return value of xQueueSend and handle failures appropriately (e.g., log a warning when keypresses are dropped).

References

Activity

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

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions