Repository navigation
fix(fatcow): the cow asks the shared helper whether it is on the ground (FIX-FAT-COW-GROUND-TEST, #295) - #320
Merged
Merged
Conversation
PRD and one ticket: the Fat Cow asks ctld.utils.inAir instead of DCS's raw inAir() at its three places. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
DCS's raw inAir() can answer "in the air" for a landed CH-47, the cow of the
whole feature; ctld.utils.inAir exists for that case and the rest of CTLD uses
it. The Fat Cow called the raw form at three places: the FARP deployment
(a landed cow was refused as airborne: an AI cow's FARP never opened, a
piloted cow's pilot read "could not be deployed"), the Land here guard ("already
on the ground" never fired) and Release the Fat Cow (a landed cow was given an
orbit task and lifted off from its open FARP). All three now go through the
helper; a cow really in the air is treated as before. The mine field scene's
raw calls are untouched. The specs now tell the two forms apart with a unit
that disagrees with itself, the CH-47 at rest. Issue #295.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Issue #295. DCS's own
inAir()can answer "in the air" for a high-chassis helicopter such as the CH-47, the cow of the whole feature, while it is landed and at rest. CTLD hasctld.utils.inAirfor exactly that case (it counts a unit belowgroundAglThresholdand nearly still as on the ground) and the rest of the code uses it. The Fat Cow called the raw form at three places:What changes
The three go through
ctld.utils.inAir. A cow really in the air is treated as before: refused by the deployment as "airborne", sent to land by Land here, orbiting where it stands when released. Messages, labels and order are unchanged; no text, dictionary or configuration change.Out of scope, on purpose: the two raw calls of the mine field scene (another component, not analysed here; a lot of its own if it matters).
Tests
busted tests/ci/: 2015 successes, luacheck clean, build run (no dictionary drift).inAir()says "in the air", the helper says "on the ground". 4 cases red first for the right reason (an AI cow's FARP not deployed, no "already on the ground", an orbit task given to a landed cow, a piloted FARP not opened), plus controls with a cow really in the air that pass before and after. One existing test whose mock lacked a velocity was updated now that the deployment reads it, and a core-spec case exercises the real helper with a landed CH-47.🤖 Generated with Claude Code