Merge remote-tracking branch 'upstream/next' into filnet/LP-29_osgearth_integration
# Conflicts: # ground/gcs/src/libs/osgearth/osgearth.pro
6
Makefile
@ -147,7 +147,11 @@ include $(ROOT_DIR)/make/tools.mk
|
||||
|
||||
# We almost need to consider autoconf/automake instead of this
|
||||
ifeq ($(UNAME), Linux)
|
||||
QT_SPEC := linux-g++
|
||||
ifeq ($(ARCH), x86_64)
|
||||
QT_SPEC := linux-g++-64
|
||||
else
|
||||
QT_SPEC := linux-g++-32
|
||||
endif
|
||||
UAVOBJGENERATOR := $(BUILD_DIR)/uavobjgenerator/uavobjgenerator
|
||||
else ifeq ($(UNAME), Darwin)
|
||||
QT_SPEC := macx-g++
|
||||
|
@ -2,11 +2,12 @@
|
||||
******************************************************************************
|
||||
*
|
||||
* @file WorldMagModel.c
|
||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
||||
* @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2015.
|
||||
* The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
||||
* @brief Source file for the World Magnetic Model
|
||||
* This is a port of code available from the US NOAA.
|
||||
*
|
||||
* The hard coded coefficients should be valid until 2015.
|
||||
* The hard coded coefficients should be valid until 2020.
|
||||
*
|
||||
* Updated coeffs from ..
|
||||
* http://www.ngdc.noaa.gov/geomag/WMM/wmm_ddownload.shtml
|
||||
@ -60,96 +61,96 @@
|
||||
// first column not used but it will be optimized out by compiler
|
||||
static const float CoeffFile[91][6] = {
|
||||
{ 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f },
|
||||
{ 1.0f, 0.0f, -29496.6f, 0.0f, 11.6f, 0.0f },
|
||||
{ 1.0f, 1.0f, -1586.3f, 4944.4f, 16.5f, -25.9f },
|
||||
{ 2.0f, 0.0f, -2396.6f, 0.0f, -12.1f, 0.0f },
|
||||
{ 2.0f, 1.0f, 3026.1f, -2707.7f, -4.4f, -22.5f },
|
||||
{ 2.0f, 2.0f, 1668.6f, -576.1f, 1.9f, -11.8f },
|
||||
{ 3.0f, 0.0f, 1340.1f, 0.0f, 0.4f, 0.0f },
|
||||
{ 3.0f, 1.0f, -2326.2f, -160.2f, -4.1f, 7.3f },
|
||||
{ 3.0f, 2.0f, 1231.9f, 251.9f, -2.9f, -3.9f },
|
||||
{ 3.0f, 3.0f, 634.0f, -536.6f, -7.7f, -2.6f },
|
||||
{ 4.0f, 0.0f, 912.6f, 0.0f, -1.8f, 0.0f },
|
||||
{ 4.0f, 1.0f, 808.9f, 286.4f, 2.3f, 1.1f },
|
||||
{ 4.0f, 2.0f, 166.7f, -211.2f, -8.7f, 2.7f },
|
||||
{ 4.0f, 3.0f, -357.1f, 164.3f, 4.6f, 3.9f },
|
||||
{ 4.0f, 4.0f, 89.4f, -309.1f, -2.1f, -0.8f },
|
||||
{ 5.0f, 0.0f, -230.9f, 0.0f, -1.0f, 0.0f },
|
||||
{ 5.0f, 1.0f, 357.2f, 44.6f, 0.6f, 0.4f },
|
||||
{ 5.0f, 2.0f, 200.3f, 188.9f, -1.8f, 1.8f },
|
||||
{ 5.0f, 3.0f, -141.1f, -118.2f, -1.0f, 1.2f },
|
||||
{ 5.0f, 4.0f, -163.0f, 0.0f, 0.9f, 4.0f },
|
||||
{ 5.0f, 5.0f, -7.8f, 100.9f, 1.0f, -0.6f },
|
||||
{ 6.0f, 0.0f, 72.8f, 0.0f, -0.2f, 0.0f },
|
||||
{ 6.0f, 1.0f, 68.6f, -20.8f, -0.2f, -0.2f },
|
||||
{ 6.0f, 2.0f, 76.0f, 44.1f, -0.1f, -2.1f },
|
||||
{ 6.0f, 3.0f, -141.4f, 61.5f, 2.0f, -0.4f },
|
||||
{ 6.0f, 4.0f, -22.8f, -66.3f, -1.7f, -0.6f },
|
||||
{ 6.0f, 5.0f, 13.2f, 3.1f, -0.3f, 0.5f },
|
||||
{ 6.0f, 6.0f, -77.9f, 55.0f, 1.7f, 0.9f },
|
||||
{ 7.0f, 0.0f, 80.5f, 0.0f, 0.1f, 0.0f },
|
||||
{ 7.0f, 1.0f, -75.1f, -57.9f, -0.1f, 0.7f },
|
||||
{ 7.0f, 2.0f, -4.7f, -21.1f, -0.6f, 0.3f },
|
||||
{ 7.0f, 3.0f, 45.3f, 6.5f, 1.3f, -0.1f },
|
||||
{ 7.0f, 4.0f, 13.9f, 24.9f, 0.4f, -0.1f },
|
||||
{ 7.0f, 5.0f, 10.4f, 7.0f, 0.3f, -0.8f },
|
||||
{ 7.0f, 6.0f, 1.7f, -27.7f, -0.7f, -0.3f },
|
||||
{ 7.0f, 7.0f, 4.9f, -3.3f, 0.6f, 0.3f },
|
||||
{ 8.0f, 0.0f, 24.4f, 0.0f, -0.1f, 0.0f },
|
||||
{ 8.0f, 1.0f, 8.1f, 11.0f, 0.1f, -0.1f },
|
||||
{ 8.0f, 2.0f, -14.5f, -20.0f, -0.6f, 0.2f },
|
||||
{ 8.0f, 3.0f, -5.6f, 11.9f, 0.2f, 0.4f },
|
||||
{ 8.0f, 4.0f, -19.3f, -17.4f, -0.2f, 0.4f },
|
||||
{ 8.0f, 5.0f, 11.5f, 16.7f, 0.3f, 0.1f },
|
||||
{ 8.0f, 6.0f, 10.9f, 7.0f, 0.3f, -0.1f },
|
||||
{ 8.0f, 7.0f, -14.1f, -10.8f, -0.6f, 0.4f },
|
||||
{ 8.0f, 8.0f, -3.7f, 1.7f, 0.2f, 0.3f },
|
||||
{ 1.0f, 0.0f, -29438.5f, 0.0f, 10.7f, 0.0f },
|
||||
{ 1.0f, 1.0f, -1501.1f, 4796.2f, 17.9f, -26.8f },
|
||||
{ 2.0f, 0.0f, -2445.3f, 0.0f, -8.6f, 0.0f },
|
||||
{ 2.0f, 1.0f, 3012.5f, -2845.6f, -3.3f, -27.1f },
|
||||
{ 2.0f, 2.0f, 1676.6f, -642.0f, 2.4f, -13.3f },
|
||||
{ 3.0f, 0.0f, 1351.1f, 0.0f, 3.1f, 0.0f },
|
||||
{ 3.0f, 1.0f, -2352.3f, -115.3f, -6.2f, 8.4f },
|
||||
{ 3.0f, 2.0f, 1225.6f, 245.0f, -0.4f, -0.4f },
|
||||
{ 3.0f, 3.0f, 581.9f, -538.3f, -10.4f, 2.3f },
|
||||
{ 4.0f, 0.0f, 907.2f, 0.0f, -0.4f, 0.0f },
|
||||
{ 4.0f, 1.0f, 813.7f, 283.4f, 0.8f, -0.6f },
|
||||
{ 4.0f, 2.0f, 120.3f, -188.6f, -9.2f, 5.3f },
|
||||
{ 4.0f, 3.0f, -335.0f, 180.9f, 4.0f, 3.0f },
|
||||
{ 4.0f, 4.0f, 70.3f, -329.5f, -4.2f, -5.3f },
|
||||
{ 5.0f, 0.0f, -232.6f, 0.0f, -0.2f, 0.0f },
|
||||
{ 5.0f, 1.0f, 360.1f, 47.4f, 0.1f, 0.4f },
|
||||
{ 5.0f, 2.0f, 192.4f, 196.9f, -1.4f, 1.6f },
|
||||
{ 5.0f, 3.0f, -141.0f, -119.4f, 0.0f, -1.1f },
|
||||
{ 5.0f, 4.0f, -157.4f, 16.1f, 1.3f, 3.3f },
|
||||
{ 5.0f, 5.0f, 4.3f, 100.1f, 3.8f, 0.1f },
|
||||
{ 6.0f, 0.0f, 69.5f, 0.0f, -0.5f, 0.0f },
|
||||
{ 6.0f, 1.0f, 67.4f, -20.7f, -0.2f, 0.0f },
|
||||
{ 6.0f, 2.0f, 72.8f, 33.2f, -0.6f, -2.2f },
|
||||
{ 6.0f, 3.0f, -129.8f, 58.8f, 2.4f, -0.7f },
|
||||
{ 6.0f, 4.0f, -29.0f, -66.5f, -1.1f, 0.1f },
|
||||
{ 6.0f, 5.0f, 13.2f, 7.3f, 0.3f, 1.0f },
|
||||
{ 6.0f, 6.0f, -70.9f, 62.5f, 1.5f, 1.3f },
|
||||
{ 7.0f, 0.0f, 81.6f, 0.0f, 0.2f, 0.0f },
|
||||
{ 7.0f, 1.0f, -76.1f, -54.1f, -0.2f, 0.7f },
|
||||
{ 7.0f, 2.0f, -6.8f, -19.4f, -0.4f, 0.5f },
|
||||
{ 7.0f, 3.0f, 51.9f, 5.6f, 1.3f, -0.2f },
|
||||
{ 7.0f, 4.0f, 15.0f, 24.4f, 0.2f, -0.1f },
|
||||
{ 7.0f, 5.0f, 9.3f, 3.3f, -0.4f, -0.7f },
|
||||
{ 7.0f, 6.0f, -2.8f, -27.5f, -0.9f, 0.1f },
|
||||
{ 7.0f, 7.0f, 6.7f, -2.3f, 0.3f, 0.1f },
|
||||
{ 8.0f, 0.0f, 24.0f, 0.0f, 0.0f, 0.0f },
|
||||
{ 8.0f, 1.0f, 8.6f, 10.2f, 0.1f, -0.3f },
|
||||
{ 8.0f, 2.0f, -16.9f, -18.1f, -0.5f, 0.3f },
|
||||
{ 8.0f, 3.0f, -3.2f, 13.2f, 0.5f, 0.3f },
|
||||
{ 8.0f, 4.0f, -20.6f, -14.6f, -0.2f, 0.6f },
|
||||
{ 8.0f, 5.0f, 13.3f, 16.2f, 0.4f, -0.1f },
|
||||
{ 8.0f, 6.0f, 11.7f, 5.7f, 0.2f, -0.2f },
|
||||
{ 8.0f, 7.0f, -16.0f, -9.1f, -0.4f, 0.3f },
|
||||
{ 8.0f, 8.0f, -2.0f, 2.2f, 0.3f, 0.0f },
|
||||
{ 9.0f, 0.0f, 5.4f, 0.0f, 0.0f, 0.0f },
|
||||
{ 9.0f, 1.0f, 9.4f, -20.5f, -0.1f, 0.0f },
|
||||
{ 9.0f, 2.0f, 3.4f, 11.5f, 0.0f, -0.2f },
|
||||
{ 9.0f, 3.0f, -5.2f, 12.8f, 0.3f, 0.0f },
|
||||
{ 9.0f, 4.0f, 3.1f, -7.2f, -0.4f, -0.1f },
|
||||
{ 9.0f, 5.0f, -12.4f, -7.4f, -0.3f, 0.1f },
|
||||
{ 9.0f, 6.0f, -0.7f, 8.0f, 0.1f, 0.0f },
|
||||
{ 9.0f, 7.0f, 8.4f, 2.1f, -0.1f, -0.2f },
|
||||
{ 9.0f, 8.0f, -8.5f, -6.1f, -0.4f, 0.3f },
|
||||
{ 9.0f, 9.0f, -10.1f, 7.0f, -0.2f, 0.2f },
|
||||
{ 10.0f, 0.0f, -2.0f, 0.0f, 0.0f, 0.0f },
|
||||
{ 10.0f, 1.0f, -6.3f, 2.8f, 0.0f, 0.1f },
|
||||
{ 10.0f, 2.0f, 0.9f, -0.1f, -0.1f, -0.1f },
|
||||
{ 10.0f, 3.0f, -1.1f, 4.7f, 0.2f, 0.0f },
|
||||
{ 10.0f, 4.0f, -0.2f, 4.4f, 0.0f, -0.1f },
|
||||
{ 10.0f, 5.0f, 2.5f, -7.2f, -0.1f, -0.1f },
|
||||
{ 10.0f, 6.0f, -0.3f, -1.0f, -0.2f, 0.0f },
|
||||
{ 10.0f, 7.0f, 2.2f, -3.9f, 0.0f, -0.1f },
|
||||
{ 10.0f, 8.0f, 3.1f, -2.0f, -0.1f, -0.2f },
|
||||
{ 10.0f, 9.0f, -1.0f, -2.0f, -0.2f, 0.0f },
|
||||
{ 10.0f, 10.0f, -2.8f, -8.3f, -0.2f, -0.1f },
|
||||
{ 11.0f, 0.0f, 3.0f, 0.0f, 0.0f, 0.0f },
|
||||
{ 11.0f, 1.0f, -1.5f, 0.2f, 0.0f, 0.0f },
|
||||
{ 11.0f, 2.0f, -2.1f, 1.7f, 0.0f, 0.1f },
|
||||
{ 11.0f, 3.0f, 1.7f, -0.6f, 0.1f, 0.0f },
|
||||
{ 11.0f, 4.0f, -0.5f, -1.8f, 0.0f, 0.1f },
|
||||
{ 11.0f, 5.0f, 0.5f, 0.9f, 0.0f, 0.0f },
|
||||
{ 11.0f, 6.0f, -0.8f, -0.4f, 0.0f, 0.1f },
|
||||
{ 11.0f, 7.0f, 0.4f, -2.5f, 0.0f, 0.0f },
|
||||
{ 11.0f, 8.0f, 1.8f, -1.3f, 0.0f, -0.1f },
|
||||
{ 11.0f, 9.0f, 0.1f, -2.1f, 0.0f, -0.1f },
|
||||
{ 11.0f, 10.0f, 0.7f, -1.9f, -0.1f, 0.0f },
|
||||
{ 11.0f, 11.0f, 3.8f, -1.8f, 0.0f, -0.1f },
|
||||
{ 12.0f, 0.0f, -2.2f, 0.0f, 0.0f, 0.0f },
|
||||
{ 12.0f, 1.0f, -0.2f, -0.9f, 0.0f, 0.0f },
|
||||
{ 12.0f, 2.0f, 0.3f, 0.3f, 0.1f, 0.0f },
|
||||
{ 12.0f, 3.0f, 1.0f, 2.1f, 0.1f, 0.0f },
|
||||
{ 12.0f, 4.0f, -0.6f, -2.5f, -0.1f, 0.0f },
|
||||
{ 12.0f, 5.0f, 0.9f, 0.5f, 0.0f, 0.0f },
|
||||
{ 12.0f, 6.0f, -0.1f, 0.6f, 0.0f, 0.1f },
|
||||
{ 12.0f, 7.0f, 0.5f, 0.0f, 0.0f, 0.0f },
|
||||
{ 12.0f, 8.0f, -0.4f, 0.1f, 0.0f, 0.0f },
|
||||
{ 12.0f, 9.0f, -0.4f, 0.3f, 0.0f, 0.0f },
|
||||
{ 9.0f, 1.0f, 8.8f, -21.6f, -0.1f, -0.2f },
|
||||
{ 9.0f, 2.0f, 3.1f, 10.8f, -0.1f, -0.1f },
|
||||
{ 9.0f, 3.0f, -3.1f, 11.7f, 0.4f, -0.2f },
|
||||
{ 9.0f, 4.0f, 0.6f, -6.8f, -0.5f, 0.1f },
|
||||
{ 9.0f, 5.0f, -13.3f, -6.9f, -0.2f, 0.1f },
|
||||
{ 9.0f, 6.0f, -0.1f, 7.8f, 0.1f, 0.0f },
|
||||
{ 9.0f, 7.0f, 8.7f, 1.0f, 0.0f, -0.2f },
|
||||
{ 9.0f, 8.0f, -9.1f, -3.9f, -0.2f, 0.4f },
|
||||
{ 9.0f, 9.0f, -10.5f, 8.5f, -0.1f, 0.3f },
|
||||
{ 10.0f, 0.0f, -1.9f, 0.0f, 0.0f, 0.0f },
|
||||
{ 10.0f, 1.0f, -6.5f, 3.3f, 0.0f, 0.1f },
|
||||
{ 10.0f, 2.0f, 0.2f, -0.3f, -0.1f, -0.1f },
|
||||
{ 10.0f, 3.0f, 0.6f, 4.6f, 0.3f, 0.0f },
|
||||
{ 10.0f, 4.0f, -0.6f, 4.4f, -0.1f, 0.0f },
|
||||
{ 10.0f, 5.0f, 1.7f, -7.9f, -0.1f, -0.2f },
|
||||
{ 10.0f, 6.0f, -0.7f, -0.6f, -0.1f, 0.1f },
|
||||
{ 10.0f, 7.0f, 2.1f, -4.1f, 0.0f, -0.1f },
|
||||
{ 10.0f, 8.0f, 2.3f, -2.8f, -0.2f, -0.2f },
|
||||
{ 10.0f, 9.0f, -1.8f, -1.1f, -0.1f, 0.1f },
|
||||
{ 10.0f, 10.0f, -3.6f, -8.7f, -0.2f, -0.1f },
|
||||
{ 11.0f, 0.0f, 3.1f, 0.0f, 0.0f, 0.0f },
|
||||
{ 11.0f, 1.0f, -1.5f, -0.1f, 0.0f, 0.0f },
|
||||
{ 11.0f, 2.0f, -2.3f, 2.1f, -0.1f, 0.1f },
|
||||
{ 11.0f, 3.0f, 2.1f, -0.7f, 0.1f, 0.0f },
|
||||
{ 11.0f, 4.0f, -0.9f, -1.1f, 0.0f, 0.1f },
|
||||
{ 11.0f, 5.0f, 0.6f, 0.7f, 0.0f, 0.0f },
|
||||
{ 11.0f, 6.0f, -0.7f, -0.2f, 0.0f, 0.0f },
|
||||
{ 11.0f, 7.0f, 0.2f, -2.1f, 0.0f, 0.1f },
|
||||
{ 11.0f, 8.0f, 1.7f, -1.5f, 0.0f, 0.0f },
|
||||
{ 11.0f, 9.0f, -0.2f, -2.5f, 0.0f, -0.1f },
|
||||
{ 11.0f, 10.0f, 0.4f, -2.0f, -0.1f, 0.0f },
|
||||
{ 11.0f, 11.0f, 3.5f, -2.3f, -0.1f, -0.1f },
|
||||
{ 12.0f, 0.0f, -2.0f, 0.0f, 0.1f, 0.0f },
|
||||
{ 12.0f, 1.0f, -0.3f, -1.0f, 0.0f, 0.0f },
|
||||
{ 12.0f, 2.0f, 0.4f, 0.5f, 0.0f, 0.0f },
|
||||
{ 12.0f, 3.0f, 1.3f, 1.8f, 0.1f, -0.1f },
|
||||
{ 12.0f, 4.0f, -0.9f, -2.2f, -0.1f, 0.0f },
|
||||
{ 12.0f, 5.0f, 0.9f, 0.3f, 0.0f, 0.0f },
|
||||
{ 12.0f, 6.0f, 0.1f, 0.7f, 0.1f, 0.0f },
|
||||
{ 12.0f, 7.0f, 0.5f, -0.1f, 0.0f, 0.0f },
|
||||
{ 12.0f, 8.0f, -0.4f, 0.3f, 0.0f, 0.0f },
|
||||
{ 12.0f, 9.0f, -0.4f, 0.2f, 0.0f, 0.0f },
|
||||
{ 12.0f, 10.0f, 0.2f, -0.9f, 0.0f, 0.0f },
|
||||
{ 12.0f, 11.0f, -0.8f, -0.2f, -0.1f, 0.0f },
|
||||
{ 12.0f, 12.0f, 0.0f, 0.9f, 0.1f, 0.0f }
|
||||
{ 12.0f, 11.0f, -0.9f, -0.2f, 0.0f, 0.0f },
|
||||
{ 12.0f, 12.0f, 0.0f, 0.7f, 0.0f, 0.0f }
|
||||
};
|
||||
|
||||
static WMMtype_Ellipsoid *Ellip = NULL;
|
||||
@ -190,10 +191,10 @@ int WMM_Initialize()
|
||||
MagneticModel->nMaxSecVar = WMM_MAX_SECULAR_VARIATION_MODEL_DEGREES;
|
||||
MagneticModel->SecularVariationUsed = 0;
|
||||
|
||||
// Really, Really needs to be read from a file - out of date in 2015 at latest
|
||||
// Really, Really needs to be read from a file - out of date in 2020 at latest
|
||||
MagneticModel->EditionDate = 0.0f; /* OP change. Originally 5.7863328170559505e-307, truncates to 0.0f */
|
||||
MagneticModel->epoch = 2010.0f;
|
||||
sprintf(MagneticModel->ModelName, "WMM-2010");
|
||||
MagneticModel->epoch = 2015.0f;
|
||||
sprintf(MagneticModel->ModelName, "WMM-2015");
|
||||
|
||||
return 0; // OK
|
||||
}
|
||||
|
@ -99,8 +99,8 @@ static uint8_t isAssistedFlightMode(uint8_t position);
|
||||
static void applyLPF(float *value, ManualControlSettingsResponseTimeElem channel, ManualControlSettingsResponseTimeData *responseTime, uint8_t deadband, float dT);
|
||||
#endif
|
||||
|
||||
#define RCVR_ACTIVITY_MONITOR_CHANNELS_PER_GROUP 12
|
||||
#define RCVR_ACTIVITY_MONITOR_MIN_RANGE 10
|
||||
#define RCVR_ACTIVITY_MONITOR_CHANNELS_PER_GROUP 18 // Sbus max channel
|
||||
#define RCVR_ACTIVITY_MONITOR_MIN_RANGE 15
|
||||
struct rcvr_activity_fsm {
|
||||
ManualControlSettingsChannelGroupsOptions group;
|
||||
uint16_t prev[RCVR_ACTIVITY_MONITOR_CHANNELS_PER_GROUP];
|
||||
|
@ -114,8 +114,8 @@ typedef struct {
|
||||
#endif /* PIOS_TELEM_PRIORITY_QUEUE */
|
||||
|
||||
// Transmit/receive task handles
|
||||
xTaskHandle txTaskHandle;
|
||||
xTaskHandle rxTaskHandle;
|
||||
xTaskHandle txTaskHandle;
|
||||
xTaskHandle rxTaskHandle;
|
||||
// Telemetry stream
|
||||
UAVTalkConnection uavTalkCon;
|
||||
} channelContext;
|
||||
@ -170,7 +170,6 @@ static void gcsTelemetryStatsUpdated();
|
||||
*/
|
||||
int32_t TelemetryStart(void)
|
||||
{
|
||||
|
||||
#ifdef HAS_RADIO
|
||||
// Only start the local telemetry tasks if needed
|
||||
if (localPort()) {
|
||||
@ -623,7 +622,6 @@ static void telemetryTxTask(void *parameters)
|
||||
processObjEvent(channel, &ev);
|
||||
}
|
||||
#endif /* PIOS_TELEM_PRIORITY_QUEUE */
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@ extern char _efastheap;
|
||||
#undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE
|
||||
|
||||
heap_handle_t sram_heap;
|
||||
#if PIOS_TARGET_PROVIDES_FAST_HEAP
|
||||
#ifdef PIOS_TARGET_PROVIDES_FAST_HEAP
|
||||
heap_handle_t fast_heap;
|
||||
#else
|
||||
#define fast_heap sram_heap
|
||||
@ -131,7 +131,7 @@ void
|
||||
vPortInitialiseBlocks(void)
|
||||
{
|
||||
msheap_init(&sram_heap, &_sheap, &_eheap);
|
||||
#if PIOS_TARGET_PROVIDES_FAST_HEAP
|
||||
#ifdef PIOS_TARGET_PROVIDES_FAST_HEAP
|
||||
msheap_init(&fast_heap, &_sfastheap, &_efastheap);
|
||||
#endif
|
||||
}
|
||||
|
@ -16,12 +16,26 @@ LINKER_SCRIPTS_COMPAT = $(PIOS_DEVLIB)link_$(BOARD)_fw_memory.ld \
|
||||
|
||||
# Compiler options implied by the F4xx
|
||||
CDEFS += -DSTM32F4XX
|
||||
ifeq ($(CHIPFAMILY),STM32F427_437xx)
|
||||
CDEFS += -DPIOS_TARGET_PROVIDES_FAST_HEAP
|
||||
#large heap support must be enabled if SRAM > 128K
|
||||
CDEFS += -DHEAP_SUPPORT_LARGE
|
||||
CDEFS += -DSTM32F427_437xx
|
||||
else
|
||||
ifeq ($(CHIPFAMILY),STM32F429_439xx)
|
||||
CDEFS += -DPIOS_TARGET_PROVIDES_FAST_HEAP
|
||||
#large heap support must be enabled if SRAM > 128K
|
||||
CDEFS += -DHEAP_SUPPORT_LARGE
|
||||
CDEFS += -DSTM32F429_439xx
|
||||
else
|
||||
ifneq ($(CHIPFAMILY),STM32F411xx)
|
||||
CDEFS += -DPIOS_TARGET_PROVIDES_FAST_HEAP
|
||||
CDEFS += -DSTM32F40_41xxx
|
||||
else
|
||||
CDEFS += -DSTM32F411xE
|
||||
endif
|
||||
endif #STM32F429_439xx
|
||||
endif #STM32F427_437xx
|
||||
CDEFS += -DSYSCLK_FREQ=$(SYSCLK_FREQ)
|
||||
CDEFS += -DHSE_VALUE=$(OSCILLATOR_FREQ)
|
||||
CDEFS += -DUSE_STDPERIPH_DRIVER
|
||||
|
9
flight/pios/stm32f4xx/link_STM32F4xx_RQ_bl_memory.ld
Normal file
@ -0,0 +1,9 @@
|
||||
MEMORY
|
||||
{
|
||||
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 0x008000 - 0x000080
|
||||
BD_INFO (r) : ORIGIN = 0x08008000 - 0x80, LENGTH = 0x000080
|
||||
RSVD (rx) : ORIGIN = 0x08008000, LENGTH = 0x020000 - 0x008000
|
||||
FW (rx) : ORIGIN = 0x08020000, LENGTH = 0x1e0000
|
||||
CCSRAM (rw) : ORIGIN = 0x10000000, LENGTH = 0x010000
|
||||
SRAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x030000
|
||||
}
|
9
flight/pios/stm32f4xx/link_STM32F4xx_RQ_fw_memory.ld
Normal file
@ -0,0 +1,9 @@
|
||||
MEMORY
|
||||
{
|
||||
BL (rx) : ORIGIN = 0x08000000, LENGTH = 0x008000 - 0x000080
|
||||
BD_INFO (r) : ORIGIN = 0x08008000 - 0x80, LENGTH = 0x000080
|
||||
RSVD (rx) : ORIGIN = 0x08008000, LENGTH = 0x020000 - 0x008000
|
||||
FLASH (rx) : ORIGIN = 0x08020000, LENGTH = 0x1e0000
|
||||
CCSRAM (rw) : ORIGIN = 0x10000000, LENGTH = 0x010000
|
||||
SRAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x030000
|
||||
}
|
193
flight/pios/stm32f4xx/link_STM32F4xx_RQ_sections.ld
Normal file
@ -0,0 +1,193 @@
|
||||
|
||||
/* Section Definitions */
|
||||
SECTIONS
|
||||
{
|
||||
/*
|
||||
* Vectors, code and constant data.
|
||||
*/
|
||||
.text :
|
||||
{
|
||||
PROVIDE (pios_isr_vector_table_base = .);
|
||||
KEEP(*(.cpu_vectors)) /* CPU exception vectors */
|
||||
KEEP(*(.io_vectors)) /* I/O interrupt vectors */
|
||||
*(.text .text.* .gnu.linkonce.t.*)
|
||||
*(.glue_7t) *(.glue_7)
|
||||
*(.rodata .rodata* .gnu.linkonce.r.*)
|
||||
} > FLASH
|
||||
|
||||
/*
|
||||
* Init section for UAVObjects.
|
||||
*/
|
||||
.initcalluavobj.init :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__uavobj_initcall_start = .;
|
||||
KEEP(*(.initcalluavobj.init))
|
||||
. = ALIGN(4);
|
||||
__uavobj_initcall_end = .;
|
||||
} >FLASH
|
||||
|
||||
/*
|
||||
* Module init section section
|
||||
*/
|
||||
.initcallmodule.init :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__module_initcall_start = .;
|
||||
KEEP(*(.initcallmodule.init))
|
||||
. = ALIGN(4);
|
||||
__module_initcall_end = .;
|
||||
} >FLASH
|
||||
|
||||
/*
|
||||
* C++ exception handling.
|
||||
*/
|
||||
.ARM.extab :
|
||||
{
|
||||
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
||||
} > FLASH
|
||||
.ARM.exidx :
|
||||
{
|
||||
__exidx_start = .;
|
||||
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
|
||||
__exidx_end = .;
|
||||
} > FLASH
|
||||
|
||||
/*
|
||||
* Markers for the end of the 'text' section and the in-flash start of
|
||||
* non-constant data
|
||||
*/
|
||||
. = ALIGN(4);
|
||||
_etext = .;
|
||||
_sidata = .;
|
||||
|
||||
/*
|
||||
* Board info structure, normally only generated by the bootloader but can
|
||||
* be read by the application.
|
||||
*/
|
||||
PROVIDE(pios_board_info_blob = ORIGIN(BD_INFO));
|
||||
.boardinfo :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
KEEP(*(.boardinfo))
|
||||
. = ALIGN(ORIGIN(BD_INFO)+LENGTH(BD_INFO));
|
||||
} > BD_INFO
|
||||
|
||||
/*
|
||||
* Place the IRQ/bootstrap stack at the bottom of SRAM so that an overflow
|
||||
* results in a hard fault.
|
||||
*/
|
||||
.istack (NOLOAD) :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
_irq_stack_end = . ;
|
||||
*(.irqstack)
|
||||
_irq_stack_top = . ;
|
||||
} > CCSRAM
|
||||
|
||||
|
||||
/*
|
||||
* Non-const initialised data.
|
||||
*/
|
||||
.data : AT (_sidata)
|
||||
{
|
||||
. = ALIGN(4);
|
||||
_sdata = .;
|
||||
*(.data .data.*)
|
||||
. = ALIGN(4);
|
||||
_edata = . ;
|
||||
} > SRAM
|
||||
|
||||
/*
|
||||
* Uninitialised data (BSS + commons).
|
||||
*/
|
||||
.bss (NOLOAD) :
|
||||
{
|
||||
_sbss = . ;
|
||||
*(.bss .bss.*)
|
||||
*(COMMON)
|
||||
_ebss = . ;
|
||||
PROVIDE ( _end = _ebss ) ;
|
||||
} > SRAM
|
||||
|
||||
/*
|
||||
* The heap consumes the remainder of the SRAM.
|
||||
*/
|
||||
.heap (NOLOAD) :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
_sheap = . ;
|
||||
|
||||
/*
|
||||
* This allows us to declare an object or objects up to the minimum acceptable
|
||||
* heap size and receive a linker error if the space available for the heap is
|
||||
* not sufficient.
|
||||
*/
|
||||
*(.heap)
|
||||
|
||||
/* extend the heap up to the top of SRAM */
|
||||
. = ORIGIN(SRAM) + LENGTH(SRAM) - ABSOLUTE(_sheap);
|
||||
_eheap = .;
|
||||
} > SRAM
|
||||
|
||||
/*
|
||||
* 'Fast' memory goes in the CCM SRAM
|
||||
*/
|
||||
.fast (NOLOAD) :
|
||||
{
|
||||
_sfast = . ;
|
||||
*(.fast)
|
||||
_efast = . ;
|
||||
} > CCSRAM
|
||||
|
||||
.fastheap (NOLOAD) :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
_sfastheap = . ;
|
||||
|
||||
/*
|
||||
* This allows us to declare an object or objects up to the minimum acceptable
|
||||
* heap size and receive a linker error if the space available for the heap is
|
||||
* not sufficient.
|
||||
*/
|
||||
*(.fastheap)
|
||||
|
||||
/* extend the fastheap up to the top of CCSRAM */
|
||||
. = ORIGIN(CCSRAM) + LENGTH(CCSRAM) - ABSOLUTE(_sfastheap);
|
||||
_efastheap = .;
|
||||
} > CCSRAM
|
||||
|
||||
/* Stabs debugging sections. */
|
||||
.stab 0 : { *(.stab) }
|
||||
.stabstr 0 : { *(.stabstr) }
|
||||
.stab.excl 0 : { *(.stab.excl) }
|
||||
.stab.exclstr 0 : { *(.stab.exclstr) }
|
||||
.stab.index 0 : { *(.stab.index) }
|
||||
.stab.indexstr 0 : { *(.stab.indexstr) }
|
||||
.comment 0 : { *(.comment) }
|
||||
/* DWARF debug sections.
|
||||
Symbols in the DWARF debugging sections are relative to the beginning
|
||||
of the section so we begin them at 0. */
|
||||
/* DWARF 1 */
|
||||
.debug 0 : { *(.debug) }
|
||||
.line 0 : { *(.line) }
|
||||
/* GNU DWARF 1 extensions */
|
||||
.debug_srcinfo 0 : { *(.debug_srcinfo) }
|
||||
.debug_sfnames 0 : { *(.debug_sfnames) }
|
||||
/* DWARF 1.1 and DWARF 2 */
|
||||
.debug_aranges 0 : { *(.debug_aranges) }
|
||||
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||
/* DWARF 2 */
|
||||
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
|
||||
.debug_abbrev 0 : { *(.debug_abbrev) }
|
||||
.debug_line 0 : { *(.debug_line) }
|
||||
.debug_frame 0 : { *(.debug_frame) }
|
||||
.debug_str 0 : { *(.debug_str) }
|
||||
.debug_loc 0 : { *(.debug_loc) }
|
||||
.debug_macinfo 0 : { *(.debug_macinfo) }
|
||||
/* SGI/MIPS DWARF 2 extensions */
|
||||
.debug_weaknames 0 : { *(.debug_weaknames) }
|
||||
.debug_funcnames 0 : { *(.debug_funcnames) }
|
||||
.debug_typenames 0 : { *(.debug_typenames) }
|
||||
.debug_varnames 0 : { *(.debug_varnames) }
|
||||
}
|
176
flight/pios/stm32f4xx/link_STM32F4xx_RQ_sections_compat.ld
Normal file
@ -0,0 +1,176 @@
|
||||
|
||||
/* Section Definitions */
|
||||
SECTIONS
|
||||
{
|
||||
/*
|
||||
* Vectors, code and constant data.
|
||||
*/
|
||||
.text :
|
||||
{
|
||||
PROVIDE (pios_isr_vector_table_base = .);
|
||||
KEEP(*(.cpu_vectors)) /* CPU exception vectors */
|
||||
KEEP(*(.io_vectors)) /* I/O interrupt vectors */
|
||||
*(.text .text.* .gnu.linkonce.t.*)
|
||||
*(.glue_7t) *(.glue_7)
|
||||
*(.rodata .rodata* .gnu.linkonce.r.*)
|
||||
} > FLASH
|
||||
|
||||
/*
|
||||
* Init section for UAVObjects.
|
||||
*/
|
||||
.initcalluavobj.init :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__uavobj_initcall_start = .;
|
||||
KEEP(*(.initcalluavobj.init))
|
||||
. = ALIGN(4);
|
||||
__uavobj_initcall_end = .;
|
||||
} >FLASH
|
||||
|
||||
/*
|
||||
* Module init section section
|
||||
*/
|
||||
.initcallmodule.init :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__module_initcall_start = .;
|
||||
KEEP(*(.initcallmodule.init))
|
||||
. = ALIGN(4);
|
||||
__module_initcall_end = .;
|
||||
} >FLASH
|
||||
|
||||
/*
|
||||
* C++ exception handling.
|
||||
*/
|
||||
.ARM.extab :
|
||||
{
|
||||
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
||||
} > FLASH
|
||||
.ARM.exidx :
|
||||
{
|
||||
__exidx_start = .;
|
||||
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
|
||||
__exidx_end = .;
|
||||
} > FLASH
|
||||
|
||||
/*
|
||||
* Markers for the end of the 'text' section and the in-flash start of
|
||||
* non-constant data
|
||||
*/
|
||||
. = ALIGN(4);
|
||||
_etext = .;
|
||||
_sidata = .;
|
||||
|
||||
/*
|
||||
* Board info structure, normally only generated by the bootloader but can
|
||||
* be read by the application.
|
||||
*/
|
||||
PROVIDE(pios_board_info_blob = ORIGIN(BD_INFO));
|
||||
.boardinfo :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
KEEP(*(.boardinfo))
|
||||
. = ALIGN(ORIGIN(BD_INFO)+LENGTH(BD_INFO));
|
||||
} > BD_INFO
|
||||
|
||||
/*
|
||||
* Place the IRQ/bootstrap stack at the bottom of SRAM so that an overflow
|
||||
* results in a hard fault.
|
||||
*/
|
||||
.istack (NOLOAD) :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
_irq_stack_end = . ;
|
||||
*(.irqstack)
|
||||
_irq_stack_top = . ;
|
||||
} > SRAM
|
||||
|
||||
|
||||
/*
|
||||
* Non-const initialised data.
|
||||
*/
|
||||
.data : AT (_sidata)
|
||||
{
|
||||
. = ALIGN(4);
|
||||
_sdata = .;
|
||||
*(.data .data.*)
|
||||
. = ALIGN(4);
|
||||
_edata = . ;
|
||||
} > SRAM
|
||||
|
||||
/*
|
||||
* Uninitialised data (BSS + commons).
|
||||
*/
|
||||
.bss (NOLOAD) :
|
||||
{
|
||||
_sbss = . ;
|
||||
*(.bss .bss.*)
|
||||
*(COMMON)
|
||||
_ebss = . ;
|
||||
PROVIDE ( _end = _ebss ) ;
|
||||
} > SRAM
|
||||
|
||||
/*
|
||||
* The heap consumes the remainder of the SRAM.
|
||||
*/
|
||||
.heap (NOLOAD) :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
_sheap = . ;
|
||||
|
||||
/*
|
||||
* This allows us to declare an object or objects up to the minimum acceptable
|
||||
* heap size and receive a linker error if the space available for the heap is
|
||||
* not sufficient.
|
||||
*/
|
||||
*(.heap)
|
||||
|
||||
/* extend the heap up to the top of SRAM */
|
||||
. = ORIGIN(SRAM) + LENGTH(SRAM) - ABSOLUTE(_sheap);
|
||||
_eheap = .;
|
||||
} > SRAM
|
||||
|
||||
/*
|
||||
* 'Fast' memory goes in the CCM SRAM
|
||||
*/
|
||||
.fast (NOLOAD) :
|
||||
{
|
||||
_sfast = . ;
|
||||
*(.fast)
|
||||
_efast = . ;
|
||||
} > CCSRAM
|
||||
|
||||
/* Stabs debugging sections. */
|
||||
.stab 0 : { *(.stab) }
|
||||
.stabstr 0 : { *(.stabstr) }
|
||||
.stab.excl 0 : { *(.stab.excl) }
|
||||
.stab.exclstr 0 : { *(.stab.exclstr) }
|
||||
.stab.index 0 : { *(.stab.index) }
|
||||
.stab.indexstr 0 : { *(.stab.indexstr) }
|
||||
.comment 0 : { *(.comment) }
|
||||
/* DWARF debug sections.
|
||||
Symbols in the DWARF debugging sections are relative to the beginning
|
||||
of the section so we begin them at 0. */
|
||||
/* DWARF 1 */
|
||||
.debug 0 : { *(.debug) }
|
||||
.line 0 : { *(.line) }
|
||||
/* GNU DWARF 1 extensions */
|
||||
.debug_srcinfo 0 : { *(.debug_srcinfo) }
|
||||
.debug_sfnames 0 : { *(.debug_sfnames) }
|
||||
/* DWARF 1.1 and DWARF 2 */
|
||||
.debug_aranges 0 : { *(.debug_aranges) }
|
||||
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||
/* DWARF 2 */
|
||||
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
|
||||
.debug_abbrev 0 : { *(.debug_abbrev) }
|
||||
.debug_line 0 : { *(.debug_line) }
|
||||
.debug_frame 0 : { *(.debug_frame) }
|
||||
.debug_str 0 : { *(.debug_str) }
|
||||
.debug_loc 0 : { *(.debug_loc) }
|
||||
.debug_macinfo 0 : { *(.debug_macinfo) }
|
||||
/* SGI/MIPS DWARF 2 extensions */
|
||||
.debug_weaknames 0 : { *(.debug_weaknames) }
|
||||
.debug_funcnames 0 : { *(.debug_funcnames) }
|
||||
.debug_typenames 0 : { *(.debug_typenames) }
|
||||
.debug_varnames 0 : { *(.debug_varnames) }
|
||||
}
|
@ -119,6 +119,66 @@ static struct device_flash_sector flash_sectors[] = {
|
||||
.size = 128 * 1024,
|
||||
.st_sector = FLASH_Sector_11,
|
||||
},
|
||||
[12] = {
|
||||
.start = 0x08100000,
|
||||
.size = 16 * 1024,
|
||||
.st_sector = FLASH_Sector_12,
|
||||
},
|
||||
[13] = {
|
||||
.start = 0x08104000,
|
||||
.size = 16 * 1024,
|
||||
.st_sector = FLASH_Sector_13,
|
||||
},
|
||||
[14] = {
|
||||
.start = 0x08108000,
|
||||
.size = 16 * 1024,
|
||||
.st_sector = FLASH_Sector_14,
|
||||
},
|
||||
[15] = {
|
||||
.start = 0x0810C000,
|
||||
.size = 16 * 1024,
|
||||
.st_sector = FLASH_Sector_15,
|
||||
},
|
||||
[16] = {
|
||||
.start = 0x08110000,
|
||||
.size = 64 * 1024,
|
||||
.st_sector = FLASH_Sector_16,
|
||||
},
|
||||
[17] = {
|
||||
.start = 0x08120000,
|
||||
.size = 128 * 1024,
|
||||
.st_sector = FLASH_Sector_17,
|
||||
},
|
||||
[18] = {
|
||||
.start = 0x08140000,
|
||||
.size = 128 * 1024,
|
||||
.st_sector = FLASH_Sector_18,
|
||||
},
|
||||
[19] = {
|
||||
.start = 0x08160000,
|
||||
.size = 128 * 1024,
|
||||
.st_sector = FLASH_Sector_19,
|
||||
},
|
||||
[20] = {
|
||||
.start = 0x08180000,
|
||||
.size = 128 * 1024,
|
||||
.st_sector = FLASH_Sector_20,
|
||||
},
|
||||
[21] = {
|
||||
.start = 0x081A0000,
|
||||
.size = 128 * 1024,
|
||||
.st_sector = FLASH_Sector_21,
|
||||
},
|
||||
[22] = {
|
||||
.start = 0x081C0000,
|
||||
.size = 128 * 1024,
|
||||
.st_sector = FLASH_Sector_22,
|
||||
},
|
||||
[23] = {
|
||||
.start = 0x081E0000,
|
||||
.size = 128 * 1024,
|
||||
.st_sector = FLASH_Sector_23,
|
||||
},
|
||||
};
|
||||
|
||||
static bool PIOS_BL_HELPER_FLASH_GetSectorInfo(uint32_t address, uint8_t *sector_number, uint32_t *sector_start, uint32_t *sector_size)
|
||||
@ -178,7 +238,19 @@ static bool erase_flash(uint32_t startAddress, uint32_t endAddress)
|
||||
PIOS_Assert(0);
|
||||
}
|
||||
for (int retry = 0; retry < MAX_DEL_RETRYS; ++retry) {
|
||||
if (FLASH_EraseSector(sector_number, VoltageRange_3) == FLASH_COMPLETE) {
|
||||
// if erasing area contain whole bank2 area, using bank erase
|
||||
// bank2: sector 12 to sector 23
|
||||
if (sector_start == flash_sectors[12].start &&
|
||||
endAddress >= (flash_sectors[23].start + flash_sectors[23].size)) {
|
||||
if (FLASH_EraseAllBank2Sectors(VoltageRange_3) == FLASH_COMPLETE) {
|
||||
fail = false;
|
||||
// using bank2 total size substitute sector_size
|
||||
sector_size = flash_sectors[23].start - flash_sectors[12].start + flash_sectors[23].size;
|
||||
break;
|
||||
} else {
|
||||
fail = true;
|
||||
}
|
||||
} else if (FLASH_EraseSector(sector_number, VoltageRange_3) == FLASH_COMPLETE) {
|
||||
fail = false;
|
||||
break;
|
||||
} else {
|
||||
|
@ -100,6 +100,66 @@ static struct device_flash_sector flash_sectors[] = {
|
||||
.size = 128 * 1024,
|
||||
.st_sector = FLASH_Sector_11,
|
||||
},
|
||||
[12] = {
|
||||
.start = 0x08100000,
|
||||
.size = 16 * 1024,
|
||||
.st_sector = FLASH_Sector_12,
|
||||
},
|
||||
[13] = {
|
||||
.start = 0x08104000,
|
||||
.size = 16 * 1024,
|
||||
.st_sector = FLASH_Sector_13,
|
||||
},
|
||||
[14] = {
|
||||
.start = 0x08108000,
|
||||
.size = 16 * 1024,
|
||||
.st_sector = FLASH_Sector_14,
|
||||
},
|
||||
[15] = {
|
||||
.start = 0x0810C000,
|
||||
.size = 16 * 1024,
|
||||
.st_sector = FLASH_Sector_15,
|
||||
},
|
||||
[16] = {
|
||||
.start = 0x08110000,
|
||||
.size = 64 * 1024,
|
||||
.st_sector = FLASH_Sector_16,
|
||||
},
|
||||
[17] = {
|
||||
.start = 0x08120000,
|
||||
.size = 128 * 1024,
|
||||
.st_sector = FLASH_Sector_17,
|
||||
},
|
||||
[18] = {
|
||||
.start = 0x08140000,
|
||||
.size = 128 * 1024,
|
||||
.st_sector = FLASH_Sector_18,
|
||||
},
|
||||
[19] = {
|
||||
.start = 0x08160000,
|
||||
.size = 128 * 1024,
|
||||
.st_sector = FLASH_Sector_19,
|
||||
},
|
||||
[20] = {
|
||||
.start = 0x08180000,
|
||||
.size = 128 * 1024,
|
||||
.st_sector = FLASH_Sector_20,
|
||||
},
|
||||
[21] = {
|
||||
.start = 0x081A0000,
|
||||
.size = 128 * 1024,
|
||||
.st_sector = FLASH_Sector_21,
|
||||
},
|
||||
[22] = {
|
||||
.start = 0x081C0000,
|
||||
.size = 128 * 1024,
|
||||
.st_sector = FLASH_Sector_22,
|
||||
},
|
||||
[23] = {
|
||||
.start = 0x081E0000,
|
||||
.size = 128 * 1024,
|
||||
.st_sector = FLASH_Sector_23,
|
||||
},
|
||||
};
|
||||
|
||||
static bool PIOS_Flash_Internal_GetSectorInfo(uint32_t address, uint8_t *sector_number, uint32_t *sector_start, uint32_t *sector_size)
|
||||
|
@ -74,7 +74,7 @@ void PIOS_SYS_Init(void)
|
||||
RCC_AHB1Periph_GPIOC |
|
||||
RCC_AHB1Periph_GPIOD |
|
||||
RCC_AHB1Periph_GPIOE |
|
||||
#ifdef STM32F40_41xxx
|
||||
#if defined(STM32F40_41xxx) || defined(STM32F427_437xx) || defined(STM32F429_439xx)
|
||||
RCC_AHB1Periph_GPIOF |
|
||||
RCC_AHB1Periph_GPIOG |
|
||||
RCC_AHB1Periph_GPIOH |
|
||||
@ -85,6 +85,9 @@ void PIOS_SYS_Init(void)
|
||||
RCC_AHB1Periph_SRAM1 |
|
||||
RCC_AHB1Periph_SRAM2 |
|
||||
RCC_AHB1Periph_BKPSRAM |
|
||||
#if defined(STM32F427_437xx) || defined(STM32F429_439xx)
|
||||
RCC_AHB1Periph_SRAM3 |
|
||||
#endif
|
||||
RCC_AHB1Periph_DMA1 |
|
||||
RCC_AHB1Periph_DMA2 |
|
||||
// RCC_AHB1Periph_ETH_MAC | No ethernet
|
||||
@ -171,7 +174,7 @@ void PIOS_SYS_Init(void)
|
||||
GPIO_Init(GPIOD, &GPIO_InitStructure);
|
||||
GPIO_Init(GPIOE, &GPIO_InitStructure);
|
||||
|
||||
#ifdef STM32F40_41xxx
|
||||
#if defined(STM32F40_41xxx) || defined(STM32F427_437xx) || defined(STM32F429_439xx)
|
||||
GPIO_Init(GPIOF, &GPIO_InitStructure);
|
||||
GPIO_Init(GPIOG, &GPIO_InitStructure);
|
||||
GPIO_Init(GPIOH, &GPIO_InitStructure);
|
||||
|
@ -28,10 +28,12 @@ equals(copyqt, 1) {
|
||||
libQt5QuickParticles.so.5 \
|
||||
libQt5XcbQpa.so.5 \
|
||||
libQt5X11Extras.so.5 \
|
||||
libqgsttools_p.so.1 \
|
||||
libicui18n.so.54 \
|
||||
libicuuc.so.54 \
|
||||
libicudata.so.54
|
||||
*-64 {
|
||||
QT_LIBS += libqgsttools_p.so.1
|
||||
}
|
||||
for(lib, QT_LIBS) {
|
||||
addCopyFileTarget($${lib},$$[QT_INSTALL_LIBS],$${GCS_QT_LIBRARY_PATH})
|
||||
}
|
||||
@ -43,11 +45,16 @@ equals(copyqt, 1) {
|
||||
imageformats/libqmng.so \
|
||||
imageformats/libqsvg.so \
|
||||
imageformats/libqtiff.so \
|
||||
mediaservice/libgstaudiodecoder.so \
|
||||
mediaservice/libgstmediaplayer.so \
|
||||
platforms/libqxcb.so \
|
||||
xcbglintegrations/libqxcb-glx-integration.so \
|
||||
sqldrivers/libqsqlite.so
|
||||
*-32 {
|
||||
QT_PLUGINS += mediaservice/libqtmedia_audioengine.so
|
||||
}
|
||||
*-64 {
|
||||
QT_PLUGINS += mediaservice/libgstaudiodecoder.so \
|
||||
mediaservice/libgstmediaplayer.so
|
||||
}
|
||||
}
|
||||
|
||||
win32 {
|
||||
|
@ -209,6 +209,11 @@ inline QString msgSendArgumentFailed()
|
||||
"Unable to send command line arguments to the already running instance. It appears to be not responding.");
|
||||
}
|
||||
|
||||
inline QString msgLogfileOpenFailed(const QString &fileName)
|
||||
{
|
||||
return QCoreApplication::translate("Application", "Failed to open log file %1").arg(fileName);
|
||||
}
|
||||
|
||||
// Prepare a remote argument: If it is a relative file, add the current directory
|
||||
// since the the central instance might be running in a different directory.
|
||||
inline QString prepareRemoteArgument(const QString &arg)
|
||||
@ -313,7 +318,7 @@ void logInit(QString fileName)
|
||||
logStream = new QTextStream(file);
|
||||
qInstallMessageHandler(mainMessageOutput);
|
||||
} else {
|
||||
// TODO error popup
|
||||
displayError(msgLogfileOpenFailed(fileName));
|
||||
}
|
||||
}
|
||||
|
||||
@ -426,16 +431,19 @@ void loadTranslators(QString language, QTranslator &translator, QTranslator &qtT
|
||||
const QString &creatorTrPath = Utils::GetDataPath() + QLatin1String("translations");
|
||||
|
||||
if (translator.load(QLatin1String("gcs_") + language, creatorTrPath)) {
|
||||
// Install gcs_xx.qm translation file
|
||||
QCoreApplication::installTranslator(&translator);
|
||||
|
||||
const QString &qtTrPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
|
||||
const QString &qtTrFile = QLatin1String("qt_") + language;
|
||||
// Binary installer puts Qt tr files into creatorTrPath
|
||||
if (qtTranslator.load(qtTrFile, qtTrPath) || qtTranslator.load(qtTrFile, creatorTrPath)) {
|
||||
QCoreApplication::installTranslator(&translator);
|
||||
// Install main qt_xx.qm translation file
|
||||
QCoreApplication::installTranslator(&qtTranslator);
|
||||
} else {
|
||||
// unload()
|
||||
translator.load(QString());
|
||||
}
|
||||
} else {
|
||||
// unload(), no gcs translation found
|
||||
translator.load(QString());
|
||||
}
|
||||
}
|
||||
} // namespace anonymous
|
||||
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 66 KiB |
@ -9,10 +9,10 @@ equals(copyosg, 1) {
|
||||
# copy osg libraries
|
||||
|
||||
data_copy.commands += $(MKDIR) $${GCS_LIBRARY_PATH}/osg $$addNewline()
|
||||
exists( $${OSG_SDK_DIR}/lib64 ) {
|
||||
*-64 {
|
||||
data_copy.commands += $(COPY_DIR) $$shell_quote($$OSG_SDK_DIR/lib64/)* $$shell_quote($$GCS_LIBRARY_PATH/osg/)
|
||||
}
|
||||
else {
|
||||
*-32 {
|
||||
data_copy.commands += $(COPY_DIR) $$shell_quote($$OSG_SDK_DIR/lib/)* $$shell_quote($$GCS_LIBRARY_PATH/osg/)
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,6 @@ private:
|
||||
QList<double> x_accum, y_accum, z_accum;
|
||||
QList<double> x_gyro_accum, y_gyro_accum, z_gyro_accum;
|
||||
|
||||
static const float DEFAULT_ENABLED_ACCEL_TAU = 0.1;
|
||||
static const int NUM_SENSOR_UPDATES = 300;
|
||||
protected:
|
||||
virtual void enableControls(bool enable);
|
||||
|
@ -275,7 +275,7 @@ void ConfigStabilizationWidget::updateThrottleCurveFromObject()
|
||||
field = stabBank->getField("EnableThrustPIDScaling");
|
||||
Q_ASSERT(field);
|
||||
|
||||
bool enabled = field->getValue() == "TRUE";
|
||||
bool enabled = field->getValue() == "True";
|
||||
ui->enableThrustPIDScalingCheckBox->setChecked(enabled);
|
||||
ui->thrustPIDScalingCurve->setEnabled(enabled);
|
||||
setDirty(dirty);
|
||||
@ -297,7 +297,7 @@ void ConfigStabilizationWidget::updateObjectFromThrottleCurve()
|
||||
|
||||
field = stabBank->getField("EnableThrustPIDScaling");
|
||||
Q_ASSERT(field);
|
||||
field->setValue(ui->enableThrustPIDScalingCheckBox->isChecked() ? "TRUE" : "FALSE");
|
||||
field->setValue(ui->enableThrustPIDScalingCheckBox->isChecked() ? "True" : "False");
|
||||
}
|
||||
|
||||
void ConfigStabilizationWidget::setupExpoPlot()
|
||||
@ -371,7 +371,7 @@ void ConfigStabilizationWidget::resetThrottleCurveToDefault()
|
||||
field = defaultStabBank->getField("EnableThrustPIDScaling");
|
||||
Q_ASSERT(field);
|
||||
|
||||
bool enabled = field->getValue() == "TRUE";
|
||||
bool enabled = field->getValue() == "True";
|
||||
ui->enableThrustPIDScalingCheckBox->setChecked(enabled);
|
||||
ui->thrustPIDScalingCurve->setEnabled(enabled);
|
||||
|
||||
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 173 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 153 KiB After Width: | Height: | Size: 155 KiB |
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 89 KiB |
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 63 KiB |
Before Width: | Height: | Size: 112 KiB After Width: | Height: | Size: 114 KiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 178 KiB After Width: | Height: | Size: 179 KiB |
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 121 KiB |
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 78 KiB |
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 82 KiB |
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 73 KiB |
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 81 KiB |
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 69 KiB |
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 119 KiB |
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 499 B After Width: | Height: | Size: 508 B |
Before Width: | Height: | Size: 866 B After Width: | Height: | Size: 869 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1019 B |
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 7.0 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 756 B After Width: | Height: | Size: 816 B |
Before Width: | Height: | Size: 601 B After Width: | Height: | Size: 632 B |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 119 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 183 KiB After Width: | Height: | Size: 133 KiB |
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 146 KiB After Width: | Height: | Size: 149 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 34 KiB |
@ -143,10 +143,10 @@ void InputChannelForm::groupUpdated()
|
||||
count = 0;
|
||||
break;
|
||||
case ManualControlSettings::CHANNELGROUPS_PWM:
|
||||
case ManualControlSettings::CHANNELGROUPS_OPLINK:
|
||||
count = 8; // Need to make this 6 for CC
|
||||
break;
|
||||
case ManualControlSettings::CHANNELGROUPS_PPM:
|
||||
case ManualControlSettings::CHANNELGROUPS_OPLINK:
|
||||
case ManualControlSettings::CHANNELGROUPS_DSMMAINPORT:
|
||||
case ManualControlSettings::CHANNELGROUPS_DSMFLEXIPORT:
|
||||
count = 12;
|
||||
|
@ -64,6 +64,5 @@
|
||||
<file>qml/images/tab.png</file>
|
||||
<file>qml/AboutDialog.qml</file>
|
||||
<file alias="qml/AuthorsModel.qml">../../../../../build/gcs-synthetics/AuthorsModel.qml</file>
|
||||
<file>images/opie_90x120.gif</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 935 B |
Before Width: | Height: | Size: 713 B After Width: | Height: | Size: 721 B |
Before Width: | Height: | Size: 298 B After Width: | Height: | Size: 304 B |
Before Width: | Height: | Size: 288 B After Width: | Height: | Size: 330 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 469 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 360 B |
Before Width: | Height: | Size: 635 B After Width: | Height: | Size: 695 B |
Before Width: | Height: | Size: 319 B After Width: | Height: | Size: 354 B |
Before Width: | Height: | Size: 862 B After Width: | Height: | Size: 905 B |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 172 B After Width: | Height: | Size: 175 B |
Before Width: | Height: | Size: 678 B After Width: | Height: | Size: 688 B |
Before Width: | Height: | Size: 345 B After Width: | Height: | Size: 354 B |
Before Width: | Height: | Size: 977 B After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 737 B After Width: | Height: | Size: 769 B |
Before Width: | Height: | Size: 828 B After Width: | Height: | Size: 864 B |
Before Width: | Height: | Size: 456 B After Width: | Height: | Size: 462 B |
Before Width: | Height: | Size: 832 B After Width: | Height: | Size: 896 B |