Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Limit how often the same command can repeat

Open
#77 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
embedded-iot

Research direction

Start with docs/commands.md and the CommandRequirements::check entry point named in the issue; trace how commands are admitted before frames are built. Decide the guard’s scope, where it lives, and how each command declares an interval, then add host tests and document the rule. Done means every implemented command declares its interval and repeated commands are rejected as described.

Written by the indexing model from the issue text.

Description

enhancement

Part of the prerequisites for real commands (#75). Related: #73, #15.

Problem

Nothing stops the same command from reaching the car many times in a row. A stuck button, an app bug or a replayed message would send its frames to the bus again and again. #15 dedupes a redelivered message_id, but a stuck button sends a new message_id each time, so it doesn't help here.

Proposal

  • A minimum interval between two runs of the same command, checked right after the command requirements (CommandRequirements::check, see docs/commands.md) and before any frame is built.
  • A command inside the interval gets a failed CommandResponse with COMMAND_STATUS_CODE_REJECTED_UNAVAILABLE and a clear message, like any other rejection. Whether it is also reported unavailable until the interval has passed is to decide: it would grey the button out, but flickers after every press.
  • The interval is per command, set by each command's PR from how the car behaves (a door lock and a climate target temperature step don't need the same). Commands that are meant to be repeated quickly, such as stepping the target temperature, can use a short one or none.

To decide

  • Per command, per phone (source_device_id), or both?
  • Where the check lives: a small generic guard in core-interface next to the requirements, with each vehicle passing its intervals.
  • What counts as a run: any admitted command, or only one that was sent to the bus.

Done when

There is a guard with host tests, the docs describe the rule, and each implemented command declares its interval.

Dominant language
Rust
Stars
1
Forks
0
Avg merge
15h 26m
Merged PRs (30d)
22

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

  • No Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from OpenCarControls/firmware

All issues in OpenCarControls/firmware

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.