1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-29 07:24:13 +01:00

OP-1660 Revert last commit + uncrustify

This commit is contained in:
Laurent Lalanne 2014-12-26 00:00:08 +01:00
parent 4afe6f2e1a
commit 59e461f6ce
3 changed files with 5 additions and 17 deletions

View File

@ -7,7 +7,7 @@ MyListWidget {
Utils--StyledBar { Utils--StyledBar {
background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(0, 0, 0, 255), stop:1 rgba(200, 200, 200, 255)); background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(0, 0, 0, 255), stop:1 rgba(200, 200, 200, 255));
} }
/*
QSlider::groove:horizontal { QSlider::groove:horizontal {
border: 1px solid rgb(196, 196, 196); border: 1px solid rgb(196, 196, 196);
background: white; background: white;
@ -15,7 +15,6 @@ QSlider::groove:horizontal {
border-radius: 2px; border-radius: 2px;
margin 10px 10px; margin 10px 10px;
} }
*/
QSlider::add-page:horizontal { QSlider::add-page:horizontal {
background: #fff; background: #fff;

View File

@ -96,7 +96,7 @@ ConfigInputWidget::ConfigInputWidget(QWidget *parent) :
Q_ASSERT(index < ManualControlSettings::CHANNELGROUPS_NUMELEM); Q_ASSERT(index < ManualControlSettings::CHANNELGROUPS_NUMELEM);
InputChannelForm *form = new InputChannelForm(index, this); InputChannelForm *form = new InputChannelForm(index, this);
form->setName(name); form->setName(name);
form->moveTo(*(ui->channelLayout)); form->moveTo(*(ui->channelLayout));
// The order of the following binding calls is important. Since the values will be populated // The order of the following binding calls is important. Since the values will be populated
@ -1587,9 +1587,9 @@ void ConfigInputWidget::simpleCalibration(bool enable)
for (unsigned int i = 0; i < ManualControlCommand::CHANNEL_NUMELEM; i++) { for (unsigned int i = 0; i < ManualControlCommand::CHANNEL_NUMELEM; i++) {
reverse[i] = manualSettingsData.ChannelMax[i] < manualSettingsData.ChannelMin[i]; reverse[i] = manualSettingsData.ChannelMax[i] < manualSettingsData.ChannelMin[i];
manualSettingsData.ChannelMin[i] = manualCommandData.Channel[i]; manualSettingsData.ChannelMin[i] = manualCommandData.Channel[i];
manualSettingsData.ChannelNeutral[i] = manualCommandData.Channel[i]; manualSettingsData.ChannelNeutral[i] = manualCommandData.Channel[i];
manualSettingsData.ChannelMax[i] = manualCommandData.Channel[i]; manualSettingsData.ChannelMax[i] = manualCommandData.Channel[i];
} }
fastMdataSingle(manualCommandObj, &manualControlMdata); fastMdataSingle(manualCommandObj, &manualControlMdata);
@ -1640,6 +1640,4 @@ bool ConfigInputWidget::shouldObjectBeSaved(UAVObject *object)
{ {
// ManualControlCommand no need to be saved // ManualControlCommand no need to be saved
return dynamic_cast<ManualControlCommand *>(object) == 0; return dynamic_cast<ManualControlCommand *>(object) == 0;
} }

View File

@ -58,15 +58,6 @@ void InputChannelForm::minMaxUpdated()
void InputChannelForm::neutralUpdated() void InputChannelForm::neutralUpdated()
{ {
int neutralValue = ui->neutralValue->value(); int neutralValue = ui->neutralValue->value();
int min = ui->channelMin->value();
int max = ui->channelMax->value();
int tickSpacing = abs((max-min) / 2);
if (ui->channelName->text() == "FlightMode") {
tickSpacing = abs((max-min) / 5);
}
ui->channelNeutral->setTickPosition(QSlider::TicksBothSides);
ui->channelNeutral->setTickInterval(tickSpacing);
if (ui->channelRev->isChecked()) { if (ui->channelRev->isChecked()) {
if (neutralValue > ui->channelMin->value()) { if (neutralValue > ui->channelMin->value()) {