mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-18 08:54:15 +01:00
Merge remote-tracking branch 'origin/OP-452_InputConfiguration'
This commit is contained in:
commit
d9221fac06
@ -199,17 +199,6 @@ static void manualControlTask(void *parameters)
|
||||
|
||||
if (!ManualControlCommandReadOnly(&cmd)) {
|
||||
|
||||
// Check settings, if error raise alarm
|
||||
if (settings.Roll >= MANUALCONTROLSETTINGS_ROLL_NONE ||
|
||||
settings.Pitch >= MANUALCONTROLSETTINGS_PITCH_NONE ||
|
||||
settings.Yaw >= MANUALCONTROLSETTINGS_YAW_NONE ||
|
||||
settings.Throttle >= MANUALCONTROLSETTINGS_THROTTLE_NONE ||
|
||||
settings.FlightMode >= MANUALCONTROLSETTINGS_FLIGHTMODE_NONE) {
|
||||
AlarmsSet(SYSTEMALARMS_ALARM_MANUALCONTROL, SYSTEMALARMS_ALARM_CRITICAL);
|
||||
cmd.Connected = MANUALCONTROLCOMMAND_CONNECTED_FALSE;
|
||||
ManualControlCommandSet(&cmd);
|
||||
continue;
|
||||
}
|
||||
// Read channel values in us
|
||||
// TODO: settings.InputMode is currently ignored because PIOS will not allow runtime
|
||||
// selection of PWM and PPM. The configuration is currently done at compile time in
|
||||
@ -225,6 +214,18 @@ static void manualControlTask(void *parameters)
|
||||
scaledChannel[n] = scaleChannel(cmd.Channel[n], settings.ChannelMax[n], settings.ChannelMin[n], settings.ChannelNeutral[n], 0);
|
||||
}
|
||||
|
||||
// Check settings, if error raise alarm
|
||||
if (settings.Roll >= MANUALCONTROLSETTINGS_ROLL_NONE ||
|
||||
settings.Pitch >= MANUALCONTROLSETTINGS_PITCH_NONE ||
|
||||
settings.Yaw >= MANUALCONTROLSETTINGS_YAW_NONE ||
|
||||
settings.Throttle >= MANUALCONTROLSETTINGS_THROTTLE_NONE ||
|
||||
settings.FlightMode >= MANUALCONTROLSETTINGS_FLIGHTMODE_NONE) {
|
||||
AlarmsSet(SYSTEMALARMS_ALARM_MANUALCONTROL, SYSTEMALARMS_ALARM_CRITICAL);
|
||||
cmd.Connected = MANUALCONTROLCOMMAND_CONNECTED_FALSE;
|
||||
ManualControlCommandSet(&cmd);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Scale channels to -1 -> +1 range
|
||||
cmd.Roll = scaledChannel[settings.Roll];
|
||||
cmd.Pitch = scaledChannel[settings.Pitch];
|
||||
|
@ -575,9 +575,9 @@ void ConfigInputWidget::updateChannels(UAVObject* controlCommand)
|
||||
QString fieldName = QString("Connected");
|
||||
UAVObjectField *field = controlCommand->getField(fieldName);
|
||||
if (field->getValue().toBool())
|
||||
m_config->RCInputConnected->setText("RC Receiver Connected");
|
||||
m_config->RCInputConnected->setText("RC Receiver connected");
|
||||
else
|
||||
m_config->RCInputConnected->setText("RC Receiver Not Connected");
|
||||
m_config->RCInputConnected->setText("RC Receiver not connected or invalid input configuration (missing channels)");
|
||||
|
||||
if (m_config->doRCInputCalibration->isChecked()) {
|
||||
if (firstUpdate) {
|
||||
|
@ -17,7 +17,7 @@
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
@ -919,10 +919,10 @@ Neutral should be put at the bottom of the slider for the throttle.</string>
|
||||
<widget class="QLabel" name="RCInputConnected">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>250</x>
|
||||
<y>10</y>
|
||||
<width>311</width>
|
||||
<height>20</height>
|
||||
<x>270</x>
|
||||
<y>0</y>
|
||||
<width>251</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
@ -936,7 +936,10 @@ Neutral should be put at the bottom of the slider for the throttle.</string>
|
||||
<string>Indicates whether OpenPilot is getting a signal from the RC receiver.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>RC Receiver Not Connected</string>
|
||||
<string>RC Receiver not connected or invalid input configuration (missing channels)</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QComboBox" name="receiverType">
|
||||
@ -976,17 +979,16 @@ Neutral should be put at the bottom of the slider for the throttle.</string>
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>310</y>
|
||||
<width>531</width>
|
||||
<height>41</height>
|
||||
<width>561</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600; color:#ff0000;">BEWARE: make sure your engines are not connected</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600; color:#ff0000;">when running calibration!</span></p></body></html></string>
|
||||
</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:11pt; font-weight:600; color:#ff0000;">BEWARE: make sure your engines are not connected when running calibration!</span></p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QSlider" name="inSlider0">
|
||||
|
Loading…
x
Reference in New Issue
Block a user