Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Limit how often the same command can repeat

未关闭
#77 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
rust
领域
embedded-iot

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
Rust
星标
1
派生
0
平均合并
15 小时 26 分钟
30 天内合并 PR
22

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

OpenCarControls/firmware 的其他 Issue

查看 OpenCarControls/firmware 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。