1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-19 04:52:12 +01:00

LP-72 Uncrustify after rebase

This commit is contained in:
Laurent Lalanne 2016-05-22 16:23:58 +02:00
parent 57bc1725c1
commit afb32d3090
4 changed files with 47 additions and 45 deletions

View File

@ -495,7 +495,7 @@ static void msp_send_analog(struct msp_bridge *m)
// MSP RSSI's range is 0-1023
data.status.rssi = (quality * 1023) / 100;
#ifdef PIOS_INCLUDE_OPLINKRCVR
}
}
#endif /* PIOS_INCLUDE_OPLINKRCVR */
if (data.status.rssi > 1023) {
@ -674,14 +674,14 @@ static void msp_send_pidnames(struct msp_bridge *m)
static void pid_native2msp(const float *native, msp_pid_t *piditem, float scale, unsigned numelem)
{
for(unsigned i = 0; i < numelem; ++i) {
for (unsigned i = 0; i < numelem; ++i) {
piditem->values[i] = lroundf(native[i] * scale);
}
}
static void pid_msp2native(const msp_pid_t *piditem, float *native, float scale, unsigned numelem)
{
for(unsigned i = 0; i < numelem; ++i) {
for (unsigned i = 0; i < numelem; ++i) {
native[i] = (float)piditem->values[i] / scale;
}
}
@ -699,12 +699,13 @@ static UAVObjHandle get_current_pid_bank_handle()
StabilizationSettingsFlightModeMapOptions flightModeMap[STABILIZATIONSETTINGS_FLIGHTMODEMAP_NUMELEM];
StabilizationSettingsFlightModeMapGet(flightModeMap);
switch(flightModeMap[fm])
{
switch (flightModeMap[fm]) {
case STABILIZATIONSETTINGS_FLIGHTMODEMAP_BANK1:
return StabilizationSettingsBank1Handle();
case STABILIZATIONSETTINGS_FLIGHTMODEMAP_BANK2:
return StabilizationSettingsBank2Handle();
case STABILIZATIONSETTINGS_FLIGHTMODEMAP_BANK3:
return StabilizationSettingsBank3Handle();
}
@ -736,7 +737,7 @@ static void msp_send_pid(struct msp_bridge *m)
static void msp_set_pid(struct msp_bridge *m)
{
if(m->current_pid_bank == 0) {
if (m->current_pid_bank == 0) {
return;
}
@ -755,11 +756,11 @@ static void msp_set_pid(struct msp_bridge *m)
bool needSave = true;
if(needSave) {
if (needSave) {
FlightStatusArmedOptions armed;
FlightStatusArmedGet(&armed);
if(armed == FLIGHTSTATUS_ARMED_DISARMED) {
if (armed == FLIGHTSTATUS_ARMED_DISARMED) {
UAVObjSave(m->current_pid_bank, 0);
}
}

View File

@ -620,8 +620,9 @@ QSGNode *OSGViewport::updatePaintNode(QSGNode *node, QQuickItem::UpdatePaintNode
if (!node) {
node = QQuickFramebufferObject::updatePaintNode(node, nodeData);
QSGSimpleTextureNode *n = static_cast<QSGSimpleTextureNode *>(node);
if (n)
if (n) {
n->setTextureCoordinatesTransform(QSGSimpleTextureNode::MirrorVertically);
}
return node;
}
return QQuickFramebufferObject::updatePaintNode(node, nodeData);