Skip to content

Commit dbe95ae

Browse files
filnetf5soh
authored andcommitted
Merged in filnet/librepilot/LP-109_video_gadget (pull request #454)
LP-109 video gadget Approved-by: Philippe Renon <philippe_renon@yahoo.fr> Approved-by: Lalanne Laurent <f5soh@free.fr> Approved-by: Jan NIJS <dr.oblivium@gmail.com> Approved-by: Brian Webb <webbbn@gmail.com>
2 parents 9d05ed3 + bb05d8c commit dbe95ae

108 files changed

Lines changed: 7221 additions & 82 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.drone.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ build:
99
- if [ $$arch = 32 ]; then target=i686; fi
1010
- if [ $$arch = 64 ]; then target=x86_64; fi
1111
- echo -e "[librepilot-mingw]\nSigLevel = Optional TrustAll\nServer = http://download.librepilot.org/repo/mingw" >> /etc/pacman.conf
12-
- pacman -Syu --noconfirm --noprogressbar --needed git unzip tar mingw-w64-${target}-toolchain mingw-w64-${target}-ccache mingw-w64-${target}-ntldd mingw-w64-${target}-qt5 mingw-w64-${target}-SDL mingw-w64-${target}-mesa mingw-w64-${target}-openssl mingw-w64-${target}-gdal-minimal mingw-w64-${target}-OpenSceneGraph mingw-w64-${target}-osgearth
12+
- pacman -Syu --noconfirm --noprogressbar --needed git unzip tar mingw-w64-${target}-toolchain mingw-w64-${target}-ccache mingw-w64-${target}-ntldd mingw-w64-${target}-qt5 mingw-w64-${target}-SDL mingw-w64-${target}-mesa mingw-w64-${target}-openssl
13+
- pacman -Syu --noconfirm --noprogressbar --needed mingw-w64-${target}-gdal-minimal mingw-w64-${target}-OpenSceneGraph mingw-w64-${target}-osgearth
14+
- pacman -Syu --noconfirm --noprogressbar --needed mingw-w64-${target}-gstreamer mingw-w64-${target}-gst-plugins-base mingw-w64-${target}-gst-plugins-good mingw-w64-${target}-gst-plugins-bad
1315
- mingw32-make all_sdk_install
1416
- git config core.filemode false
1517
- mingw32-make build-info && cat build/build-info.txt

Makefile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,16 +131,22 @@ ifeq ($(UNAME), Linux)
131131
GCS_WITH_OSG := 1
132132
GCS_WITH_OSGEARTH := 1
133133
GCS_COPY_OSG := 0
134+
GCS_WITH_GSTREAMER := 0
135+
GCS_COPY_GSTREAMER := 0
134136
else ifeq ($(UNAME), Darwin)
135137
UAVOBJGENERATOR := $(BUILD_DIR)/uavobjgenerator/uavobjgenerator
136138
GCS_WITH_OSG := 1
137139
GCS_WITH_OSGEARTH := 0
138140
GCS_COPY_OSG := 1
141+
GCS_WITH_GSTREAMER := 0
142+
GCS_COPY_GSTREAMER := 0
139143
else ifeq ($(UNAME), Windows)
140144
UAVOBJGENERATOR := $(BUILD_DIR)/uavobjgenerator/uavobjgenerator.exe
141145
GCS_WITH_OSG := 1
142146
GCS_WITH_OSGEARTH := 1
143147
GCS_COPY_OSG := 1
148+
GCS_WITH_GSTREAMER := 1
149+
GCS_COPY_GSTREAMER := 1
144150
endif
145151

146152
export UAVOBJGENERATOR
@@ -159,6 +165,13 @@ ifeq ($(GCS_WITH_OSG), 1)
159165
endif
160166
endif
161167

168+
ifeq ($(GCS_WITH_GSTREAMER), 1)
169+
GCS_EXTRA_CONF += gstreamer
170+
ifeq ($(GCS_COPY_GSTREAMER), 1)
171+
GCS_EXTRA_CONF += copy_gstreamer
172+
endif
173+
endif
174+
162175
##############################
163176
#
164177
# All targets
@@ -590,6 +603,10 @@ config_help:
590603
@$(ECHO) " (Needed unless using system versions)"
591604
@$(ECHO) " Options: 0 or 1"
592605
@$(ECHO)
606+
@$(ECHO) " GCS_WITH_GSTREAMER=$(GCS_WITH_GSTREAMER)"
607+
@$(ECHO) " Build the GCS with GStreamer support, this enables the video gadget and extra PFD video views"
608+
@$(ECHO) " Options: 0 or 1"
609+
@$(ECHO)
593610
@$(ECHO) " CCACHE=$(CCACHE)"
594611
@$(ECHO) " A prefix to compiler invocations, usually 'ccache' or 'path/to/ccache'"
595612
@$(ECHO)

flight/pios/common/pios_board_io.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,7 @@ void PIOS_BOARD_IO_Configure_GCS_RCVR()
545545
void PIOS_BOARD_IO_Configure_OPLink_RCVR()
546546
{
547547
uint32_t pios_oplinkrcvr_id;
548+
548549
OPLinkReceiverInitialize();
549550
#if defined(PIOS_INCLUDE_RFM22B)
550551
PIOS_OPLinkRCVR_Init(&pios_oplinkrcvr_id, pios_rfm22b_id);

flight/pios/common/pios_ms56xx.c

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@
3434
#define POW2(x) (1 << x)
3535

3636
// Command addresses
37-
#define MS56XX_RESET 0x1E
38-
#define MS56XX_CALIB_ADDR 0xA2 /* First sample is factory stuff */
39-
#define MS56XX_CALIB_LEN 16
40-
#define MS56XX_ADC_READ 0x00
41-
#define MS56XX_PRES_ADDR 0x40
42-
#define MS56XX_TEMP_ADDR 0x50
37+
#define MS56XX_RESET 0x1E
38+
#define MS56XX_CALIB_ADDR 0xA2 /* First sample is factory stuff */
39+
#define MS56XX_CALIB_LEN 16
40+
#define MS56XX_ADC_READ 0x00
41+
#define MS56XX_PRES_ADDR 0x40
42+
#define MS56XX_TEMP_ADDR 0x50
4343

4444
// Option to change the interleave between Temp and Pressure conversions
4545
// Undef for normal operation
@@ -128,7 +128,7 @@ const PIOS_SENSORS_Driver PIOS_MS56xx_Driver = {
128128
*/
129129
void PIOS_MS56xx_Init(const struct pios_ms56xx_cfg *cfg, int32_t i2c_device)
130130
{
131-
i2c_id = i2c_device;
131+
i2c_id = i2c_device;
132132

133133
ms56xx_address = cfg->address;
134134
version = cfg->version;
@@ -262,14 +262,14 @@ int32_t PIOS_MS56xx_ReadADC(void)
262262
// Offset and sensitivity at actual temperature
263263
if (version == MS56XX_VERSION_5611) {
264264
// OFF = OFFT1 + TCO * dT = C2 * 2^16 + (C4 * dT) / 2^7
265-
Offset = ((int64_t)CalibData.C[1]) * POW2(16) + (((int64_t)CalibData.C[3]) * deltaTemp) / POW2(7) - Offset2;
265+
Offset = ((int64_t)CalibData.C[1]) * POW2(16) + (((int64_t)CalibData.C[3]) * deltaTemp) / POW2(7) - Offset2;
266266
// SENS = SENST1 + TCS * dT = C1 * 2^15 + (C3 * dT) / 2^8
267-
Sens = ((int64_t)CalibData.C[0]) * POW2(15) + (((int64_t)CalibData.C[2]) * deltaTemp) / POW2(8) - Sens2;
267+
Sens = ((int64_t)CalibData.C[0]) * POW2(15) + (((int64_t)CalibData.C[2]) * deltaTemp) / POW2(8) - Sens2;
268268
} else {
269269
// OFF = OFFT1 + TCO * dT = C2 * 2^17 + (C4 * dT) / 2^6
270-
Offset = ((int64_t)CalibData.C[1]) * POW2(17) + (((int64_t)CalibData.C[3]) * deltaTemp) / POW2(6) - Offset2;
270+
Offset = ((int64_t)CalibData.C[1]) * POW2(17) + (((int64_t)CalibData.C[3]) * deltaTemp) / POW2(6) - Offset2;
271271
// SENS = SENST1 + TCS * dT = C1 * 2^16 + (C3 * dT) / 2^7
272-
Sens = ((int64_t)CalibData.C[0]) * POW2(16) + (((int64_t)CalibData.C[2]) * deltaTemp) / POW2(7) - Sens2;
272+
Sens = ((int64_t)CalibData.C[0]) * POW2(16) + (((int64_t)CalibData.C[2]) * deltaTemp) / POW2(7) - Sens2;
273273
}
274274

275275
// Temperature compensated pressure (10…1200mbar with 0.01mbar resolution)
@@ -516,10 +516,11 @@ bool PIOS_MS56xx_driver_poll(__attribute__((unused)) uintptr_t context)
516516
}
517517

518518
/* Poll the pressure sensor and return the temperature and pressure. */
519-
bool PIOS_MS56xx_Read(float *temperature, float *pressure) {
519+
bool PIOS_MS56xx_Read(float *temperature, float *pressure)
520+
{
520521
if (PIOS_MS56xx_driver_poll(0)) {
521522
*temperature = results.temperature;
522-
*pressure = results.sample;
523+
*pressure = results.sample;
523524
return true;
524525
}
525526
return false;

flight/pios/common/pios_oplinkrcvr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
#include <pios_oplinkrcvr_priv.h>
3939

4040
// Put receiver in failsafe if not updated within timeout
41-
#define PIOS_OPLINK_RCVR_TIMEOUT_MS 100
41+
#define PIOS_OPLINK_RCVR_TIMEOUT_MS 100
4242

4343
/* Provide a RCVR driver */
4444
static int32_t PIOS_OPLinkRCVR_Get(uint32_t rcvr_id, uint8_t channel);

flight/targets/boards/revolution/pios_board.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
/**
32
******************************************************************************
43
* @addtogroup OpenPilotSystem OpenPilot System

flight/targets/boards/sparky2/pios_board.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
/**
32
******************************************************************************
43
* @addtogroup OpenPilotSystem OpenPilot System

ground/gcs/copydata.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ win32 {
9191

9292
for(dll, QT_DLLS) {
9393
addCopyFileTarget($${dll},$$[QT_INSTALL_BINS],$${GCS_APP_PATH})
94-
win32:addCopyDependenciesTarget($${dll},$$[QT_INSTALL_BINS],$${GCS_APP_PATH})
94+
addCopyDependenciesTarget($${dll},$$[QT_INSTALL_BINS],$${GCS_APP_PATH})
9595
}
9696

9797
# copy OpenSSL DLLs

ground/gcs/src/app/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,10 @@ void systemInit()
280280
QSurfaceFormat format = QSurfaceFormat::defaultFormat();
281281
format.setSwapInterval(0);
282282
QSurfaceFormat::setDefaultFormat(format);
283+
284+
// see https://bugreports.qt.io/browse/QTBUG-40332
285+
int timeout = std::numeric_limits<int>::max();
286+
qputenv("QT_BEARER_POLL_TIMEOUT", QString::number(timeout).toLatin1());
283287
}
284288

285289
static FileLogger *logger = NULL;

ground/gcs/src/libs/extensionsystem/pluginerrorview.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,11 @@ void PluginErrorView::update(PluginSpec *spec)
102102
case PluginSpec::Stopped:
103103
text = tr("Stopped");
104104
tooltip = tr("Plugin was shut down");
105+
break;
105106
case PluginSpec::Deleted:
106107
text = tr("Deleted");
107108
tooltip = tr("Plugin ended its life cycle and was deleted");
109+
break;
108110
}
109111
m_ui->state->setText(text);
110112
m_ui->state->setToolTip(tooltip);

0 commit comments

Comments
 (0)