Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[commands] Call wrapped command initSendable in WrappedCommand #6471

Merged
merged 2 commits into from
Apr 22, 2024

Conversation

DeltaDizzy
Copy link
Contributor

Fixes #6292

@DeltaDizzy DeltaDizzy requested a review from a team as a code owner March 26, 2024 07:44
@PeterJohnson PeterJohnson merged commit 7bc0380 into wpilibsuite:main Apr 22, 2024
25 checks passed
pjreiniger added a commit to bzlmodRio/allwpilib that referenced this pull request Apr 24, 2024
* [ci] Upgrade to new macOS runner (wpilibsuite#6328)

* [wpimath] Make units math functions constexpr (wpilibsuite#6345)

* [wpimath] Feed forwards: Use correct 'k' value in error message (wpilibsuite#6360)

* [build] Fix tcpsockets header publishing (wpilibsuite#6367)

* [cscore] Use Raw for CvSink and CvSource (wpilibsuite#6364)

Eventually we want to get to a point where we can remove OpenCV from the internals of cscore. The start to doing that is converting the existing CvSource and CvSink methods to RawFrame.

For CvSource, this is 100% a free operation. We can do everything the existing code could have done (with one small exception we can fairly easily fix).

For CvSink, by defaut this change would incur one extra copy, but no extra allocations. A set of direct methods were added to CvSink to add a method to avoid this extra copy.

* [cscore] Add BGRA support (wpilibsuite#6365)

* [apriltag] Fix field length in 2024 JSON (wpilibsuite#6373)

Fixes wpilibsuite#6371

* [wpimath] ExponentialProfile: Return copy of input state (wpilibsuite#6370)

As State is mutable, this avoids accidental modification of the passed-in object by the caller modifying the return value.

* [hal,wpiutil] Error out of HAL_Initialize if SetupRioNow fails (wpilibsuite#6374)

* [ntcore] Don't send value update to client setting value (wpilibsuite#6375)

* [ntcore] Add hidden subscribe option (wpilibsuite#6376)

This allows creating subscribers that aren't communicated with the network.

* [sysid] Relax peak acceleration search (wpilibsuite#6378)

* [apriltag] Add AprilTagFieldLayout.loadField() (wpilibsuite#6377)

* [hal] HAL_RefreshDSData: Zero out control word on DS disconnect, use cache in sim (wpilibsuite#6380)

* [glass] Fix FMS game data display and editing (wpilibsuite#6381)

Also don't require Enter for editing game data or match time.

* [wpiunits] Fix Distance class javadocs to state the correct dimension (NFC) (wpilibsuite#6363)

* [ci] Upgrade wpiformat (wpilibsuite#6395)

* [sysid] Fix position feedback latency compensation (wpilibsuite#6392)

* [ci] Windows cmake: update vcpkg version (wpilibsuite#6397)

We need fmtlib 10.2.1 to work around a compiler bug.

Also, reducing the number of jobs is no longer required with Actions runner upgrades.

* [wpiutil] Rate-limit FPGA error from Now() (wpilibsuite#6394)

* [examples] Remove unused private variables (wpilibsuite#6403)

* [wpiutil, hal] Crash on failure for SetupNowRio() and wpi::Now() when not configured (wpilibsuite#6417)

This is an unrecoverable condition, so always terminate.

* [sysid] Fix arm characterization crash (wpilibsuite#6422)

Fixes wpilibsuite#6421.

* [wpilibj] Call abort() on Rio on caught Java exception (wpilibsuite#6420)

On Rio, we simply want to restart the robot program as quickly as possible,
and don't want to risk a hang somewhere that will keep that from happening.

The main downside of this is it won't wait for threads to finish (e.g. data logs won't get a final flush).

* [wpimath] Add structured data support for DifferentialDriveWheelPositions (wpilibsuite#6412)

* [wpimath] LinearSystemId: Don't throw if Kv = 0 (wpilibsuite#6424)

That's just a system with no back-EMF.

* [sysid] Fix crash on negative feedforward gains (wpilibsuite#6425)

LinearSystemId's linear system factories throw on negative feedforward
gains, but SysId can compute the feedback gains just fine in that case.
Now we construct the system manually instead.

Fixes wpilibsuite#6423.

* [sim] GUI: Use shift to enable docking features (wpilibsuite#6429)

* [hal] Raise SIGKILL instead of calling abort() (wpilibsuite#6427)

We don't need to generate a core dump here if core dumps are enabled.

* [hal] Use SIGKILL instead of SIGILL (wpilibsuite#6431)

Fix typo.

* [docs] Add docs for features not supported on PDH (NFC) (wpilibsuite#6436)

* [sysid] Fix "Sample" docs typo (NFC) (wpilibsuite#6435)

* [sysid] Fix wrong position Kd with unnormalized time (wpilibsuite#6433)

* [ntcore] Fix memory leak in WebSocketConnection (wpilibsuite#6439)

* [commands] Trigger: pass m_loop to new Trigger in composition functions (wpilibsuite#6441)

* [ci] Work around asan actions bug (wpilibsuite#6442)

* [wpiutil] Upgrade to LLVM 18.1.1 (wpilibsuite#6405)

* [glass] Don't limit window name+label to 128 chars (wpilibsuite#6447)

* [build] Upgrade to wpiformat 2024.33 (wpilibsuite#6449)

This upgrades to clang-format and clang-tidy 18.1.1. This has the
constructor attribute formatting fix, so we can remove our
WPI_DEPRECATED macro.

* [ci] Pin wpiformat version in comment command (wpilibsuite#6457)

* [commands] Cache button and POV triggers

This is a common footgun for teams.

* [ci] Pin wpiformat version in comment command (wpilibsuite#6458)

* Run java format (wpilibsuite#6462)

* [wpiutil] DataLog: Don't constantly retry creating logs when low on space (wpilibsuite#6468)



When low on space, a log file won't be created. This is detected as a "deletion", and the DataLog thread will continously try to create a log, fail to do so because of low space, detect it as a "deletion", and do so in a loop.

If there's not enough space, the DataLog will be marked as stopped, preventing this infinite loop. Calls to start() will hit this code path and mark it as stopped again.

* [wpimath] Make more LinearSystemId functions not throw if Kv = 0 (wpilibsuite#6465)

* [wpimath] Add Pair.toString() (wpilibsuite#6463)

* [ci] Fix 2023 docker image usage (wpilibsuite#6459)

* Add reference to development to CONTRIBUTING.md (wpilibsuite#6467)

* Revert "[commands] Cache button and POV triggers"

Also revert the associated formatting commit.  This was an accidental merge.
This reverts commit ff929d4.
This reverts commit 2392c9f.

* [ci] Use mirror repository for liblzma (wpilibsuite#6499)

Uses https://github.com/bminor/xz to work around suspended repository.

We will revert this once vcpkg updates to point to an accessible repo.

* [wpilib] LinearSystemSim: Add missing clamp function and getInput() (wpilibsuite#6493)

* [wpimath] Support formatting Eigen array types (wpilibsuite#6496)

* [wpilibj] Fix EncoderSim.setDistancePerPulse parameter name and comment (NFC) (wpilibsuite#6481)

* MAINTAINERS.md: Remove reference to marketplace (wpilibsuite#6470)

* [ci] Revert "Use mirror repository for liblzma (wpilibsuite#6499)" (wpilibsuite#6506)

This reverts commit c46847b.

* [wpimath] Document ChassisSpeeds::Discretize() math (NFC) (wpilibsuite#6509)

* [build] Add exports to CMake subprojects (wpilibsuite#6505)

This allows consuming allwpilib via FetchContent.

* README.md: Link straight to contributing in contents (wpilibsuite#6525)

Avoids need to click twice to get to contributing.md.

* Update README-CMAKE.md (wpilibsuite#6522)

* [examples] Fix memory over-allocation in Apriltag examples (wpilibsuite#6517)

Change hamming distance to 1, add comment about memory usage.

* [wpimath] Rotation2d: add Measure<Angle> getter (Java) (wpilibsuite#6492)

* [commands] Fix double composition error truncation (wpilibsuite#6501)

* [commands] WrappedCommand: Call wrapped command initSendable (wpilibsuite#6471)

* [wpilibj] DataLogManager: Fix behavior when low on space (wpilibsuite#6486)

Uses getUsableSpace in Java, matching how C++ determines available space (C++ calls it available, but they mean the same thing.) This fixes a bug where logs wouldn't get deleted due to incorrect available space detection.

The DataLog thread now also checks if the state was marked as stopped after a call to StartLogFile.

* [wpilib] Add flash update capability to ADI IMUs (wpilibsuite#6450)

* [wpiunits] Add isNear function implementation (wpilibsuite#6396)

This implementation uses a tolerance in the same units as the measure it checks.

* [commands] WaitCommand: add Measure<Time> overload (wpilibsuite#6386)

Also add waitTime() factory.

* [apriltag] Cache layout loaded from AprilTagFields resource json (wpilibsuite#6385)

* [commands] Add Trigger.onChange() (wpilibsuite#6390)

* [wpiunits] Add Acceleration and MOI Units (wpilibsuite#6495)

---------

Co-authored-by: Tyler Veness <calcmogul@gmail.com>
Co-authored-by: fodfodfod <94200657+fodfodfod@users.noreply.github.com>
Co-authored-by: Joe Wildfong <57462350+JoeWildfong@users.noreply.github.com>
Co-authored-by: Thad House <ThadHouse@users.noreply.github.com>
Co-authored-by: shueja <32416547+shueja@users.noreply.github.com>
Co-authored-by: Peter Johnson <johnson.peter@gmail.com>
Co-authored-by: Eli Barnett <emichaelbarnett@gmail.com>
Co-authored-by: Joseph Eng <91924258+KangarooKoala@users.noreply.github.com>
Co-authored-by: DeltaDizzy <EJBraswell@gmail.com>
Co-authored-by: Dean Brettle <dean@brettle.com>
Co-authored-by: sciencewhiz <sciencewhiz@users.noreply.github.com>
Co-authored-by: Sam Richter <60528506+S1ink@users.noreply.github.com>
Co-authored-by: person4268 <28717044+person4268@users.noreply.github.com>
Co-authored-by: Gold856 <117957790+Gold856@users.noreply.github.com>
Co-authored-by: Wispy <101812473+WispySparks@users.noreply.github.com>
Co-authored-by: Isaac Turner <spacey_sooty@outlook.com>
Co-authored-by: Ryan Blue <ryanzblue@gmail.com>
Co-authored-by: Nicholas Armstrong <narmstro@warren.k12.in.us>
Co-authored-by: Carl Hauser <chauser@users.noreply.github.com>
Co-authored-by: HarryXChen <51322624+HarryXChen3@users.noreply.github.com>
Co-authored-by: Starlight220 <53231611+Starlight220@users.noreply.github.com>
Co-authored-by: Juan Jose Chong <juchong@users.noreply.github.com>
Co-authored-by: vichik <54233741+vichik123@users.noreply.github.com>
Co-authored-by: Jacob Hotz <77470805+Jacob1010-h@users.noreply.github.com>
chauser pushed a commit to chauser/allwpilib that referenced this pull request May 30, 2024
rzblue added a commit to rzblue/allwpilib that referenced this pull request Nov 6, 2024
…pilibsuite#6471)"

This reverts commit 7bc0380.

Calling initSendable on the wrapped command is fundamentally flawed as the wrapper is the command being sent.
PeterJohnson pushed a commit that referenced this pull request Nov 6, 2024
…6471)" (#7353)

This reverts commit 7bc0380.

Calling initSendable on the wrapped command is fundamentally flawed as the wrapper is the command being sent.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WrapperCommands' InitSendable doesn't call the wrapped InitSendable
3 participants