mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-12 10:59:59 +03:00
Merge branch 'master' into maintenance-8.x.x
This commit is contained in:
commit
188550f3f1
17 changed files with 20559 additions and 15 deletions
2
.github/ISSUE_TEMPLATE/Bug_report.md
vendored
2
.github/ISSUE_TEMPLATE/Bug_report.md
vendored
|
@ -39,7 +39,7 @@ assignees: ''
|
|||
|
||||
## Additional context
|
||||
<!-- Add any other context about the problem here. -->
|
||||
<!-- Go to CLI, execute `dump` command copy its output to [PasteBin](https://pastebin.com) and provide a link to a paste here -->
|
||||
<!-- Go to CLI, execute `diff` command copy its output to [PasteBin](https://pastebin.com) and provide a link to a paste here -->
|
||||
|
||||
---
|
||||
<!-- PLEASE FILL THIS OUT -->
|
||||
|
|
|
@ -51,7 +51,9 @@ else()
|
|||
endif()
|
||||
endif()
|
||||
|
||||
project(INAV VERSION 8.1.0)
|
||||
|
||||
project(INAV VERSION 9.0.0)
|
||||
|
||||
|
||||
enable_language(ASM)
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ This enables up to 4 different approach directions, based on the landing site an
|
|||
3. The landing direction and the approach waypoints are calculated on the basis of the measured wind parameters. If no headwind landing is possible or the wind strength is greater than "Max. tailwind" (see Global Parameters), return to point 2.
|
||||
4. The landing is initiated. The aircraft flies the downwind course, "Approach Altitude" is held.
|
||||
5. Base Leg: the altitude is reduced from 2/3 of "Approach Altitude".
|
||||
6. Final Appraoch: The engine power is reduced using "Pitch2throttle modifier" to reduce speed and the altitude is gradually reduced towards "Land Altitude" while approaching the Safehome coordinates.
|
||||
6. Final Approach: The engine power is reduced using "Pitch2throttle modifier" to reduce speed and the altitude is gradually reduced towards "Land Altitude" while approaching the Safehome coordinates.
|
||||
7. Glide: When "Glide Altitude" is reached, the motor is switched off and the pitch angle of "Glide Pitch" is held.
|
||||
7. Flare: Only if a LIDAR/Rangefinder sensor is present: the motor remains switched off and the pitch angle of "Flare Pitch" is held
|
||||
8. Landing: As soon as INAV has detected the landing, it is automatically disarmed, see setting `nav_disarm_on_landing`.
|
||||
|
|
|
@ -200,7 +200,7 @@ Note:
|
|||
* It is necessary to update `MSP_SET_RAW_RC` at 5Hz or faster.
|
||||
* `MSP_SET_RAW_RC` uses the defined RC channel map
|
||||
* `MSP_RC` returns `AERT` regardless of channel map
|
||||
* You can combine "real" RC radio and MSP RX by compiling custom firmware with `USE_MSP_RC_OVERRIDE` defined. Then use `msp_override_channels` to set the channels to be overridden.
|
||||
* You can combine "real" RC radio and MSP RX by using `msp_override_channels` to set the channels to be overridden.
|
||||
* The [wiki Remote Control and Management article](https://github.com/iNavFlight/inav/wiki/INAV-Remote-Management,-Control-and-Telemetry) provides more information, including links to 3rd party projects that exercise `MSP_SET_RAW_RC` and `USE_MSP_RC_OVERRIDE`
|
||||
|
||||
## SIM (SITL) Joystick
|
||||
|
|
|
@ -3054,11 +3054,11 @@ If enabled, motor will stop when throttle is low on this mixer_profile
|
|||
|
||||
### msp_override_channels
|
||||
|
||||
Mask of RX channels that may be overridden by MSP `SET_RAW_RC`. Note that this requires custom firmware with `USE_RX_MSP` and `USE_MSP_RC_OVERRIDE` compile options and the `MSP RC Override` flight mode.
|
||||
Mask of RX channels that may be overridden by MSP `SET_RAW_RC`. Note that this requires the `MSP RC Override` flight mode.
|
||||
|
||||
| Default | Min | Max |
|
||||
| --- | --- | --- |
|
||||
| 0 | 0 | 65535 |
|
||||
| 0 | 0 | 4294967295 |
|
||||
|
||||
---
|
||||
|
||||
|
|
|
@ -147,4 +147,6 @@ log) by defining USE_BOOTLOG:
|
|||
Then `make clean` and `make`.
|
||||
|
||||
Then in the CLI you can run `bootlog` to see the buffered log.
|
||||
Note dmesg also requires that a serial port be defined for serial debugging.
|
||||
|
||||
Note bootlog also requires that a serial port be defined for serial debugging.
|
||||
|
||||
|
|
|
@ -68,3 +68,8 @@ If one of the core developers has the hardware in possession they may opt in and
|
|||
1. Requester is advised to open a feature request to add support for certain hardware to INAV by following [this link](https://github.com/iNavFlight/inav/issues/new/choose)
|
||||
|
||||
2. After opening a feature request, Requester is advised to contact the core development team by [email](mailto:coredev@inavflight.com) mentioning the open feature request and communicate with developer team via email to arrange hardware and specifications delivery.
|
||||
|
||||
|
||||
## See also
|
||||
[Hardware Design Guidelines](https://github.com/iNavFlight/inav/wiki/Hardware-Design-Guidelines)
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
> INAV no longer accepts targets based on STM32 F411 MCU.
|
||||
|
||||
> INAV 7 was the last INAV official release available for F411 based flight controllers. INAV 8 is not officially available for F411 boards.
|
||||
> INAV 7 was the last INAV official release available for F411 based flight controllers. INAV 8 is not officially available for F411 boards and the team has not tested either. Issues that can't be reproduced on other MCUs may not be fixed and the targets for F411 targets may eventually be completelly removed from future releases.
|
||||
|
||||
# ICM426xx IMUs PSA
|
||||
|
||||
|
|
|
@ -217,6 +217,8 @@ static const OSD_Entry menuOsdElemsEntries[] =
|
|||
OSD_ELEMENT_ENTRY("AZIMUTH", OSD_AZIMUTH),
|
||||
OSD_ELEMENT_ENTRY("GRD COURSE", OSD_GROUND_COURSE),
|
||||
OSD_ELEMENT_ENTRY("X TRACK ERR", OSD_CROSS_TRACK_ERROR),
|
||||
OSD_ELEMENT_ENTRY("ADSB WARNING", OSD_ADSB_WARNING),
|
||||
OSD_ELEMENT_ENTRY("ADSB INFO", OSD_ADSB_INFO),
|
||||
#endif // GPS
|
||||
OSD_ELEMENT_ENTRY("HEADING", OSD_HEADING),
|
||||
OSD_ELEMENT_ENTRY("HEADING GR.", OSD_HEADING_GRAPH),
|
||||
|
|
|
@ -782,12 +782,12 @@ groups:
|
|||
field: halfDuplex
|
||||
table: tristate
|
||||
- name: msp_override_channels
|
||||
description: "Mask of RX channels that may be overridden by MSP `SET_RAW_RC`. Note that this requires custom firmware with `USE_RX_MSP` and `USE_MSP_RC_OVERRIDE` compile options and the `MSP RC Override` flight mode."
|
||||
description: "Mask of RX channels that may be overridden by MSP `SET_RAW_RC`. Note that this requires the `MSP RC Override` flight mode."
|
||||
default_value: 0
|
||||
field: mspOverrideChannels
|
||||
condition: USE_MSP_RC_OVERRIDE
|
||||
min: 0
|
||||
max: 65535
|
||||
max: UINT32_MAX
|
||||
|
||||
- name: PG_BLACKBOX_CONFIG
|
||||
type: blackboxConfig_t
|
||||
|
|
|
@ -45,6 +45,7 @@ enum {
|
|||
CRSF_FRAME_GPS_PAYLOAD_SIZE = 15,
|
||||
CRSF_FRAME_VARIO_SENSOR_PAYLOAD_SIZE = 2,
|
||||
CRSF_FRAME_BATTERY_SENSOR_PAYLOAD_SIZE = 8,
|
||||
CRSF_FRAME_BAROMETER_ALTITUDE_PAYLOAD_SIZE = 2,
|
||||
CRSF_FRAME_LINK_STATISTICS_PAYLOAD_SIZE = 10,
|
||||
CRSF_FRAME_RC_CHANNELS_PAYLOAD_SIZE = 22, // 11 bits per channel * 16 channels = 22 bytes.
|
||||
CRSF_FRAME_ATTITUDE_PAYLOAD_SIZE = 6,
|
||||
|
@ -86,6 +87,7 @@ typedef enum {
|
|||
CRSF_FRAMETYPE_GPS = 0x02,
|
||||
CRSF_FRAMETYPE_VARIO_SENSOR = 0x07,
|
||||
CRSF_FRAMETYPE_BATTERY_SENSOR = 0x08,
|
||||
CRSF_FRAMETYPE_BAROMETER_ALTITUDE = 0x09,
|
||||
CRSF_FRAMETYPE_LINK_STATISTICS = 0x14,
|
||||
CRSF_FRAMETYPE_RC_CHANNELS_PACKED = 0x16,
|
||||
CRSF_FRAMETYPE_ATTITUDE = 0x1E,
|
||||
|
|
|
@ -59,7 +59,7 @@ static timeMs_t validRxDataFailedAt = 0;
|
|||
static timeUs_t rxNextUpdateAtUs = 0;
|
||||
static timeUs_t needRxSignalBefore = 0;
|
||||
|
||||
static uint16_t mspOverrideCtrlChannels = 0; // bitmask representing which channels are used to control MSP override
|
||||
static uint32_t mspOverrideCtrlChannels = 0; // bitmask representing which channels are used to control MSP override
|
||||
static rcChannel_t mspRcChannels[MAX_SUPPORTED_RC_CHANNEL_COUNT];
|
||||
|
||||
static rxRuntimeConfig_t rxRuntimeConfigMSP;
|
||||
|
@ -215,7 +215,7 @@ bool mspOverrideCalculateChannels(timeUs_t currentTimeUs)
|
|||
|
||||
void mspOverrideChannels(rcChannel_t *rcChannels)
|
||||
{
|
||||
for (uint16_t channel = 0, channelMask = 1; channel < rxRuntimeConfigMSP.channelCount; ++channel, channelMask <<= 1) {
|
||||
for (uint32_t channel = 0, channelMask = 1; channel < rxRuntimeConfigMSP.channelCount; ++channel, channelMask <<= 1) {
|
||||
if (rxConfig()->mspOverrideChannels & ~mspOverrideCtrlChannels & channelMask) {
|
||||
rcChannels[channel].raw = rcChannels[channel].data = mspRcChannels[channel].data;
|
||||
}
|
||||
|
|
|
@ -98,7 +98,7 @@ rxLinkStatistics_t rxLinkStatistics;
|
|||
rxRuntimeConfig_t rxRuntimeConfig;
|
||||
static uint8_t rcSampleIndex = 0;
|
||||
|
||||
PG_REGISTER_WITH_RESET_TEMPLATE(rxConfig_t, rxConfig, PG_RX_CONFIG, 12);
|
||||
PG_REGISTER_WITH_RESET_TEMPLATE(rxConfig_t, rxConfig, PG_RX_CONFIG, 13);
|
||||
|
||||
#ifndef SERIALRX_PROVIDER
|
||||
#define SERIALRX_PROVIDER 0
|
||||
|
|
|
@ -126,7 +126,7 @@ typedef struct rxConfig_s {
|
|||
uint8_t rcFilterFrequency; // RC filter cutoff frequency (smoothness vs response sharpness)
|
||||
uint8_t autoSmooth; // auto smooth rx input (0 = off, 1 = on)
|
||||
uint8_t autoSmoothFactor; // auto smooth rx input factor (1 = no smoothing, 100 = lots of smoothing)
|
||||
uint16_t mspOverrideChannels; // Channels to override with MSP RC when BOXMSPRCOVERRIDE is active
|
||||
uint32_t mspOverrideChannels; // Channels to override with MSP RC when BOXMSPRCOVERRIDE is active
|
||||
uint8_t rssi_source;
|
||||
#ifdef USE_SERIALRX_SRXL2
|
||||
uint8_t srxl2_unit_id;
|
||||
|
|
|
@ -155,7 +155,7 @@
|
|||
#define USE_TELEMETRY_JETIEXBUS
|
||||
// These are rather exotic serial protocols
|
||||
#define USE_RX_MSP
|
||||
//#define USE_MSP_RC_OVERRIDE
|
||||
#define USE_MSP_RC_OVERRIDE
|
||||
#define USE_SERIALRX_CRSF
|
||||
#define USE_SERIAL_PASSTHROUGH
|
||||
#define NAV_MAX_WAYPOINTS 120
|
||||
|
|
|
@ -258,6 +258,33 @@ static void crsfFrameBatterySensor(sbuf_t *dst)
|
|||
crsfSerialize8(dst, batteryRemainingPercentage);
|
||||
}
|
||||
|
||||
const int32_t ALT_MIN_DM = 10000;
|
||||
const int32_t ALT_THRESHOLD_DM = 0x8000 - ALT_MIN_DM;
|
||||
const int32_t ALT_MAX_DM = 0x7ffe * 10 - 5;
|
||||
|
||||
/*
|
||||
0x09 Barometer altitude and vertical speed
|
||||
Payload:
|
||||
uint16_t altitude_packed ( dm - 10000 )
|
||||
*/
|
||||
static void crsfBarometerAltitude(sbuf_t *dst)
|
||||
{
|
||||
int32_t altitude_dm = lrintf(getEstimatedActualPosition(Z) / 10);
|
||||
uint16_t altitude_packed;
|
||||
if (altitude_dm < -ALT_MIN_DM) {
|
||||
altitude_packed = 0;
|
||||
} else if (altitude_dm > ALT_MAX_DM) {
|
||||
altitude_packed = 0xfffe;
|
||||
} else if (altitude_dm < ALT_THRESHOLD_DM) {
|
||||
altitude_packed = altitude_dm + ALT_MIN_DM;
|
||||
} else {
|
||||
altitude_packed = ((altitude_dm + 5) / 10) | 0x8000;
|
||||
}
|
||||
sbufWriteU8(dst, CRSF_FRAME_BAROMETER_ALTITUDE_PAYLOAD_SIZE + CRSF_FRAME_LENGTH_TYPE_CRC);
|
||||
crsfSerialize8(dst, CRSF_FRAMETYPE_BAROMETER_ALTITUDE);
|
||||
crsfSerialize16(dst, altitude_packed);
|
||||
}
|
||||
|
||||
typedef enum {
|
||||
CRSF_ACTIVE_ANTENNA1 = 0,
|
||||
CRSF_ACTIVE_ANTENNA2 = 1
|
||||
|
@ -415,6 +442,7 @@ typedef enum {
|
|||
CRSF_FRAME_FLIGHT_MODE_INDEX,
|
||||
CRSF_FRAME_GPS_INDEX,
|
||||
CRSF_FRAME_VARIO_SENSOR_INDEX,
|
||||
CRSF_FRAME_BAROMETER_ALTITUDE_INDEX,
|
||||
CRSF_SCHEDULE_COUNT_MAX
|
||||
} crsfFrameTypeIndex_e;
|
||||
|
||||
|
@ -481,6 +509,11 @@ static void processCrsf(void)
|
|||
crsfFrameVarioSensor(dst);
|
||||
crsfFinalize(dst);
|
||||
}
|
||||
if (currentSchedule & BV(CRSF_FRAME_BAROMETER_ALTITUDE_INDEX)) {
|
||||
crsfInitializeFrame(dst);
|
||||
crsfBarometerAltitude(dst);
|
||||
crsfFinalize(dst);
|
||||
}
|
||||
#endif
|
||||
crsfScheduleIndex = (crsfScheduleIndex + 1) % crsfScheduleCount;
|
||||
}
|
||||
|
@ -514,6 +547,11 @@ void initCrsfTelemetry(void)
|
|||
if (sensors(SENSOR_BARO) || (STATE(FIXED_WING_LEGACY) && feature(FEATURE_GPS))) {
|
||||
crsfSchedule[index++] = BV(CRSF_FRAME_VARIO_SENSOR_INDEX);
|
||||
}
|
||||
#endif
|
||||
#ifdef USE_BARO
|
||||
if (sensors(SENSOR_BARO)) {
|
||||
crsfSchedule[index++] = BV(CRSF_FRAME_BAROMETER_ALTITUDE_INDEX);
|
||||
}
|
||||
#endif
|
||||
crsfScheduleCount = (uint8_t)index;
|
||||
}
|
||||
|
|
20493
src/utils/mcus.json
Executable file
20493
src/utils/mcus.json
Executable file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue