Skip to content

Commit 6251cea

Browse files
committed
master alignment + update docs
1 parent e8bdb2c commit 6251cea

6 files changed

Lines changed: 21 additions & 8 deletions

File tree

docs/Programming Framework.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ for complete documentation on using JavaScript to program your flight controller
169169
| 29 | CRSF LQ | Link quality as returned by the CRSF protocol |
170170
| 30 | CRSF SNR | SNR as returned by the CRSF protocol |
171171
| 31 | GPS Valid Fix | Boolean `0`/`1`. True when the GPS has a valid 3D Fix |
172-
| 32 | Loiter Radius [cm] | The current loiter radius setting in `cm`. |
172+
| 32 | Loiter Radius [cm] | The current loiter radius in cm. |
173173
| 33 | Active Control Profile | Integer for the active config profile `[1..MAX_PROFILE_COUNT]` |
174174
| 34 | Battery cells | Number of battery cells detected |
175175
| 35 | AGL status [0/1] | Boolean `1` when AGL can be trusted, `0` when AGL estimate can not be trusted |

docs/Settings.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6392,6 +6392,16 @@ Which aux channel to use to change serial output & baud rate (MSP / Telemetry).
63926392

63936393
---
63946394

6395+
### test_setting
6396+
6397+
For developer use. General use test setting from -1000 to 1000
6398+
6399+
| Default | Min | Max |
6400+
| --- | --- | --- |
6401+
| 0 | -1000 | 1000 |
6402+
6403+
---
6404+
63956405
### thr_comp_weight
63966406

63976407
Weight used for the throttle compensation based on battery voltage. See the [battery documentation](Battery.md#automatic-throttle-compensation-based-on-battery-voltage)

src/main/blackbox/blackbox.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1333,6 +1333,7 @@ static void writeSlowFrame(void)
13331333
blackboxWriteUnsignedVB(slowHistory.rxUpdateRate);
13341334

13351335
blackboxWriteUnsignedVB(slowHistory.hwHealthStatus);
1336+
13361337
blackboxWriteUnsignedVB(slowHistory.powerSupplyImpedance);
13371338
blackboxWriteUnsignedVB(slowHistory.sagCompensatedVBat);
13381339

@@ -1728,7 +1729,6 @@ static void loadMainState(timeUs_t currentTimeUs)
17281729

17291730
const uint8_t minServoIndex = getMinServoIndex();
17301731
const int servoCount = getServoCount();
1731-
17321732
for (int i = 0; i < servoCount; i++) {
17331733
blackboxCurrent->servo[i] = servo[i + minServoIndex];
17341734
}

src/main/flight/rth_estimator.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ static float estimateRTHEnergyAfterInitialClimb(float distanceToHome, float spee
145145

146146
// returns Wh
147147
static float calculateRemainingEnergyBeforeRTH(bool takeWindIntoAccount) {
148+
148149
const float RTH_initial_altitude_change = MAX(0, (getFinalRTHAltitude() - getEstimatedActualPosition(Z)) / 100);
149150

150151
float RTH_heading; // degrees
@@ -218,6 +219,7 @@ float calculateRemainingDistanceBeforeRTH(bool takeWindIntoAccount) {
218219
return -1;
219220
}
220221
#endif
222+
221223
// check requirements
222224
const bool areBatterySettingsOK = feature(FEATURE_VBAT) && feature(FEATURE_CURRENT_METER) && batteryWasFullWhenPluggedIn();
223225
const bool areRTHEstimatorSettingsOK = batteryMetersConfig()->cruise_power > 0 && batteryMetersConfig()->capacity_unit == BAT_CAPACITY_UNIT_MWH && currentBatteryProfile->capacity.value > 0 && navConfig()->fw.cruise_speed > 0;

src/main/io/osd_canvas.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,28 +100,28 @@ void osdCanvasDrawThrottleGauge(displayPort_t *display, displayCanvas_t *canvas,
100100
displayCanvasDrawCharacter(canvas, x, y, SYM_THR_GAUGE_HALF, DISPLAY_CANVAS_BITMAP_OPT_ERASE_TRANSPARENT);
101101
else
102102
displayCanvasDrawCharacter(canvas, x, y, SYM_THR_GAUGE_EMPTY, DISPLAY_CANVAS_BITMAP_OPT_ERASE_TRANSPARENT);
103-
103+
104104
if (thrPos >= 80)
105105
displayCanvasDrawCharacter(canvas, x, y + canvas->gridElementHeight, SYM_THR_GAUGE_FULL, DISPLAY_CANVAS_BITMAP_OPT_ERASE_TRANSPARENT);
106106
else if (thrPos >= 70)
107107
displayCanvasDrawCharacter(canvas, x, y + canvas->gridElementHeight, SYM_THR_GAUGE_HALF, DISPLAY_CANVAS_BITMAP_OPT_ERASE_TRANSPARENT);
108108
else
109109
displayCanvasDrawCharacter(canvas, x, y + canvas->gridElementHeight, SYM_THR_GAUGE_EMPTY, DISPLAY_CANVAS_BITMAP_OPT_ERASE_TRANSPARENT);
110-
110+
111111
if (thrPos >= 60)
112112
displayCanvasDrawCharacter(canvas, x, y + (canvas->gridElementHeight * 2), SYM_THR_GAUGE_FULL, DISPLAY_CANVAS_BITMAP_OPT_ERASE_TRANSPARENT);
113113
else if (thrPos >= 50)
114114
displayCanvasDrawCharacter(canvas, x, y + (canvas->gridElementHeight * 2), SYM_THR_GAUGE_HALF, DISPLAY_CANVAS_BITMAP_OPT_ERASE_TRANSPARENT);
115115
else
116116
displayCanvasDrawCharacter(canvas, x, y + (canvas->gridElementHeight * 2), SYM_THR_GAUGE_EMPTY, DISPLAY_CANVAS_BITMAP_OPT_ERASE_TRANSPARENT);
117-
117+
118118
if (thrPos >= 40)
119119
displayCanvasDrawCharacter(canvas, x, y + (canvas->gridElementHeight * 3), SYM_THR_GAUGE_FULL, DISPLAY_CANVAS_BITMAP_OPT_ERASE_TRANSPARENT);
120120
else if (thrPos >= 30)
121121
displayCanvasDrawCharacter(canvas, x, y + (canvas->gridElementHeight * 3), SYM_THR_GAUGE_HALF, DISPLAY_CANVAS_BITMAP_OPT_ERASE_TRANSPARENT);
122122
else
123123
displayCanvasDrawCharacter(canvas, x, y + (canvas->gridElementHeight * 3), SYM_THR_GAUGE_EMPTY, DISPLAY_CANVAS_BITMAP_OPT_ERASE_TRANSPARENT);
124-
124+
125125
if (thrPos >= 20)
126126
displayCanvasDrawCharacter(canvas, x, y + (canvas->gridElementHeight * 4), SYM_THR_GAUGE_FULL, DISPLAY_CANVAS_BITMAP_OPT_ERASE_TRANSPARENT);
127127
else if (thrPos >= 10)
@@ -743,6 +743,7 @@ static bool osdCanvasDrawSidebar(uint32_t *configured, displayWidgets_t *widgets
743743
osdCrosshairPosition(&ex, &ey);
744744
const int height = 2 * OSD_AH_SIDEBAR_HEIGHT_POS * OSD_CHAR_HEIGHT;
745745
const int y = (ey - OSD_AH_SIDEBAR_HEIGHT_POS) * OSD_CHAR_HEIGHT;
746+
746747
widgetSidebarConfiguration_t config = {
747748
.rect.y = y,
748749
.rect.w = width,

src/main/navigation/navigation_private.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ typedef enum {
352352

353353
NAV_MIXERAT = (1 << 16), // MIXERAT in progress
354354

355-
NAV_CTL_HOLD = (1 << 17), // position hold active
355+
NAV_CTL_HOLD = (1 << 17), // Nav loiter active at position
356356
NAV_CTL_COURSE = (1 << 18), // course hold active // CR117
357357
} navigationFSMStateFlags_t;
358358

@@ -461,7 +461,7 @@ typedef struct {
461461
uint32_t lastValidPositionTimeMs;
462462
uint32_t lastValidAltitudeTimeMs;
463463

464-
/* INAV GPS origin (position where GPS fix first acquired) */
464+
/* INAV GPS origin (position where GPS fix was first acquired) */
465465
gpsOrigin_t gpsOrigin;
466466

467467
/* Home/RTH parameters - NEU coordinates (geodetic position of home (LLH) is stored in GPS_home variable) */

0 commit comments

Comments
 (0)