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

Merge with master - 2.6.1 #9

Merged
merged 67 commits into from
Feb 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
baa834f
Add driver for BMI088 IMU
shellixyz Oct 4, 2020
40ed910
First try
avsaase Dec 7, 2020
dc0b9be
Create CLI command.
avsaase Dec 7, 2020
36124be
Rename variables to make more clear that this only affects yaw stabil…
avsaase Dec 7, 2020
3c8dead
Don't freeze I-term when in AUTO TUNE (not sure if necessary, just to…
avsaase Dec 7, 2020
51b2a49
Implement suggestions. Stops I-term from growing instead of freezing it.
avsaase Dec 9, 2020
aac48f4
Again forgot AUTO TUNE
avsaase Dec 9, 2020
53f9c9f
Freezing I-term instead, using new functions.
avsaase Dec 9, 2020
4b9d388
Disable in all cases where TURN ASSIST is on
avsaase Dec 9, 2020
7c5b15e
Changed settings and fixed possible issue on multirotors.
avsaase Dec 9, 2020
8e45887
Move yaw axis check to outer if-statement
avsaase Dec 10, 2020
ca9600a
Fix default value issue
avsaase Dec 10, 2020
51c0b95
Make TURN ASSIST axis aware, use target bank angle, and disable in AC…
avsaase Dec 12, 2020
7ec6afd
Change target bank angle code
avsaase Dec 12, 2020
232d526
no message
avsaase Dec 12, 2020
214f939
Attempted fix (does not work)
avsaase Dec 12, 2020
cf2e359
Convert bank angle to radians
avsaase Dec 12, 2020
95ab3fe
Take target bank angle calculation out of pidTurnAssistant
avsaase Dec 13, 2020
2270a8c
Modes check outside of pidTurnAssistant
avsaase Dec 13, 2020
a1f42fc
Take pitch angle into account for turn rate calculation (technically …
avsaase Dec 14, 2020
37f2954
Constain bank angle for calculation to 60 degrees.
avsaase Dec 15, 2020
1ff79a9
Change CLI and variable names to align with functionality
avsaase Jan 3, 2021
5613059
Update docs
avsaase Jan 3, 2021
3305d53
pan servo home dir offset
avsaase Jan 13, 2021
4eaa18b
changed variable type
avsaase Jan 13, 2021
74dbdc9
For bench testing
avsaase Jan 13, 2021
0c42ae1
Some improvements.
avsaase Jan 13, 2021
40cbcc7
Update docs
avsaase Jan 13, 2021
3117a2e
change command name
avsaase Jan 13, 2021
be58a04
set min mag calibration time to 20 sec
avsaase Jan 31, 2021
8a8efbc
Basic support for Rush Blade F7
DzikuVx Feb 1, 2021
bae0e9b
Remove duplicate WP message in the OSD/Hud
OlivierC-FR Feb 2, 2021
349f054
Implement Prearm
harryjph Feb 3, 2021
d9158e3
Optimize isModeActivationConditionPresent
harryjph Feb 3, 2021
0f5d6f4
Handle edge case
harryjph Feb 3, 2021
c2e9dc9
Skip release for Rush Blade F722
DzikuVx Feb 10, 2021
730e1a7
Enable baro median filtering by default again (#6584)
shellixyz Feb 10, 2021
881e680
Merge pull request #6592 from iNavFlight/dzikuvx-rush-blade-f7
DzikuVx Feb 10, 2021
251e9f1
Merge pull request #6556 from OlivierC-FR/patch-1
DzikuVx Feb 11, 2021
282c3b1
Fix logic condition VSpeed constraint not allowing the value to be ne…
shellixyz Feb 14, 2021
9a6fd4a
velocity in cm/s
avsaase Feb 15, 2021
1356480
Merge pull request #6603 from avsaase/avs-fix-gps-weight-bug
digitalentity Feb 15, 2021
c431091
CRSF SNR Range update
OptimusTi Feb 15, 2021
15321e9
Merge pull request #6604 from OptimusTi/OptimusTi-Upate-SNR-Rage
DzikuVx Feb 16, 2021
8408368
Allow to configure speed source for DJI OSD
DzikuVx Feb 16, 2021
1994ce7
Update Settings.md
DzikuVx Feb 16, 2021
34666c5
Fix compile on no-OSD boards
DzikuVx Feb 16, 2021
e61e563
Simplify the Iterm freeze routine
DzikuVx Feb 19, 2021
4ffc929
Merge pull request #5 from DzikuVx/dzikuvx-simplify-iterm-freeze
avsaase Feb 19, 2021
8f5ac3e
Refactor PID value getter
DzikuVx Feb 21, 2021
67572fe
Add ability to read Programming PID status via MSP
DzikuVx Feb 21, 2021
ea756aa
Merge pull request #6625 from iNavFlight/dzikuvx-return-pid-value-via…
DzikuVx Feb 21, 2021
0a284d3
Merge pull request #6602 from shellixyz/fix/logic_condition_vspeed_co…
DzikuVx Feb 23, 2021
1a5133f
Fix mag gain computation for negative mag zero
DzikuVx Feb 24, 2021
ba3d0ab
Merge pull request #6636 from iNavFlight/dzikuvx-fix-mag-gain-calibra…
DzikuVx Feb 24, 2021
0b13c2c
Adds heading target logic condition
t413 Feb 24, 2021
25e1524
Update docs for Lua telemetry
DzikuVx Feb 25, 2021
1c50d13
Merge pull request #6646 from iNavFlight/dzikuvx-update-docs-for-lua-…
DzikuVx Feb 25, 2021
0cb6322
Adds LC heading documentation + RC override docs
t413 Feb 25, 2021
c15a462
Merge pull request #6501 from avsaase/avs-pan-servo-home-dir-offset
DzikuVx Feb 26, 2021
9728312
Merge pull request #6644 from t413/heading_target_lc
DzikuVx Feb 26, 2021
4951a27
Merge pull request #6407 from avsaase/avs-turn-assist-target-bank-angle
DzikuVx Feb 26, 2021
db2d68e
Merge pull request #6387 from avsaase/avs-disable-iterm-bank-angle
DzikuVx Feb 26, 2021
f77c8e5
Merge pull request #6610 from iNavFlight/dzikuvx-dji-configurable-spe…
DzikuVx Feb 26, 2021
77d03bf
Merge pull request #6562 from harry1453/prearm
DzikuVx Feb 26, 2021
1e13d2d
Merge pull request #6543 from avsaase/avs-allow-20-sec-mag-calibration
DzikuVx Feb 26, 2021
cb2fccb
Merge pull request #6180 from shellixyz/drivers/bmi088
DzikuVx Feb 26, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Tool for Blackbox logs analysis is available [here](https://github.com/iNavFligh

### Telemetry screen for OpenTX

Users of FrSky Taranis X9 and Q X7 can use INAV Lua Telemetry screen created by @teckel12 . Software and installation instruction are available here: [https://github.com/iNavFlight/LuaTelemetry](https://github.com/iNavFlight/LuaTelemetry)
Users of OpenTX radios (Taranis, Horus, Jumper, Radiomaster, Nirvana) can use INAV OpenTX Telemetry Widget screen. Software and installation instruction are available here: [https://github.com/iNavFlight/OpenTX-Telemetry-Widget](https://github.com/iNavFlight/OpenTX-Telemetry-Widget)

## Installation

Expand Down
2 changes: 2 additions & 0 deletions docs/Programming Framework.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ IPF can be edited using INAV Configurator user interface, of via CLI
| 35 | TAN | Computes TAN of `Operand A` value in degrees. Output is multiplied by `Operand B` value. If `Operand B` is `0`, result is multiplied by `500` |
| 36 | MAP_INPUT | Scales `Operand A` from [`0` : `Operand B`] to [`0` : `1000`]. Note: input will be constrained and then scaled |
| 37 | MAP_OUTPUT | Scales `Operand A` from [`0` : `1000`] to [`0` : `Operand B`]. Note: input will be constrained and then scaled |
| 38 | RC_CHANNEL_OVERRIDE | Overrides channel set by `Operand A` to value of `Operand B` |
| 39 | SET_HEADING_TARGET | Sets heading-hold target to `Operand A`, in degrees. Value wraps-around. |


### Operands
Expand Down
4 changes: 4 additions & 0 deletions docs/Settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
| disarm_kill_switch | ON | Disarms the motors independently of throttle value. Setting to OFF reverts to the old behaviour of disarming only when the throttle is low. Only applies when arming and disarming with an AUX channel. |
| display_force_sw_blink | OFF | OFF = OSD hardware blink / ON = OSD software blink. If OSD warning text/values are invisible, try setting this to ON |
| dji_esc_temp_source | ESC | Re-purpose the ESC temperature field for IMU/BARO temperature |
| dji_speed_source | GROUND | Sets the speed type displayed by the DJI OSD: GROUND, 3D, AIR |
| dji_use_name_for_messages | ON | Re-purpose the craft name field for messages. Replace craft name with :WTSED for Warnings|Throttle|Speed|Efficiency|Trip distance |
| dji_workarounds | | Enables workarounds for different versions of MSP protocol used |
| dterm_lpf2_hz | 0 | Cutoff frequency for stage 2 D-term low pass filter |
Expand Down Expand Up @@ -133,6 +134,7 @@
| fw_tpa_time_constant | 0 | TPA smoothing and delay time constant to reflect non-instant speed/throttle response of the plane. Planes with low thrust/weight ratio generally need higher time constant. Default is zero for compatibility with old setups |
| fw_turn_assist_pitch_gain | 1 | Gain required to keep constant pitch angle during coordinated turns (in TURN_ASSIST mode). Value significantly different from 1.0 indicates a problem with the airspeed calibration (if present) or value of `fw_reference_airspeed` parameter |
| fw_turn_assist_yaw_gain | 1 | Gain required to keep the yaw rate consistent with the turn rate for a coordinated turn (in TURN_ASSIST mode). Value significantly different from 1.0 indicates a problem with the airspeed calibration (if present) or value of `fw_reference_airspeed` parameter |
| fw_yaw_iterm_freeze_bank_angle | 0 | Yaw Iterm is frozen when bank angle is above this threshold [degrees]. This solves the problem of the rudder counteracting turns by partially disabling yaw stabilization when making banked turns. Setting to 0 (the default) disables this feature. Only applies when autopilot is not active and TURN ASSIST is disabled. |
| gps_auto_baud | ON | Automatic configuration of GPS baudrate(The specified baudrate in configured in ports will be used) when used with UBLOX GPS. When used with NAZA/DJI it will automatic detect GPS baudrate and change to it, ignoring the selected baudrate set in ports |
| gps_auto_config | ON | Enable automatic configuration of UBlox GPS receivers. |
| gps_dyn_model | AIR_1G | GPS navigation model: Pedestrian, Air_1g, Air_4g. Default is AIR_1G. Use pedestrian with caution, can cause flyaways with fast flying. |
Expand Down Expand Up @@ -390,6 +392,8 @@
| osd_link_quality_alarm | 70 | LQ % indicator blinks below this value. For Crossfire use 70%, for Tracer use 50% |
| osd_main_voltage_decimals | 1 | Number of decimals for the battery voltages displayed in the OSD [1-2]. |
| osd_neg_alt_alarm | 5 | Value below which (negative altitude) to make the OSD relative altitude indicator blink (meters) |
| osd_pan_servo_index | | Index of the pan servo to adjust osd home heading direction based on camera pan. Note that this feature does not work with continiously rotating servos. |
| osd_pan_servo_pwm2centideg | 0 | Centidegrees of pan servo rotation us PWM signal. A servo with 180 degrees of rotation from 1000 to 2000 us PWM typically needs `18` for this setting. Change sign to inverse direction. |
| osd_plus_code_digits | 10 | Numer of plus code digits before shortening with `osd_plus_code_short`. Precision at the equator: 10=13.9x13.9m; 11=2.8x3.5m; 12=56x87cm; 13=11x22cm. |
| osd_plus_code_short | 0 | Number of leading digits removed from plus code. Removing 2, 4 and 6 digits requires a reference location within, respectively, ~800km, ~40 km and ~2km to recover the original coordinates. |
| osd_right_sidebar_scroll | | |
Expand Down
2 changes: 1 addition & 1 deletion docs/Telemetry.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ The following sensors are transmitted
* **0450** : 'Flight Path Vector' or 'Course over ground' in degrees*10
### Compatible SmartPort/INAV telemetry flight status

To quickly and easily monitor these SmartPort sensors and flight modes, install [iNav LuaTelemetry](https://github.com/iNavFlight/LuaTelemetry) to your Taranis Q X7, X9D, X9D+ or X9E transmitter.
To quickly and easily monitor these SmartPort sensors and flight modes, install [OpenTX Telemetry Widget](https://github.com/iNavFlight/OpenTX-Telemetry-Widget) to your Taranis Q X7, X9D, X9D+ or X9E transmitter.

## FrSky telemetry

Expand Down
2 changes: 2 additions & 0 deletions src/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ main_sources(COMMON_SRC
drivers/accgyro/accgyro_adxl345.h
drivers/accgyro/accgyro_bma280.c
drivers/accgyro/accgyro_bma280.h
drivers/accgyro/accgyro_bmi088.c
drivers/accgyro/accgyro_bmi088.h
drivers/accgyro/accgyro_bmi160.c
drivers/accgyro/accgyro_bmi160.h
drivers/accgyro/accgyro_fake.c
Expand Down
245 changes: 245 additions & 0 deletions src/main/drivers/accgyro/accgyro_bmi088.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,245 @@
/*
* This file is part of INAV.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Alternatively, the contents of this file may be used under the terms
* of the GNU General Public License Version 3, as described below:
*
* This file is free software: you may copy, redistribute and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This file is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see http://www.gnu.org/licenses/.
*/

#include <stdbool.h>
#include <stdint.h>

#include "platform.h"
#include "build/debug.h"

#include "common/axis.h"
#include "common/maths.h"
#include "common/utils.h"

#include "drivers/system.h"
#include "drivers/time.h"
#include "drivers/io.h"
#include "drivers/exti.h"
#include "drivers/bus.h"

#include "drivers/sensor.h"
#include "drivers/accgyro/accgyro.h"
#include "drivers/accgyro/accgyro_bmi088.h"


#if defined(USE_IMU_BMI088)

/*
device registers, names follow datasheet conventions, with REGA_
prefix for accel, and REGG_ prefix for gyro
*/
#define REGA_CHIPID 0x00
#define REGA_ERR_REG 0x02
#define REGA_STATUS 0x03
#define REGA_X_LSB 0x12
#define REGA_INT_STATUS_1 0x1D
#define REGA_TEMP_LSB 0x22
#define REGA_TEMP_MSB 0x23
#define REGA_CONF 0x40
#define REGA_RANGE 0x41
#define REGA_PWR_CONF 0x7C
#define REGA_PWR_CTRL 0x7D
#define REGA_SOFTRESET 0x7E
#define REGA_FIFO_CONFIG0 0x48
#define REGA_FIFO_CONFIG1 0x49
#define REGA_FIFO_DOWNS 0x45
#define REGA_FIFO_DATA 0x26
#define REGA_FIFO_LEN0 0x24
#define REGA_FIFO_LEN1 0x25

#define REGG_CHIPID 0x00
#define REGG_RATE_X_LSB 0x02
#define REGG_INT_CTRL 0x15
#define REGG_INT_STATUS_1 0x0A
#define REGG_INT_STATUS_2 0x0B
#define REGG_INT_STATUS_3 0x0C
#define REGG_FIFO_STATUS 0x0E
#define REGG_RANGE 0x0F
#define REGG_BW 0x10
#define REGG_LPM1 0x11
#define REGG_RATE_HBW 0x13
#define REGG_BGW_SOFTRESET 0x14
#define REGG_FIFO_CONFIG_1 0x3E
#define REGG_FIFO_DATA 0x3F


static void bmi088GyroInit(gyroDev_t *gyro)
{
gyroIntExtiInit(gyro);

busSetSpeed(gyro->busDev, BUS_SPEED_INITIALIZATION);

// Soft reset
busWrite(gyro->busDev, REGG_BGW_SOFTRESET, 0xB6);
delay(100);

// ODR 2kHz, BW 532Hz
busWrite(gyro->busDev, REGG_BW, 0x81);
delay(1);

// Enable sampling
busWrite(gyro->busDev, REGG_INT_CTRL, 0x80);
delay(1);

busSetSpeed(gyro->busDev, BUS_SPEED_FAST);
}

static void bmi088AccInit(accDev_t *acc)
{
busSetSpeed(acc->busDev, BUS_SPEED_INITIALIZATION);

// Soft reset
busWrite(acc->busDev, REGA_SOFTRESET, 0xB6);
delay(100);

// Active mode
busWrite(acc->busDev, REGA_PWR_CONF, 0);
delay(100);

// ACC ON
busWrite(acc->busDev, REGA_PWR_CTRL, 0x04);
delay(100);

// OSR4, ODR 1600Hz
busWrite(acc->busDev, REGA_CONF, 0x8C);
delay(1);

// Range 12g
busWrite(acc->busDev, REGA_RANGE, 0x02);
delay(1);

busSetSpeed(acc->busDev, BUS_SPEED_STANDARD);

acc->acc_1G = 2048;
}

static bool bmi088GyroRead(gyroDev_t *gyro)
{
uint8_t gyroRaw[6];

if (busReadBuf(gyro->busDev, REGG_RATE_X_LSB, gyroRaw, 6)) {
gyro->gyroADCRaw[X] = (int16_t)((gyroRaw[1] << 8) | gyroRaw[0]);
gyro->gyroADCRaw[Y] = (int16_t)((gyroRaw[3] << 8) | gyroRaw[2]);
gyro->gyroADCRaw[Z] = (int16_t)((gyroRaw[5] << 8) | gyroRaw[4]);
return true;
}

return false;
}

static bool bmi088AccRead(accDev_t *acc)
{
uint8_t buffer[7];

if (busReadBuf(acc->busDev, REGA_STATUS, buffer, 2) && (buffer[1] & 0x80) && busReadBuf(acc->busDev, REGA_X_LSB, buffer, 7)) {
// first byte is discarded, see datasheet
acc->ADCRaw[X] = (int32_t)(((int16_t)(buffer[2] << 8) | buffer[1]) * 3 / 4);
acc->ADCRaw[Y] = (int32_t)(((int16_t)(buffer[4] << 8) | buffer[3]) * 3 / 4);
acc->ADCRaw[Z] = (int32_t)(((int16_t)(buffer[6] << 8) | buffer[5]) * 3 / 4);
return true;
}

return false;
}

static bool gyroDeviceDetect(busDevice_t * busDev)
{
uint8_t attempts;

busSetSpeed(busDev, BUS_SPEED_INITIALIZATION);

for (attempts = 0; attempts < 5; attempts++) {
uint8_t chipId;

delay(100);
busRead(busDev, REGG_CHIPID, &chipId);

if (chipId == 0x0F) {
return true;
}
}

return false;
}

static bool accDeviceDetect(busDevice_t * busDev)
{
uint8_t attempts;

busSetSpeed(busDev, BUS_SPEED_INITIALIZATION);

for (attempts = 0; attempts < 5; attempts++) {
uint8_t chipId;

delay(100);
busRead(busDev, REGA_CHIPID, &chipId);

if (chipId == 0x1E) {
return true;
}
}

return false;
}

bool bmi088AccDetect(accDev_t *acc)
{
acc->busDev = busDeviceInit(BUSTYPE_ANY, DEVHW_BMI088_ACC, acc->imuSensorToUse, OWNER_MPU);
if (acc->busDev == NULL) {
return false;
}

if (!accDeviceDetect(acc->busDev)) {
busDeviceDeInit(acc->busDev);
return false;
}

acc->initFn = bmi088AccInit;
acc->readFn = bmi088AccRead;

return true;
}

bool bmi088GyroDetect(gyroDev_t *gyro)
{
gyro->busDev = busDeviceInit(BUSTYPE_ANY, DEVHW_BMI088_GYRO, gyro->imuSensorToUse, OWNER_MPU);
if (gyro->busDev == NULL) {
return false;
}

if (!gyroDeviceDetect(gyro->busDev)) {
busDeviceDeInit(gyro->busDev);
return false;
}

gyro->initFn = bmi088GyroInit;
gyro->readFn = bmi088GyroRead;
gyro->scale = 1.0f / 16.4f; // 16.4 dps/lsb
gyro->intStatusFn = gyroCheckDataReady;
gyro->gyroAlign = gyro->busDev->param;

return true;
}

#endif /* USE_IMU_BMI088 */
30 changes: 30 additions & 0 deletions src/main/drivers/accgyro/accgyro_bmi088.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* This file is part of INAV.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Alternatively, the contents of this file may be used under the terms
* of the GNU General Public License Version 3, as described below:
*
* This file is free software: you may copy, redistribute and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This file is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see http://www.gnu.org/licenses/.
*/

#pragma once

#include "drivers/sensor.h"

bool bmi088AccDetect(accDev_t *acc);
bool bmi088GyroDetect(gyroDev_t *gyro);
2 changes: 2 additions & 0 deletions src/main/drivers/bus.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ typedef enum {
DEVHW_MPU6050,
DEVHW_MPU6500,
DEVHW_BMI160,
DEVHW_BMI088_GYRO,
DEVHW_BMI088_ACC,
DEVHW_ICM20689,

/* Combined ACC/GYRO/MAG chips */
Expand Down
11 changes: 11 additions & 0 deletions src/main/fc/fc_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,16 @@ static void updateArmingStatus(void)
DISABLE_ARMING_FLAG(ARMING_DISABLED_SERVO_AUTOTRIM);
}

if (isModeActivationConditionPresent(BOXPREARM)) {
if (IS_RC_MODE_ACTIVE(BOXPREARM)) {
DISABLE_ARMING_FLAG(ARMING_DISABLED_NO_PREARM);
} else {
ENABLE_ARMING_FLAG(ARMING_DISABLED_NO_PREARM);
}
} else {
DISABLE_ARMING_FLAG(ARMING_DISABLED_NO_PREARM);
}

/* CHECK: Arming switch */
// If arming is disabled and the ARM switch is on
// Note that this should be last check so all other blockers could be cleared correctly
Expand Down Expand Up @@ -506,6 +516,7 @@ void tryArm(void)
#else
beeper(BEEPER_ARMING);
#endif

statsOnArm();

return;
Expand Down
5 changes: 5 additions & 0 deletions src/main/fc/fc_msp.c
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,11 @@ static bool mspFcProcessOutCommand(uint16_t cmdMSP, sbuf_t *dst, mspPostProcessF
sbufWriteU16(dst, programmingPids(i)->gains.FF);
}
break;
case MSP2_INAV_PROGRAMMING_PID_STATUS:
for (int i = 0; i < MAX_PROGRAMMING_PID_COUNT; i++) {
sbufWriteU32(dst, programmingPidGetOutput(i));
}
break;
#endif
case MSP2_COMMON_MOTOR_MIXER:
for (uint8_t i = 0; i < MAX_SUPPORTED_MOTORS; i++) {
Expand Down
2 changes: 2 additions & 0 deletions src/main/fc/fc_msp_box.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ static const box_t boxes[CHECKBOX_ITEM_COUNT + 1] = {
{ BOXUSER2, "USER2", BOX_PERMANENT_ID_USER2 },
{ BOXLOITERDIRCHN, "LOITER CHANGE", 49 },
{ BOXMSPRCOVERRIDE, "MSP RC OVERRIDE", 50 },
{ BOXPREARM, "PREARM", 51 },
{ CHECKBOX_ITEM_COUNT, NULL, 0xFF }
};

Expand Down Expand Up @@ -163,6 +164,7 @@ void initActiveBoxIds(void)

activeBoxIdCount = 0;
activeBoxIds[activeBoxIdCount++] = BOXARM;
activeBoxIds[activeBoxIdCount++] = BOXPREARM;

if (sensors(SENSOR_ACC) && STATE(ALTITUDE_CONTROL)) {
activeBoxIds[activeBoxIdCount++] = BOXANGLE;
Expand Down
Loading