Skip to content

Commit

Permalink
Fix commands syntax (#2941)
Browse files Browse the repository at this point in the history
* remove redundant parentheses

* add missing closing braces
  • Loading branch information
Starlight220 authored Jan 12, 2025
1 parent 80fb876 commit aa00312
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion source/docs/software/commandbased/commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ The ``run`` factory, backed by the ``RunCommand`` ([Java](https://github.wpilib.
-m_driverController.GetLeftY(),
m_driverController.GetRightX());
},
{&m_drive}))
{&m_drive})
```

```python
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The command-based paradigm is also an example of :term:`declarative programming`
```

```c++
Trigger([&condition] { return condition.Get()).OnTrue(frc2::cmd::RunOnce([&piston] { piston.Set(frc::DoubleSolenoid::kForward)));
Trigger([&condition] { return condition.Get(); }).OnTrue(frc2::cmd::RunOnce([&piston] { piston.Set(frc::DoubleSolenoid::kForward); }));
```

```python
Expand Down

1 comment on commit aa00312

@VG-Fish
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Please sign in to comment.