Skip to content

Conversation

@DzikuVx
Copy link
Member

@DzikuVx DzikuVx commented May 15, 2016

PID Tuning shows rates in dps in compatible versions of iNav
See #204


var FC = {
isRatesInDps: function () {
if (typeof CONFIG != "undefined" && CONFIG.flightControllerIdentifier == "INAV" && semver.gt(CONFIG.flightControllerVersion, "1.1.0")) {
Copy link
Member

Choose a reason for hiding this comment

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

No need to check for INAV really, Configurator won't connect to anything but INAV so we can safely remove most of compatibility stuff from Cleanflight.

@digitalentity digitalentity merged commit 1266322 into master May 15, 2016
@DzikuVx DzikuVx deleted the rates-in-dps branch May 16, 2016 10:19
azolyoung pushed a commit to azolyoung/inav-configurator that referenced this pull request Oct 19, 2017
DzikuVx pushed a commit that referenced this pull request Nov 10, 2020
Merge from inav-configurator master
davidbuzz added a commit to davidbuzz/ardu-configurator that referenced this pull request Sep 3, 2021
separate vcc, battery voltages & fix displayed batt voltage
sensei-hacker added a commit that referenced this pull request Dec 4, 2025
Bug #1: Update GPS example to use 'gpsSats' property
- The API property was renamed from 'gpsNumSat' to 'gpsSats'
- GPS Fix Check example was not updated, causing transpilation errors
- Fixed examples/index.js lines 120, 124

Bug #2: Fix waypoint example to use 'distance' property
- Example incorrectly used 'waypoint.distanceToHome'
- Correct property is 'waypoint.distance' (distance to current waypoint)
- Fixed examples/index.js lines 185, 189

Bug #3: Add null checks in property_access_checker.js
- Missing null check caused crash: "Cannot read properties of undefined (reading 'targets')"
- Affected "Altitude-based Stages" and other override examples
- Added defensive checks for apiObj, apiObj.targets, apiObj.nested
- Fixed property_access_checker.js lines 170-181

Fixes:
- "GPS Fix Check" example now transpiles successfully
- "Waypoint Arrival Detection" example now transpiles successfully
- "Altitude-based Stages" example now transpiles successfully
- All 15 examples validated

Users can now successfully use all built-in examples without errors.
sensei-hacker added a commit that referenced this pull request Dec 12, 2025
The test_flight_axis_override.js file had multiple bugs preventing tests
from running correctly:

**Fix #1: Missing Decompiler import**
- Added `import { Decompiler } from '../decompiler.js';`
- Changed `transpiler.decompile()` to proper `new Decompiler()` usage
- Error was: "transpiler.decompile is not a function"

**Fix #2: Invalid property name in Test 4**
- Fixed `flight.armed` → `flight.isArmed`
- Error was: "Unknown property 'armed' in 'flight.armed'"
- The correct property is `isArmed` per the flight API

**Fix #3: Error message handling**
- Fixed `result.errors` → `result.error || result.errors`
- Fixed `decompiled.errors` → `decompiled.error || decompiled.errors`
- Handles both singular and plural error field names

**Test Results:**
Before: 3 decompile errors, 1 compilation failure
After: All 4 tests pass ✅

- Test 1: Roll angle override ✅
- Test 2: Pitch rate override ✅
- Test 3: Yaw angle override ✅
- Test 4: Multiple axis overrides ✅
sensei-hacker added a commit that referenced this pull request Dec 19, 2025
When handleNot() encounters NOT(OR(...)) or NOT(AND(...)), it was
directly inlining the inner LC's operands. This bypassed the hoisting
system, causing activator relationships to be lost.

Example bug:
- LC 23: OR(rth, poshold), Active when profile==2
- LC 24: NOT(LC23)
- Before: `if (!(rth || poshold))` - activator ignored!
- After: `if (!cond3)` where cond3 respects profile check

Fix: Only apply structural optimizations (NOT(OR)->!(||), etc.) when
the inner LC has no activator (activatorId === -1). If it has an
activator, fall through to decompileOperand which returns the hoisted
variable name.

Verified against INAV firmware: logic_condition.c:568 confirms that
when an LC's activator is false, its value is set to 0.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
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.

3 participants