Skip to content

Commit

Permalink
Merge pull request #4410 from iNavFlight/development
Browse files Browse the repository at this point in the history
Release INAV 2.1
  • Loading branch information
digitalentity authored Feb 25, 2019
2 parents a57a843 + 0c5f366 commit 65b0ec1
Show file tree
Hide file tree
Showing 471 changed files with 15,210 additions and 7,417 deletions.
2 changes: 0 additions & 2 deletions .github/ISSUE_TEMPLATE/Question.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ For immediate help, just ask your question on one of the following platforms:
* [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)
* [IRC channel](irc://irc.freenode.net/#inavflight)
* [Slack channel](https://publicslack.com/slacks/inavflight/invites/new)

You can also read public documentations or watch video tutorials:

Expand Down
17 changes: 14 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ else
$(error Unknown target MCU specified.)
endif

GROUP_1_TARGETS := ALIENFLIGHTF3 ALIENFLIGHTF4 AIRHEROF3 AIRHEROF3_QUAD COLIBRI_RACE LUX_RACE SPARKY REVO SPARKY2 COLIBRI FALCORE FF_F35_LIGHTNING FF_FORTINIF4 FF_PIKOF4 FF_PIKOF4OSD
GROUP_2_TARGETS := SPRACINGF3 SPRACINGF3EVO SPRACINGF3EVO_1SS SPRACINGF3MINI SPRACINGF3NEO SPRACINGF4EVO CLRACINGF4AIR CLRACINGF4AIRV2 BEEROTORF4 BETAFLIGHTF3 BETAFLIGHTF4 PIKOBLX
GROUP_1_TARGETS := ALIENFLIGHTF3 ALIENFLIGHTF4 AIRHEROF3 AIRHEROF3_QUAD COLIBRI_RACE LUX_RACE SPARKY REVO SPARKY2 COLIBRI KISSFC FALCORE FF_F35_LIGHTNING FF_FORTINIF4 FF_PIKOF4 FF_PIKOF4OSD
GROUP_2_TARGETS := SPRACINGF3 SPRACINGF3EVO SPRACINGF3EVO_1SS SPRACINGF3MINI SPRACINGF4EVO CLRACINGF4AIR CLRACINGF4AIRV2 BEEROTORF4 BETAFLIGHTF3 BETAFLIGHTF4 PIKOBLX SPRACINGF3NEO
GROUP_3_TARGETS := OMNIBUS AIRBOTF4 BLUEJAYF4 OMNIBUSF4 OMNIBUSF4PRO OMNIBUSF4V3 FIREWORKSV2 SPARKY2 MATEKF405 OMNIBUSF7 DYSF4PRO OMNIBUSF4PRO_LEDSTRIPM5 OMNIBUSF7NXT OMNIBUSF7V2 ASGARD32F4
GROUP_4_TARGETS := ANYFC ANYFCF7 ANYFCF7_EXTERNAL_BARO ANYFCM7 ALIENFLIGHTNGF7 PIXRACER YUPIF4 YUPIF4MINI YUPIF4R2 YUPIF7 MATEKF405SE MATEKF411 MATEKF722 MATEKF405OSD MATEKF405_SERVOS6
GROUP_4_TARGETS := ANYFC ANYFCF7 ANYFCF7_EXTERNAL_BARO ANYFCM7 ALIENFLIGHTNGF7 PIXRACER YUPIF4 YUPIF4MINI YUPIF4R2 YUPIF7 MATEKF405SE MATEKF411 MATEKF722 MATEKF405OSD MATEKF405_SERVOS6 NOX
GROUP_OTHER_TARGETS := $(filter-out $(GROUP_1_TARGETS) $(GROUP_2_TARGETS) $(GROUP_3_TARGETS) $(GROUP_4_TARGETS), $(VALID_TARGETS))

REVISION = $(shell git rev-parse --short HEAD)
Expand Down Expand Up @@ -224,6 +224,7 @@ CFLAGS += $(ARCH_FLAGS) \
-Werror=switch \
-ffunction-sections \
-fdata-sections \
-fno-common \
$(DEVICE_FLAGS) \
-DUSE_STDPERIPH_DRIVER \
$(TARGET_FLAGS) \
Expand Down Expand Up @@ -322,6 +323,12 @@ settings-json:
clean-settings:
$(V1) $(RM) $(GENERATED_SETTINGS)

# CFLAGS used for ASM generation. These can't include the LTO related options
# since they prevent proper ASM generation. Since $(LTO_FLAGS) includes the
# optization level, we have to add it back. -g is required to make interleaved
# source/ASM work.
ASM_CFLAGS=-g $(OPTIMZE) $(filter-out $(LTO_FLAGS) -save-temps=obj, $(CFLAGS))

# 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 @@ -341,6 +348,10 @@ $(TARGET_OBJ_DIR)/%.o: %.c
$(V1) mkdir -p $(dir $@)
$(V1) echo %% $(notdir $<) "$(STDOUT)"
$(V1) $(CROSS_CC) -c -o $@ $(CFLAGS) $<
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
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* PIDs from CF/BF can be used in INAV, no need to retune for INAV
* And many more!

For a list of features, changes and some discussion please review the thread on RCGroups forums and consult the documentation.
For a list of features, changes and some discussion please review consult the releases [page](https://github.com/iNavFlight/inav/releases) and the documentation.

## Tools

Expand All @@ -52,8 +52,6 @@ See: https://github.com/iNavFlight/inav/blob/master/docs/Installation.md
* [Official Wiki](https://github.com/iNavFlight/inav/wiki)
* [INAV Official on Telegram](https://t.me/INAVFlight)
* [INAV Official on Facebook](https://www.facebook.com/groups/INAVOfficial)
* [INAV Official on Slack](https://publicslack.com/slacks/inavflight/invites/new)
* [INAV IRC channel] (irc://irc.freenode.net/#inavflight)
* [RC Groups Support](https://www.rcgroups.com/forums/showthread.php?2495732-Cleanflight-iNav-(navigation-rewrite)-project)
* [Video series by Painless360](https://www.youtube.com/playlist?list=PLYsWjANuAm4qdXEGFSeUhOZ10-H8YTSnH)
* [Video series by Paweł Spychalski](https://www.youtube.com/playlist?list=PLOUQ8o2_nCLloACrA6f1_daCjhqY2x0fB)
Expand All @@ -67,8 +65,9 @@ Contributions are welcome and encouraged. You can contribute in many ways:
* Bug fixes.
* New features.
* Telling us your ideas and suggestions.
* Buying your hardware from this [link](https://inavflight.com/shop/u/bg/)

A good place to start is Telegram channel, Slack, Facebook goop or IRC channel on freenode (#inavflight), drop in, say hi.
A good place to start is Telegram channel or Facebook group. Drop in, say hi.

Github issue tracker is a good place to search for existing issues or report a new bug/feature request:

Expand Down
4 changes: 2 additions & 2 deletions docs/Battery.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ set battery_capacity_critical = 150

## Remaining flight time and flight distance estimation

The estimated remaining flight time and flight distance estimations can be displayed on the OSD (for fixed wing only for the moment). They are calculated from the GPS distance from home, remaining battery capacity and average power draw. They are taking into account the requested altitude change and heading to home change after altitude change following the switch to RTH. They are also taking into account the estimated wind if `osd_use_wind_compensation` is set to `ON`. When the timer and distance indicator reach 0 they will blink and you need to go home in a straight line manually or by engaging RTH. You should be left with at least `rth_energy_margin`% of battery left when arriving home if the cruise speed and power are set correctly (see bellow).
The estimated remaining flight time and flight distance estimations can be displayed on the OSD (for fixed wing only for the moment). They are calculated from the GPS distance from home, remaining battery capacity and average power draw. They are taking into account the requested altitude change and heading to home change after altitude change following the switch to RTH. They are also taking into account the estimated wind if `osd_estimations_wind_compensation` is set to `ON`. When the timer and distance indicator reach 0 they will blink and you need to go home in a straight line manually or by engaging RTH. You should be left with at least `rth_energy_margin`% of battery left when arriving home if the cruise speed and power are set correctly (see bellow).

To use this feature the following conditions need to be met:
- The `VBAT`, `CURRENT_METER` and `GPS` features need to be enabled
Expand All @@ -315,7 +315,7 @@ This features aims to compensate the throttle to get constant thrust with the sa

It is working like this: `used_throttle = requested_throttle * (1 + (battery_full_voltage / sag_compensated_voltage - 1) * thr_comp_weight)`.

The default `thr_comp_weight` of 1 should be close to idal but if you want to tune this feature you need to find the difference in throttle value to achieve the same thrust (same power) when your battery is full and when your battery is almost empty then set `thr_comp_weight` to `(empty_battery_throttle / full_battery_throttle - 1) / (battery_full_voltage / battery_empty_sag_compensated_voltage - 1)`
The default `thr_comp_weight` of 1 should be close to ideal but if you want to tune this feature you need to find the difference in throttle value to achieve the same thrust (same power) when your battery is full and when your battery is almost empty then set `thr_comp_weight` to `(empty_battery_throttle / full_battery_throttle - 1) / (battery_full_voltage / battery_empty_sag_compensated_voltage - 1)`

Example:
If the drawn power is 100W when the battery is full (12.6V) with 53% throttle and the drawn power is 100W with 58% throttle when the battery is almost empty with the sag compensated voltage being 11.0V `thr_comp_weight` needs to be set to this value to compensate the throttle automatically:
Expand Down
106 changes: 106 additions & 0 deletions docs/Board - DALRCF405.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Board - DALRCF405

The DALRCF405 described here:
http://www.dalrcmodel.com/DALRC/plus/view.php?aid=184

This board use the STM32F405RGT6 microcontroller and have the following features:
* 1024K bytes of flash memory,192K bytes RAM,168 MHz CPU/210 DMIPS

* The 16M byte SPI flash for data logging
* USB VCP and boot select button on board(for DFU)
* Stable voltage regulation,9V/2A DCDC BEC for VTX/camera etc.And could select 5v/9v
* Serial LED interface(LED_STRIP)
* VBAT/CURR/RSSI sensors input
* Suppose IRC Tramp/smart audio/FPV Camera Control/FPORT/telemetry
* Supports SBus, Spektrum1024/2048, PPM. No external inverters required (built-in).
* Supports I2C device extend(baro/compass/OLED etc)
* Supports GPS

### Uarts
| Value | Identifier | RX | TX | Notes |
| ----- | ------------ | -----| -----| ------------------------------------------------------------------------------------------- |
| 1 | USART1 | PB7 | PA9 | PB7 FOR SBUS IN(inverter build in) |
| 2 | USART2 | PA3 | PA2 | PAD USE FOR TRAMP/smart audio |
| 3 | USART3 | PB11 | PB10| USE FOR GPS |
| 4 | USART4 | PA1 | PA0 | PA0 FOR RSSI/FPORT/TEL etc |
| 5 | USART5 | PD2 | PC12| PAD |


### I2C with GPS port together.Use for BARO or compass etc
| Value | Identifier | function | pin | Notes |
| ----- | ------------ | ---------| -------| ------------------------------------------------------------------------------------- |
| 1 | I2C1 | SDA | PB9 | with GPS outlet
| 2 | I2C1 | SCL | PB8 | with GPS outlet


### Buzzer/LED output
| Value | Identifier | function | pin | Notes |
| ----- | ------------ | ---------| -------| ------------------------------------------------------------------------------------- |
| 1 | LED0 | LED | PC14 |
| 2 | BEEPER | BEE | PC13 |


### VBAT input with 1/10 divider ratio,Current signal input,Analog/digit RSSI input
| Value | Identifier | function | pin | Notes |
| ----- | ------------ | ----------| ------| ------------------------------------------------------------------------------------- |
| 1 | ADC1 | VBAT | PC2 | DMA2_Stream0
| 2 | ADC1 | CURR | PC1 | DMA2_Stream0
| 3 | ADC1 | RSSI | PA0 | DMA2_Stream0
| 4 | ADC1 | extend | PC0 | DMA2_Stream0 extend for other senser(PAD)


### 8 Outputs, 1 PPM input
| Value | Identifier | function | pin | Notes |
| ----- | ------------ | ----------| ------| ------------------------------------------------------------------------------------- |
| 1 | TIM12_CH2 | PPM | PB15 | PPM
| 2 | TIM3_CH3 | OUPUT1 | PB0 | DMA1_Stream7
| 3 | TIM8_CH1 | OUPUT2 | PC6 | DMA2_Stream2
| 4 | TIM1_CH3 | OUPUT3 | PA10 | DMA2_Stream6
| 5 | TIM1_CH1 | OUPUT4 | PA8 | DMA2_Stream1
| 6 | TIM8_CH3 | OUPUT5 | PC8 | DMA2_Stream4
| 7 | TIM3_CH4 | OUPUT6 | PB1 | DMA1_Stream2
| 8 | TIM3_CH2 | OUPUT7 | PC7 | DMA1_Stream5
| 9 | TIM8_CH4 | OUPUT8 | PC9 | DMA2_Stream7
| 10 | TIM4_CH1 | PWM | PB6 | DMA1_Stream0 LED_STRIP
| 11 | TIM2_CH1 | PWM | PA5 | FPV Camera Control(FCAM)


### Gyro & ACC ,suppose ICM20689/MPU6000
| Value | Identifier | function | pin | Notes |
| ----- | ------------ | ---------| -------| ------------------------------------------------------------------------------------- |
| 1 | SPI1 | SCK | PB3 |
| 2 | SPI1 | MISO | PA6 |
| 3 | SPI1 | MOSI | PA7 |
| 4 | SPI1 | CS | PC4 |

### OSD MAX7456
| Value | Identifier | function | pin | Notes |
| ----- | ------------ | ---------| -------| ------------------------------------------------------------------------------------- |
| 1 | SPI3 | SCK | PC10 |
| 2 | SPI3 | MISO | PC11 |
| 3 | SPI3 | MOSI | PB5 |
| 4 | SPI3 | CS | PA15 |

### 16Mbyte flash
| Value | Identifier | function | pin | Notes |
| ----- | ------------ | ---------| -------| ------------------------------------------------------------------------------------- |
| 1 | SPI2 | SCK | PB13 |
| 2 | SPI2 | MISO | PB14 |
| 3 | SPI2 | MOSI | PC3 |
| 4 | SPI2 | CS | PB12 |

### SWD
| Pin | Function | Notes |
| --- | -------------- | -------------------------------------------- |
| 1 | SWCLK | PAD |
| 2 | Ground | PAD |
| 3 | SWDIO | PAD |
| 4 | 3V3 | PAD |

###Designers
* ZhengNyway(nyway@vip.qq.com) FROM DALRC





Loading

0 comments on commit 65b0ec1

Please sign in to comment.