Skip to content

Commit

Permalink
Merge pull request #2348 from iNavFlight/development
Browse files Browse the repository at this point in the history
Release INAV 1.8
  • Loading branch information
digitalentity authored Nov 1, 2017
2 parents 5a62b57 + 8c62e7d commit 912d131
Show file tree
Hide file tree
Showing 2,919 changed files with 2,602,553 additions and 3,976 deletions.
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
### If your issue looks like a hardware fault or a configuration problem please don't raise an issue here.

### Please consider using other user support options such as asking the manufacturer of the hardware you are using, [RCGroups](https://www.rcgroups.com/forums/showthread.php?t=2495732), [Slack](https://inavflight.signup.team) or other user support forums & groups (e.g. facebook).

### Board and Version
_Board name goes here. If you have a link where you've purchased the board - please include it_
_Version of INAV used goes here_

_Use CLI command `version` and put its output here_

_If it's a custom-compiled firmware please mention this_

### Behavior
* _Describe the problem_
* _Steps needed to reproduce the problem_
* _Expected Results_
* _Actual Results_

_Is this a new feature request?_

#### Blackbox logs/Config (.ZIP) where problem occurs
_Go to CLI, execute `dump` command copy its output to [PasteBin](https://pastebin.com) and provide a link to a paste here.

_Upload a zipped blackbox log (if available)_

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ README.pdf
# build generated files
/src/main/fc/settings_generated.h
/src/main/fc/settings_generated.c
/settings.json
7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
env:
# Specify the main Mafile supported goals.
- GOAL=test
- GOAL=all
# - TARGET=CC3D
- GOAL=targets-group-1
- GOAL=targets-group-2
- GOAL=targets-group-3
- GOAL=targets-group-4
- GOAL=targets-group-rest

# use new docker environment
sudo: false
Expand Down
24 changes: 17 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
FROM ubuntu:wily
LABEL maintainer Alexandr Kuzmitsky <brat002@gmail.com>
FROM ubuntu:xenial
LABEL maintainer Andy Schwarz <flyandi@yahoo.com>

# Configuration
VOLUME /home/src/
WORKDIR /home/src/

RUN mkdir -p /home/src && apt-get update && \
apt-get install -y software-properties-common python-software-properties && \
apt-get remove -y binutils-arm-none-eabi gcc-arm-none-eabi && \
add-apt-repository -y ppa:terry.guo/gcc-arm-embedded && \
# Essentials
RUN mkdir -p /home/src && \
apt-get update && \
apt-get install -y gcc-arm-none-eabi libnewlib-arm-none-eabi make git gcc ruby
apt-get install -y software-properties-common python-software-properties ruby make git gcc wget curl bzip2 lib32ncurses5 lib32z1

# Toolchain
ENV TOOLCHAIN=
ENV TOOLCHAIN_ID=
RUN wget -P /tmp https://developer.arm.com/-/media/Files/downloads/gnu-rm/6-2017q2/gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2
RUN mkdir -p /opt && \
cd /opt && \
tar xvjf /tmp/gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2 -C /opt && \
chmod -R -w /opt/gcc-arm-none-eabi-6-2017-q2-update

ENV PATH="/opt/gcc-arm-none-eabi-6-2017-q2-update/bin:${PATH}"
86 changes: 68 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ FEATURES =
ALT_TARGETS = $(sort $(filter-out target, $(basename $(notdir $(wildcard $(ROOT)/src/main/target/*/*.mk)))))
OPBL_TARGETS = $(filter %_OPBL, $(ALT_TARGETS))

#VALID_TARGETS = $(F1_TARGETS) $(F3_TARGETS) $(F4_TARGETS)
VALID_TARGETS = $(dir $(wildcard $(ROOT)/src/main/target/*/target.mk))
VALID_TARGETS := $(subst /,, $(subst ./src/main/target/,, $(VALID_TARGETS)))
VALID_TARGETS := $(VALID_TARGETS) $(ALT_TARGETS)
Expand Down Expand Up @@ -139,6 +138,12 @@ $(error FLASH_SIZE not configured for target $(TARGET))
endif
endif

GROUP_1_TARGETS := AIRHEROF3 AIRHEROF3_QUAD COLIBRI_RACE LUX_RACE SPARKY REVO SPARKY2 COLIBRI FALCORE PIKOBLX
GROUP_2_TARGETS := SPRACINGF3 SPRACINGF3EVO SPRACINGF3EVO_1SS SPRACINGF3MINI SPRACINGF3NEO SPRACINGF4EVO
GROUP_3_TARGETS := OMNIBUS AIRBOTF4 BLUEJAYF4 OMNIBUSF4 OMNIBUSF4PRO OMNIBUSF4V3 SPARKY2 MATEKF405 OMNIBUSF7 DYSF4PRO MATEKF405OSD
GROUP_4_TARGETS := ANYFC ANYFCF7 ANYFCF7_EXTERNAL_BARO ANYFCM7 ALIENFLIGHTNGF7 PIXRACER PIXRACER_ICM20608
GROUP_OTHER_TARGETS := $(filter-out $(GROUP_1_TARGETS) $(GROUP_2_TARGETS) $(GROUP_3_TARGETS) $(GROUP_4_TARGETS), $(VALID_TARGETS))

# note that there is no hardfault debugging startup file assembly handler for other platforms
ifeq ($(DEBUG_HARDFAULTS),F3)
CFLAGS += -DDEBUG_HARDFAULTS
Expand Down Expand Up @@ -548,6 +553,7 @@ COMMON_SRC = \
common/maths.c \
common/printf.c \
common/streambuf.c \
common/time.c \
common/typeconversion.c \
common/string_light.c \
config/config_eeprom.c \
Expand All @@ -556,6 +562,9 @@ COMMON_SRC = \
config/parameter_group.c \
drivers/adc.c \
drivers/buf_writer.c \
drivers/bus.c \
drivers/bus_busdev_i2c.c \
drivers/bus_busdev_spi.c \
drivers/bus_i2c_soft.c \
drivers/bus_spi.c \
drivers/bus_spi_soft.c \
Expand All @@ -567,6 +576,7 @@ COMMON_SRC = \
drivers/io_pca9685.c \
drivers/light_led.c \
drivers/logging.c \
drivers/resource.c \
drivers/rx_nrf24l01.c \
drivers/rx_spi.c \
drivers/rx_xn297.c \
Expand All @@ -590,6 +600,7 @@ COMMON_SRC = \
fc/fc_tasks.c \
fc/fc_hardfaults.c \
fc/fc_msp.c \
fc/fc_msp_box.c \
fc/rc_adjustments.c \
fc/rc_controls.c \
fc/rc_curves.c \
Expand All @@ -611,11 +622,13 @@ COMMON_SRC = \
io/serial_4way_avrootloader.c \
io/serial_4way_stk500v2.c \
io/statusindicator.c \
io/rcsplit.c \
io/rcdevice.c \
io/rcdevice_cam.c \
msp/msp_serial.c \
rx/ibus.c \
rx/jetiexbus.c \
rx/msp.c \
rx/uib_rx.c \
rx/nrf24_cx10.c \
rx/nrf24_inav.c \
rx/nrf24_h8_3d.c \
Expand All @@ -639,6 +652,8 @@ COMMON_SRC = \
sensors/diagnostics.c \
sensors/gyro.c \
sensors/initialisation.c \
uav_interconnect/uav_interconnect_bus.c \
uav_interconnect/uav_interconnect_rangefinder.c \
$(CMSIS_SRC) \
$(DEVICE_STDPERIPH_SRC)

Expand All @@ -652,14 +667,17 @@ HIGHEND_SRC = \
cms/cms_menu_imu.c \
cms/cms_menu_ledstrip.c \
cms/cms_menu_misc.c \
cms/cms_menu_navigation.c \
cms/cms_menu_osd.c \
common/colorconversion.c \
common/gps_conversion.c \
drivers/display_ug2864hsweg01.c \
drivers/rangefinder_hcsr04.c \
drivers/rangefinder_hcsr04_i2c.c \
drivers/rangefinder_srf10.c \
drivers/opflow_fake.c \
drivers/rangefinder_vl53l0x.c \
drivers/vtx_common.c \
io/dashboard.c \
io/displayport_max7456.c \
io/displayport_msp.c \
Expand All @@ -680,15 +698,20 @@ HIGHEND_SRC = \
sensors/barometer.c \
sensors/pitotmeter.c \
sensors/rangefinder.c \
sensors/opflow.c \
telemetry/crsf.c \
telemetry/frsky.c \
telemetry/hott.c \
telemetry/ibus_shared.c \
telemetry/ibus_shared.c \
telemetry/ibus.c \
telemetry/ltm.c \
telemetry/mavlink.c \
telemetry/smartport.c \
telemetry/telemetry.c
telemetry/telemetry.c \
io/vtx_string.c \
io/vtx_smartaudio.c \
io/vtx_tramp.c \
io/vtx_control.c

ifeq ($(TARGET),$(filter $(TARGET),$(F4_TARGETS)))
VCP_SRC = \
Expand Down Expand Up @@ -918,28 +941,32 @@ CLEAN_ARTIFACTS += $(TARGET_ELF) $(TARGET_OBJS) $(TARGET_MAP)
$(OBJECT_DIR)/$(TARGET)/build/version.o : $(TARGET_SRC)

# Settings generator
.PHONY: settings clean-settings
UTILS_DIR = $(ROOT)/src/utils
.PHONY: .FORCE settings clean-settings
UTILS_DIR = $(ROOT)/src/utils
SETTINGS_GENERATOR = $(UTILS_DIR)/settings.rb
BUILD_STAMP = $(UTILS_DIR)/build_stamp.rb
STAMP = $(BIN_DIR)/build.stamp

GENERATED_SETTINGS = $(SRC_DIR)/fc/settings_generated.h $(SRC_DIR)/fc/settings_generated.c
SETTINGS_FILE = $(SRC_DIR)/fc/settings.yaml
$(GENERATED_SETTINGS): $(SETTINGS_GENERATOR) $(SETTINGS_FILE)
GENERATED_FILES = $(GENERATED_SETTINGS)
$(GENERATED_SETTINGS): $(SETTINGS_GENERATOR) $(SETTINGS_FILE) $(STAMP)

$(STAMP): .FORCE
$(V1) CFLAGS="$(CFLAGS)" TARGET=$(TARGET) ruby $(BUILD_STAMP) $(SETTINGS_FILE) $(STAMP)

# Use a pattern rule, since they're different than normal rules.
# See https://www.gnu.org/software/make/manual/make.html#Pattern-Examples
%generated.h %generated.c:
$(V1) echo "settings.yaml -> settings_generated.h, settings_generated.c" "$(STDOUT)"
$(V1) CFLAGS="$(CFLAGS)" ruby $(SETTINGS_GENERATOR) . $(SETTINGS_FILE)
$(V1) CFLAGS="$(CFLAGS)" TARGET=$(TARGET) ruby $(SETTINGS_GENERATOR) . $(SETTINGS_FILE)

settings-json:
$(V0) CFLAGS="$(CFLAGS)" TARGET=$(TARGET) ruby $(SETTINGS_GENERATOR) . $(SETTINGS_FILE) --json settings.json

settings: $(GENERATED_SETTINGS)
clean-settings:
$(V1) $(RM) $(GENERATED_SETTINGS)

# Files that depend on the generated settings
$(OBJECT_DIR)/$(TARGET)/fc/cli.o: settings
$(OBJECT_DIR)/$(TARGET)/fc/settings.o: settings

# List of buildable ELF files and their object dependencies.
# It would be nice to compute these lists, but that seems to be just beyond make.

Expand All @@ -949,7 +976,7 @@ $(TARGET_HEX): $(TARGET_ELF)
$(TARGET_BIN): $(TARGET_ELF)
$(V0) $(OBJCOPY) -O binary $< $@

$(TARGET_ELF): clean-settings $(TARGET_OBJS)
$(TARGET_ELF): $(TARGET_OBJS)
$(V1) echo Linking $(TARGET)
$(V1) $(CROSS_CC) -o $@ $(filter %.o, $^) $(LDFLAGS)
$(V0) $(SIZE) $(TARGET_ELF)
Expand All @@ -975,6 +1002,21 @@ $(OBJECT_DIR)/$(TARGET)/%.o: %.S
## all : Build all valid targets
all: $(VALID_TARGETS)

## targets-group-1 : build some targets
targets-group-1: $(GROUP_1_TARGETS)

## targets-group-2 : build some targets
targets-group-2: $(GROUP_2_TARGETS)

## targets-group-3 : build some targets
targets-group-3: $(GROUP_3_TARGETS)

## targets-group-3 : build some targets
targets-group-4: $(GROUP_4_TARGETS)

## targets-group-rest: build the rest of the targets (not listed in group 1, 2 or 3)
targets-group-rest: $(GROUP_OTHER_TARGETS)

$(VALID_TARGETS):
$(V0) echo "" && \
echo "Building $@" && \
Expand Down Expand Up @@ -1054,16 +1096,24 @@ help: Makefile

## targets : print a list of all valid target platforms (for consumption by scripts)
targets:
$(V0) @echo "Valid targets: $(VALID_TARGETS)"
$(V0) @echo "Target: $(TARGET)"
$(V0) @echo "Base target: $(BASE_TARGET)"
$(V0) @echo "Valid targets: $(VALID_TARGETS)"
$(V0) @echo "Target: $(TARGET)"
$(V0) @echo "Base target: $(BASE_TARGET)"
$(V0) @echo "targets-group-1: $(GROUP_1_TARGETS)"
$(V0) @echo "targets-group-2: $(GROUP_2_TARGETS)"
$(V0) @echo "targets-group-3: $(GROUP_3_TARGETS)"
$(V0) @echo "targets-group-4: $(GROUP_4_TARGETS)"
$(V0) @echo "targets-group-rest: $(GROUP_OTHER_TARGETS)"

## test : run the cleanflight test suite
test:
$(V0) cd src/test && $(MAKE) test || true

# rebuild everything when makefile changes
$(TARGET_OBJS) : Makefile
# Make the generated files and the build stamp order only prerequisites,
# so they will be generated before TARGET_OBJS but regenerating them
# won't cause all TARGET_OBJS to be rebuilt.
$(TARGET_OBJS) : Makefile | $(GENERATED_FILES) $(STAMP)

# include auto-generated dependencies
-include $(TARGET_DEPS)
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Starting at 22-06-2016 INAV uses the same scaling for PIDs as Cleanflight/Betafl
* Support for more than 8 RC channels - (e.g. 16 Channels via FrSky X4RSB SBus).
* Support for N-Position switches via flexible channel ranges - not just 3 like baseflight or 3/6 in MultiWii
* Lux's new PID (uses float values internally, resistant to looptime variation).

* Simultaneous Bluetooth configuration and OSD.
* Better PWM and PPM input and failsafe detection than baseflight.
* Better FrSky Telemetry than baseflight.
Expand Down Expand Up @@ -78,6 +79,9 @@ https://github.com/iNavFlight/inav-configurator
If you rather just want to use Cleanflight configurator you can download from here:
https://chrome.google.com/webstore/detail/cleanflight-configurator/enacoimjcgeinfnnnpajinjgmkahmfgb

## 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)

## Contributing

Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
echo "Building target" $1
docker run --rm -v `pwd`:/home/src/ inav make TARGET=$1
docker run --rm -v `pwd`:/home/src/ flyandi/docker-inav make TARGET=$1
46 changes: 41 additions & 5 deletions docs/Board - MatekF405.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ F405+ICM20602, w/ Betaflight OSD & SD Card Slot

F405-AIO (only) exposes I2C pads for compass / baro etc.

## Firmware

Due to differences on the board (I2C --- see below), there are two
firmware variants:

| Board | Firmware |
| ------ | -------- |
| Matek F405-AIO | inav_x.y.z_MATEKF405.hex |
| Matek F405-OSD | inav_x.y.z_MATEKF405OSD.hex |

## MCU, Sensors and Features

### Hardware
Expand All @@ -30,19 +40,47 @@ F405-AIO (only) exposes I2C pads for compass / baro etc.
* Integrated Voltage Regulator: F405-AIO, otherwise FCHUB-6S option
* Brushed Motor Mosfets: No
* Buttons: BOOT button
* 6 PWM / DShot outputs
* 6 PWM / DSHOT capable outputs
* WS2812 Led Strip : Yes
* Beeper : Yes

### Features
* 32K Gyro ICM-20602
* Support Gyro sample rate 32K & PID Loop 16K
* Built in inverter for SBUS input (UART2-RX)
* 6x DShot outputs without conflict
* 6x DSHOT capable outputs without conflict (iNav does not implement DSHOT)
* SD Card Slot
* VCP, UART1, UART2, UART3, UART4 & UART5
* w/ Anti-vibration Standoffs
* I2C on F405-AIO
* Dedicated hardware I2C on F405-AIO, soft-I2C via USART3 on F405-OSD

### I2C

The F405-AIO board exposes dedicated I2C pads.

The F405-OSD does not expose I2C. For iNav there is a software I2C provision using the USART3 pads, as:

* SDA => RX3, SCL => TX3
* Do not assign any serial function to USART3

## PWM and Servos

Due to the available hardware, please note:

### Flying Wing

* S1 : ESC
* S2 : LEFT elevon
* S3 : RIGHT elevon

### Tricopter

* S1 : Tail Servo
* S2 : Motor 1
* S3 : Motor 2
* S4 : Motor 3

I2C requires that the WS2812 led strip is moved to S5, thus WS2812 is not usable on hexcopter and similar.

## USB

Expand All @@ -69,8 +107,6 @@ Matek Systems www.mateksys.com

## FAQ & Known Issues

I2C requires that the WS2812 led strip is moved to S5, thus WS2812 is probably only usable on quadcopters.

Setup Guide Matek F405: http://f405.mateksys.com

Setup Guide Matek F405-AIO: http://www.mateksys.com/?portfolio=f405-aio
Expand Down
Loading

0 comments on commit 912d131

Please sign in to comment.