Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
107aad5
New video system
mmosca Oct 29, 2024
5c670ae
Rename new option
mmosca Nov 1, 2024
100c6ea
Merge remote-tracking branch 'origin/master' into mmosca-dji-no-compat
mmosca Nov 13, 2024
7bfbd4d
Small change to reopen pr
mmosca Jan 28, 2025
ead51fb
Update OSD.md
mmosca Jan 29, 2025
55160f8
s/\t/ /g
mmosca Jan 29, 2025
7939616
mc alt hold fix
breadoven Feb 1, 2025
f88f25c
Update navigation_multicopter.c
breadoven Feb 1, 2025
6ee7f3e
fix LTM attitude (mis-cast)
stronnag Feb 7, 2025
a7c110a
Merge pull request #10680 from iNavFlight/jh_fix_LTM_attitude_breakage
DzikuVx Feb 7, 2025
9f0ad97
Update CMakeLists.txt
breadoven Feb 10, 2025
86cdcdc
Doc updates
mmosca Feb 13, 2025
a6405dc
Merge remote-tracking branch 'origin/maintenance-8.x.x' into mmosca-d…
mmosca Feb 13, 2025
e04e4be
Merge pull request #10440 from iNavFlight/mmosca-dji-no-compat
mmosca Feb 13, 2025
d5e0490
improve cli status NAV reasons (#10696)
stronnag Feb 14, 2025
3dd4de5
TBS_LUCID_H7: fix gyro2
bkleiner Feb 7, 2025
fba00db
Make config_streamer_stm32h7 less hard coded. (#10706)
mmosca Feb 17, 2025
5ceb7a3
Set version as 8.0.1.
Feb 25, 2025
171d00b
Merge pull request #10724 from iNavFlight/mmosca-8.0.1
mmosca Feb 25, 2025
439f0dc
Adsbee1090
error414 Mar 1, 2025
abf9730
Merge pull request #10727 from error414/maintenance-8.x.x
sensei-hacker Mar 1, 2025
28e1b23
Merge branch 'maintenance-8.x.x' into abo_mc_althold_fix
breadoven Mar 15, 2025
bee0c20
Fix channel 17 jitter in 16 channel jeti systems and add instrumenation
mmosca Mar 22, 2025
39b215a
reset frame/request state on received frame
mmosca Mar 22, 2025
6ae615c
fix MATEKF405 variants BBL logging (#10741)
stronnag Mar 24, 2025
ecda715
Update gcc from 13.2 to 13.3 as an experiment.
mmosca Mar 24, 2025
a0e0c0c
warning fixes
mmosca Mar 24, 2025
8221f3b
Add extra instrumentation
mmosca Mar 24, 2025
0cbb975
waring
mmosca Mar 25, 2025
6970048
Renive tranceiver state tracking
mmosca Mar 25, 2025
0c36a5c
Only add debug sensors to telemetry, if debug is enabled.
mmosca Mar 25, 2025
111d3f6
Remove DEBUG_EXBUS
mmosca Mar 25, 2025
f2acee1
remove EXBUS debug mode
mmosca Mar 25, 2025
990be67
remove instrumentation variables
mmosca Mar 25, 2025
53c764e
Revert "Update gcc from 13.2 to 13.3 as an experiment."
mmosca Mar 25, 2025
699ce84
remove commented out debug code
mmosca Mar 25, 2025
6830332
Mark some global variables used in the interrupt handler as volatile,…
mmosca Mar 25, 2025
bbc1d4e
some f7 fcs were overflowing fast ram
mmosca Mar 25, 2025
4c6b7f6
Merge pull request #10772 from iNavFlight/mmosca-jeti-fixes
mmosca Mar 25, 2025
2f990e5
Merge pull request #10664 from breadoven/abo_mc_althold_fix
mmosca Mar 26, 2025
ae47bcb
Merge pull request #10718 from DusKing1/hugo-fix-SKYSTARSF405WING-tar…
mmosca Mar 28, 2025
0442b56
Merge pull request #10578 from orbittechnologyx/feature/ORBITF435
sensei-hacker Mar 30, 2025
44e02e1
Merge remote-tracking branch 'origin/maintenance-8.x.x'
mmosca Mar 30, 2025
529f057
Merge changes from maintenance-8.x.x
mmosca Mar 30, 2025
be52fe6
Merge branch 'master' of github.com:iNavFlight/inav
mmosca Mar 30, 2025
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
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ else()
endif()
endif()


project(INAV VERSION 9.0.0)

enable_language(ASM)
Expand Down
19 changes: 19 additions & 0 deletions docs/ADSB.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ All ADSB receivers which can send Mavlink [ADSB_VEHICLE](https://mavlink.io/en/m

* [PINGRX](https://uavionix.com/product/pingrx-pro/) (not tested)
* [TT-SC1](https://www.aerobits.pl/product/aero/) (tested)
* [ADSBee1090](https://pantsforbirds.com/adsbee-1090/) (tested)

## TT-SC1 settings
* download software for ADSB TT-SC1 from https://www.aerobits.pl/product/aero/ , file Micro_ADSB_App-vX.XX.X_win_setup.zip and install it
Expand All @@ -24,3 +25,21 @@ All ADSB receivers which can send Mavlink [ADSB_VEHICLE](https://mavlink.io/en/m
PCB board for TT-SC1-B module https://oshwlab.com/error414/adsb-power-board
![TT-SC1 settings](Screenshots/ADSB_TTSC01_settings.png)

## ADSBee 1090 settings
* connect to ADSBee1090 via USB and set COMMS_UART to mavlink2 \
``
AT+PROTOCOL=COMMS_UART,MAVLINK2
``\
``
AT+BAUDRATE=COMMS_UART,115200
``\
It's recommended to turn of wifi \
``
AT+ESP32_ENABLE=0
``\
``
AT+SETTINGS=SAVE
``
* in INAV configurator ports TAB set telemetry MAVLINK, and baudrate 115200
* https://pantsforbirds.com/adsbee-1090/quick-start/

2 changes: 1 addition & 1 deletion docs/OSD.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ Not all OSDs are created equally. This table shows the differences between the d
| DJI WTFOS | 60 x 22 | X | | X | YES |
| HDZero | 50 x 18 | X | | X | YES |
| Avatar | 53 x 20 | X | | X | YES |
| DJI O3 | 53 x 20 (HD) | X | | X (partial) | NO - BF Characters only |
| DJI O3 Goggles V2 + WTFOS | 53 x 20 | X | | X | YES |
| DJI Goggles 2 and newer | 53 x 20 (HD) | X | | X | YES (no custom fonts) |

## OSD Elements
Here are the OSD Elements provided by INAV.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@
#ifdef USE_FULL_ASSERT
#include "stm32_assert.h"
#else
#ifndef assert_param
#define assert_param(expr) ((void)0U)
#endif
#endif

/** @addtogroup STM32H7xx_LL_Driver
* @{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@
#ifdef USE_FULL_ASSERT
#include "stm32_assert.h"
#else
#ifndef assert_param
#define assert_param(expr) ((void)0U)
#endif
#endif

/** @addtogroup STM32H7xx_LL_Driver
* @{
Expand Down
6 changes: 6 additions & 0 deletions src/main/config/config_eeprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@ void initEEPROM(void)
BUILD_BUG_ON(sizeof(configFooter_t) != 2);
BUILD_BUG_ON(sizeof(configRecord_t) != 6);

#ifdef STM32H7A3xx
BUILD_BUG_ON(CONFIG_STREAMER_BUFFER_SIZE != 16);
#elif defined(STM32H743xx)
BUILD_BUG_ON(CONFIG_STREAMER_BUFFER_SIZE != 32);
#endif

#if defined(CONFIG_IN_EXTERNAL_FLASH)
bool eepromLoaded = loadEEPROMFromExternalFlash();
if (!eepromLoaded) {
Expand Down
6 changes: 3 additions & 3 deletions src/main/config/config_streamer.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ int config_streamer_write(config_streamer_t *c, const uint8_t *p, uint32_t size)
return -1;
}

for (const uint8_t *pat = p; pat != (uint8_t*)p + size; pat++) {
for (const uint8_t *pat = p; pat != (uint8_t *)p + size; pat++) {
c->buffer.b[c->at++] = *pat;

if (c->at == sizeof(c->buffer)) {
Expand All @@ -81,7 +81,7 @@ int config_streamer_flush(config_streamer_t *c)
c->err = config_streamer_impl_write_word(c, &c->buffer.w);
c->at = 0;
}
return c-> err;
return c->err;
}

int config_streamer_finish(config_streamer_t *c)
Expand All @@ -91,4 +91,4 @@ int config_streamer_finish(config_streamer_t *c)
c->unlocked = false;
}
return c->err;
}
}
7 changes: 3 additions & 4 deletions src/main/config/config_streamer.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,14 @@

#ifdef CONFIG_IN_EXTERNAL_FLASH
#define CONFIG_STREAMER_BUFFER_SIZE M25P16_PAGESIZE // Must match flash device page size
typedef uint32_t config_streamer_buffer_align_type_t;
#elif defined(STM32H7)
#define CONFIG_STREAMER_BUFFER_SIZE 32 // Flash word = 256-bits
typedef uint64_t config_streamer_buffer_align_type_t;
#define CONFIG_STREAMER_BUFFER_SIZE (FLASH_NB_32BITWORD_IN_FLASHWORD * 4) // Flash word = 256-bits or 128bits, depending on the mcu
#else
#define CONFIG_STREAMER_BUFFER_SIZE 4
typedef uint32_t config_streamer_buffer_align_type_t;
#endif

typedef uint32_t config_streamer_buffer_align_type_t;

typedef struct config_streamer_s {
uintptr_t address;
uintptr_t end;
Expand Down
94 changes: 62 additions & 32 deletions src/main/config/config_streamer_stm32h7.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,45 @@
* along with Cleanflight. If not, see <http://www.gnu.org/licenses/>.
*/

#include <string.h>
#include "platform.h"
#include "drivers/system.h"
#include "config/config_streamer.h"
#include <string.h>
#include "platform.h"
#include "drivers/system.h"
#include "config/config_streamer.h"

#if defined(STM32H7) && !defined(CONFIG_IN_RAM) && !defined(CONFIG_IN_EXTERNAL_FLASH)

#if defined(STM32H7) && !defined(CONFIG_IN_RAM) && !defined(CONFIG_IN_EXTERNAL_FLASH)
static uint32_t getFLASHBankForEEPROM(uint32_t address)
{
#ifdef DUAL_BANK
if (address < (FLASH_BASE + FLASH_BANK_SIZE)) {
return FLASH_BANK_1;
}

return FLASH_BANK_2;
#else
return FLASH_BANK_1;
#endif
}

#if defined(STM32H7A3xx)
static uint32_t getFLASHSectorForEEPROM(uint32_t address)
{
uint32_t sector = 0;

if (address < (FLASH_BASE + FLASH_BANK_SIZE)) {
sector = (address - FLASH_BASE) / FLASH_SECTOR_SIZE;
} else {
sector = (address - (FLASH_BASE + FLASH_BANK_SIZE)) / FLASH_SECTOR_SIZE;
}

#if defined(STM32H743xx)
if (sector > FLASH_SECTOR_TOTAL) {
failureMode(FAILURE_FLASH_WRITE_FAILED);
}

return sector;
}
#elif defined(STM32H743xx)
/* Sectors 0-7 of 128K each */
#define FLASH_PAGE_SIZE ((uint32_t)0x20000) // 128K sectors
static uint32_t getFLASHSectorForEEPROM(uint32_t address)
{
if (address <= 0x0801FFFF)
Expand All @@ -49,9 +78,9 @@ static uint32_t getFLASHSectorForEEPROM(uint32_t address)
}
}
#elif defined(STM32H750xx)
# error "STM32750xx only has one flash page which contains the bootloader, no spare flash pages available, use external storage for persistent config or ram for target testing"
#error "STM32750xx only has one flash page which contains the bootloader, no spare flash pages available, use external storage for persistent config or ram for target testing"
#else
# error "Unsupported CPU!"
#error "Unsupported CPU!"
#endif

void config_streamer_impl_unlock(void)
Expand All @@ -70,30 +99,31 @@ int config_streamer_impl_write_word(config_streamer_t *c, config_streamer_buffer
return c->err;
}

if (c->address % FLASH_PAGE_SIZE == 0) {
if (c->address % FLASH_SECTOR_SIZE == 0) {
FLASH_EraseInitTypeDef EraseInitStruct = {
.TypeErase = FLASH_TYPEERASE_SECTORS,
.VoltageRange = FLASH_VOLTAGE_RANGE_3, // 2.7-3.6V
.NbSectors = 1,
.Banks = FLASH_BANK_1
};
EraseInitStruct.Sector = getFLASHSectorForEEPROM(c->address);

uint32_t SECTORError;
const HAL_StatusTypeDef status = HAL_FLASHEx_Erase(&EraseInitStruct, &SECTORError);
if (status != HAL_OK) {
return -1;
}
}
.TypeErase = FLASH_TYPEERASE_SECTORS,
#ifdef FLASH_VOLTAGE_RANGE_3
.VoltageRange = FLASH_VOLTAGE_RANGE_3, // 2.7-3.6V
#endif
.NbSectors = 1};
EraseInitStruct.Banks = getFLASHBankForEEPROM(c->address);
EraseInitStruct.Sector = getFLASHSectorForEEPROM(c->address);

// On H7 HAL_FLASH_Program takes data address, not the raw word value
const HAL_StatusTypeDef status = HAL_FLASH_Program(FLASH_TYPEPROGRAM_FLASHWORD, c->address, (uint32_t)buffer);
if (status != HAL_OK) {
return -2;
}
uint32_t SECTORError;
const HAL_StatusTypeDef status = HAL_FLASHEx_Erase(&EraseInitStruct, &SECTORError);
if (status != HAL_OK) {
return -1;
}
}

c->address += CONFIG_STREAMER_BUFFER_SIZE;
return 0;
}
// On H7 HAL_FLASH_Program takes data address, not the raw word value
const HAL_StatusTypeDef status = HAL_FLASH_Program(FLASH_TYPEPROGRAM_FLASHWORD, c->address, (uint32_t)buffer);
if (status != HAL_OK) {
return -2;
}

#endif
c->address += CONFIG_STREAMER_BUFFER_SIZE;
return 0;
}

#endif
3 changes: 2 additions & 1 deletion src/main/drivers/osd.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ typedef enum {
VIDEO_SYSTEM_DJIWTF,
VIDEO_SYSTEM_AVATAR,
VIDEO_SYSTEM_DJICOMPAT,
VIDEO_SYSTEM_DJICOMPAT_HD
VIDEO_SYSTEM_DJICOMPAT_HD,
VIDEO_SYSTEM_DJI_NATIVE
} videoSystem_e;

typedef enum {
Expand Down
49 changes: 27 additions & 22 deletions src/main/fc/cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -1578,11 +1578,11 @@ static void printGeozones(uint8_t dumpMask, const geoZoneConfig_t *geoZone, cons
&& geoZone[i].fenceAction == defaultGeoZone->fenceAction
&& geoZone[i].vertexCount == defaultGeoZone->vertexCount;

cliDefaultPrintLinef(dumpMask, equalsDefault, format, defaultGeoZone[i].shape, defaultGeoZone[i].type, defaultGeoZone[i].minAltitude, defaultGeoZone[i].maxAltitude, defaultGeoZone[i].isSealevelRef, defaultGeoZone[i].fenceAction, defaultGeoZone[i].vertexCount);
cliDefaultPrintLinef(dumpMask, equalsDefault, format, defaultGeoZone[i].shape, defaultGeoZone[i].type, defaultGeoZone[i].minAltitude, defaultGeoZone[i].maxAltitude, defaultGeoZone[i].isSealevelRef, defaultGeoZone[i].fenceAction, defaultGeoZone[i].vertexCount);
}
cliDumpPrintLinef(dumpMask, equalsDefault, format, i, geoZone[i].shape, geoZone[i].type, geoZone[i].minAltitude, geoZone[i].maxAltitude, geoZone[i].isSealevelRef, geoZone[i].fenceAction, geoZone[i].vertexCount);
cliDumpPrintLinef(dumpMask, equalsDefault, format, i, geoZone[i].shape, geoZone[i].type, geoZone[i].minAltitude, geoZone[i].maxAltitude, geoZone[i].isSealevelRef, geoZone[i].fenceAction, geoZone[i].vertexCount);
}
}
}

static void printGeozoneVertices(uint8_t dumpMask, const vertexConfig_t *vertices, const vertexConfig_t *defaultVertices)
{
Expand All @@ -1594,11 +1594,11 @@ static void printGeozoneVertices(uint8_t dumpMask, const vertexConfig_t *vertice
&& vertices[i].lat == defaultVertices->lat
&& vertices[i].lon == defaultVertices->lon
&& vertices[i].zoneId == defaultVertices->zoneId;

cliDefaultPrintLinef(dumpMask, equalsDefault, format, defaultVertices[i].zoneId, defaultVertices[i].idx, defaultVertices[i].lat, defaultVertices[i].lon);
}
cliDumpPrintLinef(dumpMask, equalsDefault, format, vertices[i].zoneId, vertices[i].idx, vertices[i].lat, vertices[i].lon);

cliDumpPrintLinef(dumpMask, equalsDefault, format, vertices[i].zoneId, vertices[i].idx, vertices[i].lat, vertices[i].lon);
}

if (!defaultVertices) {
Expand All @@ -1608,10 +1608,10 @@ static void printGeozoneVertices(uint8_t dumpMask, const vertexConfig_t *vertice
}

static void cliGeozone(char* cmdLine)
{
{
if (isEmpty(cmdLine)) {
printGeozones(DUMP_MASTER, geoZonesConfig(0), NULL);
} else if (sl_strcasecmp(cmdLine, "vertex") == 0) {
} else if (sl_strcasecmp(cmdLine, "vertex") == 0) {
printGeozoneVertices(DUMP_MASTER, geoZoneVertices(0), NULL);
} else if (sl_strncasecmp(cmdLine, "vertex reset", 12) == 0) {
const char* ptr = &cmdLine[12];
Expand Down Expand Up @@ -1648,7 +1648,7 @@ static void cliGeozone(char* cmdLine)
const char* ptr = cmdLine;
uint8_t argumentCount = 1;

if ((ptr = nextArg(ptr))) {
if ((ptr = nextArg(ptr))) {
zoneId = fastA2I(ptr);
if (zoneId < 0) {
return;
Expand Down Expand Up @@ -1678,7 +1678,7 @@ static void cliGeozone(char* cmdLine)
cliShowParseError();
return;
}

if ((ptr = nextArg(ptr))) {
argumentCount++;
lon = fastA2I(ptr);
Expand All @@ -1695,7 +1695,7 @@ static void cliGeozone(char* cmdLine)
cliShowParseError();
return;
}

for (uint8_t i = 0; i < MAX_VERTICES_IN_CONFIG; i++) {
if (geoZoneVertices(i)->zoneId == zoneId && geoZoneVertices(i)->idx == vertexZoneIdx) {
geoZoneVerticesMutable(i)->lat = lat;
Expand All @@ -1719,8 +1719,8 @@ static void cliGeozone(char* cmdLine)
geoZoneVerticesMutable(vertexIdx)->lat = lat;
geoZoneVerticesMutable(vertexIdx)->lon = lon;
geoZoneVerticesMutable(vertexIdx)->zoneId = zoneId;
geoZoneVerticesMutable(vertexIdx)->idx = vertexZoneIdx;
geoZoneVerticesMutable(vertexIdx)->idx = vertexZoneIdx;

uint8_t totalVertices = geozoneGetUsedVerticesCount();
cliPrintLinef("# %u vertices free (Used %u of %u)", MAX_VERTICES_IN_CONFIG - totalVertices, totalVertices, MAX_VERTICES_IN_CONFIG);

Expand All @@ -1733,7 +1733,7 @@ static void cliGeozone(char* cmdLine)
} else {
geozoneReset(-1);
geozoneResetVertices(-1, -1);
}
}
} else {
int8_t idx = 0, isPolygon = 0, isInclusive = 0, fenceAction = 0, seaLevelRef = 0, vertexCount = 0;
int32_t minAltitude = 0, maxAltitude = 0;
Expand All @@ -1745,7 +1745,7 @@ static void cliGeozone(char* cmdLine)
cliShowArgumentRangeError("geozone index", 0, MAX_GEOZONES_IN_CONFIG - 1);
return;
}

if ((ptr = nextArg(ptr))) {
argumentCount++;
isPolygon = fastA2I(ptr);
Expand Down Expand Up @@ -1787,7 +1787,7 @@ static void cliGeozone(char* cmdLine)
}

if ((ptr = nextArg(ptr))){
argumentCount++;
argumentCount++;
fenceAction = fastA2I(ptr);
if (fenceAction < 0 || fenceAction > GEOFENCE_ACTION_RTH) {
cliShowArgumentRangeError("fence action", 0, GEOFENCE_ACTION_RTH);
Expand All @@ -1812,7 +1812,7 @@ static void cliGeozone(char* cmdLine)

if ((ptr = nextArg(ptr))){
argumentCount++;
}
}

if (argumentCount != 8) {
cliShowParseError();
Expand Down Expand Up @@ -4190,14 +4190,19 @@ static void cliStatus(char *cmdline)
#if defined(USE_OSD)
if (armingFlags & ARMING_DISABLED_NAVIGATION_UNSAFE) {
navArmingBlocker_e reason = navigationIsBlockingArming(NULL);
if (reason & NAV_ARMING_BLOCKER_JUMP_WAYPOINT_ERROR)
if (reason == NAV_ARMING_BLOCKER_JUMP_WAYPOINT_ERROR)
cliPrintLinef(" %s", OSD_MSG_JUMP_WP_MISCONFIG);
if (reason & NAV_ARMING_BLOCKER_MISSING_GPS_FIX) {
if (reason == NAV_ARMING_BLOCKER_MISSING_GPS_FIX) {
cliPrintLinef(" %s", OSD_MSG_WAITING_GPS_FIX);
} else {
if (reason & NAV_ARMING_BLOCKER_NAV_IS_ALREADY_ACTIVE)
cliPrintLinef(" %s", OSD_MSG_DISABLE_NAV_FIRST);
if (reason & NAV_ARMING_BLOCKER_FIRST_WAYPOINT_TOO_FAR)
if (reason == NAV_ARMING_BLOCKER_NAV_IS_ALREADY_ACTIVE) {
if(armingFlags & ARMING_DISABLED_RC_LINK) {
cliPrintLinef(" ENABLE RX TO CLEAR NAV");
} else {
cliPrintLinef(" %s", OSD_MSG_DISABLE_NAV_FIRST);
}
}
if (reason == NAV_ARMING_BLOCKER_FIRST_WAYPOINT_TOO_FAR)
cliPrintLinef(" FIRST WP TOO FAR");
}
}
Expand Down
Loading
Loading