Skip to content

Commit

Permalink
Merge pull request #5687 from iNavFlight/development
Browse files Browse the repository at this point in the history
Release 2.5
  • Loading branch information
digitalentity authored Jun 7, 2020
2 parents e31c9f2 + cb8c3f7 commit 6947679
Show file tree
Hide file tree
Showing 363 changed files with 6,965 additions and 5,743 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.vagrant/
obj/
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/Bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,19 @@ assignees: ''

---

**PLEASE MAKE SURE YOU READ AND UNDERSTAND THE SOCIAL MEDIA SUPPORT CHANNELS. QUESTIONS ABOUT FLASHING, CONFIGURING, PILOTING MAY BE CLOSED WITHOUT FURTHER INTERACTION.**

* [Telegram channel](https://t.me/INAVFlight)
* [Facebook group](https://www.facebook.com/groups/INAVOfficial)
* [RC Groups thread](https://www.rcgroups.com/forums/showthread.php?2495732-Cleanflight-iNav-%28navigation-rewrite%29-project)

**Please double-check that nobody reported the issue before by using search in this bug tracker.**

**PLEASE DELETE THE TEXT ABOVE AFTER READING AND UNDERSTANDING IT**

****


## Current Behavior
<!-- If applicable, add screenshots, videos and blackbox logs to help explain your problem. -->

Expand Down
23 changes: 0 additions & 23 deletions .github/ISSUE_TEMPLATE/Question.md

This file was deleted.

68 changes: 68 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Build firmware
# Don't enable CI on push, just on PR. If you
# are working on the main repo and want to trigger
# a CI build submit a draft PR.
on: pull_request

jobs:
build:
runs-on: ubuntu-18.04
strategy:
matrix:
start: [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100]
count: [10]

steps:
- uses: actions/checkout@v2
- name: Setup environment
run: |
# This is the hash of the commit for the PR
# when the action is triggered by PR, empty otherwise
COMMIT_ID=${{ github.event.pull_request.head.sha }}
# This is the hash of the commit when triggered by push
# but the hash of refs/pull/<n>/merge, which is different
# from the hash of the latest commit in the PR, that's
# why we try github.event.pull_request.head.sha first
COMMIT_ID=${COMMIT_ID:-${{ github.sha }}}
BUILD_SUFFIX=ci-$(date '+%Y%m%d')-$(git rev-parse --short ${COMMIT_ID})
echo "::set-env name=TARGETS::$(./src/utils/build-targets.sh -n -s ${{ matrix.start }} -c ${{ matrix.count }})"
echo "::set-env name=BUILD_SUFFIX::${BUILD_SUFFIX}"
echo "::set-env name=BUILD_NAME::inav-$(make print_version)-${BUILD_SUFFIX}"
echo "::set-env name=IS_LAST_JOB::$([ $(expr ${{ strategy.job-index }} + 1) = ${{ strategy.job-total }} ] && echo yes)"
- name: Ensure all targets will be tested
if: ${{ env.IS_LAST_JOB }}
run: |
UNTESTED=$(./src/utils/build-targets.sh -n -s $(expr ${{ matrix.start }} + ${{ matrix.count }}) -c 10000)
if ! [ -z "${UNTESTED}" ]; then
echo "Untested targets: ${UNTESTED}" >&2
exit 1
fi
- uses: actions/cache@v1
with:
path: downloads
key: ${{ runner.os }}-downloads-${{ hashFiles('Makefile') }}-${{ hashFiles('**/make/*.mk')}}
- name: Install ARM toolchain
run: make arm_sdk_install
- name: Build targets (${{ matrix.start }})
if: ${{ env.TARGETS }}
run: ./src/utils/build-targets.sh -s ${{ matrix.start }} -c ${{ matrix.count }} -S ${{ env.BUILD_SUFFIX }}
- name: Upload artifacts
if: ${{ env.TARGETS }}
uses: actions/upload-artifact@v2-preview
with:
name: ${{ env.BUILD_NAME }}.zip
path: ./obj/dist/*.hex

test:
needs: [build]
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v1
with:
path: downloads
key: ${{ runner.os }}-downloads-${{ hashFiles('Makefile') }}-${{ hashFiles('**/make/*.mk')}}
- name: Install ARM toolchain
run: make arm_sdk_install
- name: Run Tests
run: make test
11 changes: 7 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@ FROM ubuntu:bionic
VOLUME /home/src/
WORKDIR /home/src/
ARG TOOLCHAIN_VERSION_SHORT
ENV TOOLCHAIN_VERSION_SHORT ${TOOLCHAIN_VERSION_SHORT:-"8-2018q4"}
ENV TOOLCHAIN_VERSION_SHORT ${TOOLCHAIN_VERSION_SHORT:-"9-2019q4"}
ARG TOOLCHAIN_VERSION_LONG
ENV TOOLCHAIN_VERSION_LONG ${TOOLCHAIN_VERSION_LONG:-"8-2018-q4-major"}
ENV TOOLCHAIN_VERSION_LONG ${TOOLCHAIN_VERSION_LONG:-"9-2019-q4-major"}

# Essentials
RUN mkdir -p /home/src && \
apt-get update && \
apt-get install -y software-properties-common ruby make git gcc wget curl bzip2

# Toolchain
RUN wget -P /tmp "https://developer.arm.com/-/media/Files/downloads/gnu-rm/$TOOLCHAIN_VERSION_SHORT/gcc-arm-none-eabi-$TOOLCHAIN_VERSION_LONG-linux.tar.bz2"
RUN wget -P /tmp "https://developer.arm.com/-/media/Files/downloads/gnu-rm/$TOOLCHAIN_VERSION_SHORT/gcc-arm-none-eabi-$TOOLCHAIN_VERSION_LONG-x86_64-linux.tar.bz2"
RUN mkdir -p /opt && \
cd /opt && \
tar xvjf "/tmp/gcc-arm-none-eabi-$TOOLCHAIN_VERSION_LONG-linux.tar.bz2" -C /opt && \
tar xvjf "/tmp/gcc-arm-none-eabi-$TOOLCHAIN_VERSION_LONG-x86_64-linux.tar.bz2" -C /opt && \
chmod -R -w "/opt/gcc-arm-none-eabi-$TOOLCHAIN_VERSION_LONG"

ENV PATH="/opt/gcc-arm-none-eabi-$TOOLCHAIN_VERSION_LONG/bin:$PATH"

RUN useradd inav
USER inav
56 changes: 34 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ endif
# Things that need to be maintained as the source changes
#

FORKNAME = inav

# Working directories
SRC_DIR := $(ROOT)/src/main
OBJECT_DIR := $(ROOT)/obj/main
Expand All @@ -85,17 +83,9 @@ MHZ_VALUE ?=
# used for turning on features like VCP and SDCARD
FEATURES =

include $(ROOT)/make/version.mk
include $(ROOT)/make/targets.mk

REVISION = $(shell git rev-parse --short HEAD)

FC_VER_MAJOR := $(shell grep " FC_VERSION_MAJOR" src/main/build/version.h | awk '{print $$3}' )
FC_VER_MINOR := $(shell grep " FC_VERSION_MINOR" src/main/build/version.h | awk '{print $$3}' )
FC_VER_PATCH := $(shell grep " FC_VERSION_PATCH" src/main/build/version.h | awk '{print $$3}' )

FC_VER := $(FC_VER_MAJOR).$(FC_VER_MINOR).$(FC_VER_PATCH)
FC_VER_SUFFIX ?=

BUILD_DATE = $(shell date +%Y%m%d)

# Search path for sources
Expand Down Expand Up @@ -174,12 +164,15 @@ SIZE = $(ARM_SDK_PREFIX)size
# Tool options.
#

# Save original CFLAGS before modifying them, so we don't
# add them twice when calling this Makefile recursively
# for each target
SAVED_CFLAGS := $(CFLAGS)

ifeq ($(DEBUG),GDB)
OPTIMIZE = -O0
LTO_FLAGS = $(OPTIMIZE)
LTO_FLAGS =
else
OPTIMIZE = -Os
LTO_FLAGS = -flto -fuse-linker-plugin $(OPTIMIZE)
LTO_FLAGS = -flto -fuse-linker-plugin
endif

ifneq ($(SEMIHOSTING),)
Expand Down Expand Up @@ -252,9 +245,6 @@ CPPCHECK = cppcheck $(CSOURCES) --enable=all --platform=unix64 \
# Things we will build
#
TARGET_BIN := $(BIN_DIR)/$(FORKNAME)_$(FC_VER)
ifneq ($(FC_VER_SUFFIX),)
TARGET_BIN := $(TARGET_BIN)-$(FC_VER_SUFFIX)
endif
TARGET_BIN := $(TARGET_BIN)_$(TARGET)
ifneq ($(BUILD_SUFFIX),)
TARGET_BIN := $(TARGET_BIN)_$(BUILD_SUFFIX)
Expand Down Expand Up @@ -301,16 +291,38 @@ $(TARGET_ELF): $(TARGET_OBJS)
$(V1) $(CROSS_CC) -o $@ $(filter %.o, $^) $(LDFLAGS)
$(V0) $(SIZE) $(TARGET_ELF)

OPTIMIZE_FLAG_SPEED := "-Os"
OPTIMIZE_FLAG_SIZE := "-Os"
OPTIMIZE_FLAG_NORMAL := "-Os"

ifneq ($(TARGET_MCU_GROUP), STM32F3)
OPTIMIZE_FLAG_SPEED := "-Ofast"
OPTIMIZE_FLAG_SIZE := "-Os"
OPTIMIZE_FLAG_NORMAL := "-O2"
endif

define compile_file
echo "%% $(1) $(2) $<" "$(STDOUT)" && \
$(CROSS_CC) -c -o $@ $(CFLAGS) $(2) $<
endef

# Compile
$(TARGET_OBJ_DIR)/%.o: %.c
$(V1) mkdir -p $(dir $@)
$(V1) echo %% $(notdir $<) "$(STDOUT)"
$(V1) $(CROSS_CC) -c -o $@ $(CFLAGS) $<

$(V1) $(if $(findstring $<,$(SIZE_OPTIMISED_SRC)), \
$(call compile_file,(size),$(OPTIMIZE_FLAG_SIZE)) \
, \
$(if $(findstring $<,$(SPEED_OPTIMISED_SRC)), \
$(call compile_file,(speed),$(OPTIMIZE_FLAG_SPEED)) \
, \
$(call compile_file,(normal),$(OPTIMIZE_FLAG_NORMAL)) \
) \
)
ifeq ($(GENERATE_ASM), 1)
$(V1) $(CROSS_CC) -S -fverbose-asm -Wa,-aslh -o $(patsubst %.o,%.txt.S,$@) -g $(ASM_CFLAGS) $<
endif


# Assemble
$(TARGET_OBJ_DIR)/%.o: %.s
$(V1) mkdir -p $(dir $@)
Expand Down Expand Up @@ -340,7 +352,7 @@ release: $(RELEASE_TARGETS)
$(VALID_TARGETS):
$(V0) echo "" && \
echo "Building $@" && \
$(MAKE) -j 8 TARGET=$@ && \
CFLAGS=$(SAVED_CFLAGS) $(MAKE) -j 8 TARGET=$@ && \
echo "Building $@ succeeded."

## clean : clean up all temporary / machine-generated files
Expand Down
33 changes: 16 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
# INAV - navigation capable flight controller

## F3 based flight controllers

> STM32 F3 flight controllers like Omnibus F3 or SP Racing F3 are deprecated and soon they will reach the end of support in INAV. If you are still using F3 boards, please migrate to F4 or F7.
![INAV](http://static.rcgroups.net/forums/attachments/6/1/0/3/7/6/a9088858-102-inav.png)
![Travis CI status](https://travis-ci.org/iNavFlight/inav.svg?branch=master)

## Features

* Outstanding navigation performance out of the box
* Runs on the most popular F4 and F7 flight controllers
* Outstanding performance out of the box
* Position Hold, Altitude Hold, Return To Home and Missions
* Excellent support for fixed wing UAVs: airplanes, flying wings
* Pitot tube support
* Rangefinder support (sonar and laser)
* Oneshot and Multishot ESC support.
* Blackbox flight recorder logging (to onboard flash or external SD card).
* Lux's new PID (uses float values internally, resistant to looptime variation).
* Simultaneous Bluetooth configuration and OSD.
* LTM Telemetry.
* Smartport Telemetry.
* RSSI via ADC - Uses ADC to read PWM RSSI signals, tested with FrSky D4R-II and X8R.
* OLED Displays - Display information on: Battery voltage, profile, rate profile, version, sensors, RC, etc.
* In-flight manual PID tuning and rate adjustment.
* Rate profiles and in-flight selection of them.
* Multiple simultaneous telemetry providers.
* Configurable serial ports for Serial RX, Telemetry, MSP, GPS - Use most devices on any port, softserial too.
* Multi-color RGB LED Strip support (each LED can be a different color using variable length WS2811 Addressable RGB strips - use for Orientation Indicators, Low Battery Warning, Flight Mode Status, etc)
* PIDs from CF/BF can be used in INAV, no need to retune for INAV
* Fully configurable mixer that allows to run any hardware you want: multirotor, fixed wing, rovers, boats and other experimental devices
* Multiple sensor support: GPS, Pitot tube, sonar, lidar, temperature, ESC with BlHeli_32 telemetry
* SmartAudio and IRC Tramp VTX support
* DSHOT and Multishot ESCs
* Blackbox flight recorder logging
* On Screen Display (OSD) - both character and pixel style
* Telemetry: SmartPort, FPort, MAVlink, LTM
* Multi-color RGB LED Strip support
* Advanced gyro filtering: Matrix Filter and RPM filter
* Logic Conditions, Global Functions and Global Variables: you can program INAV with a GUI
* And many more!

For a list of features, changes and some discussion please review consult the releases [page](https://github.com/iNavFlight/inav/releases) and the documentation.
Expand Down
4 changes: 2 additions & 2 deletions docs/Autotune - fixedwing.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ For most hobby-sized airplanes roll/pitch rate limits should be in range 70-120

Other things to check:

* It's highly recommended that you fly in PASTHROUGH and trim your servo midpoints for stable flight
* It's highly recommended that you fly in MANUAL and trim your servo midpoints for stable flight
* Make sure you have center of gravity according to manual to your aircraft
* Check that your failsafe activates correctly (test on the ground with propeller off for safety)

Expand All @@ -54,6 +54,6 @@ The more you fly the better it will get. Let autotune analyze how your airplane

## Completing the tune

Once you have tuned reasonable PIFF parameters with AUTOTUNE you should complete the tune by switching out of AUTOTUNE to ANGLE or PASTHROUGH and landing the airplane.
Once you have tuned reasonable PIFF parameters with AUTOTUNE you should complete the tune by switching out of AUTOTUNE to ANGLE or MANUAL and landing the airplane.

Note that AUTOTUNE mode doesn't automatically save parameters to EEPROM. You need to disarm and issue a [stick command](Controls.md) to save configuration parameters.
2 changes: 1 addition & 1 deletion docs/Battery.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ On the first battery connection is always advisable to use a current limiter dev

### Sparky

See the [Sparky board chapter](Board - Sparky.md).
See the [Sparky board chapter](Board%20-%20Sparky.md).

## Voltage measurement

Expand Down
2 changes: 1 addition & 1 deletion docs/Board - MatekF722-SE.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Full details on the MATEKSYS F722-SE can be found on the Matek Website: [mateksy

### Integrated PDB Specs

* *Input:* 6-36v (3-8S LiPo) w/TVS protection
* *Input:* 6-36v (2-8S LiPo) w/TVS protection
* *ESC Pads:* Rated 4x30A per ESC pad set (4x46A burst)
* Voltage Regulators:
* *5v BEC:* 2A continuous load (3A burst)
Expand Down
Loading

0 comments on commit 6947679

Please sign in to comment.