From 93fb2d588a7a52c9e5e3327de8de1e38bb584bfb Mon Sep 17 00:00:00 2001 From: James Duley Date: Wed, 25 Feb 2015 13:52:54 +1300 Subject: [PATCH 1/8] fix some artwork permissions part 2 --- .../models/multi/blackout/BlackoutMiniHQuad.3DS | Bin .../models/multi/blackout/BlackoutMiniHQuad.jpg | Bin 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 ground/openpilotgcs/share/openpilotgcs/models/multi/blackout/BlackoutMiniHQuad.3DS mode change 100755 => 100644 ground/openpilotgcs/share/openpilotgcs/models/multi/blackout/BlackoutMiniHQuad.jpg diff --git a/ground/openpilotgcs/share/openpilotgcs/models/multi/blackout/BlackoutMiniHQuad.3DS b/ground/openpilotgcs/share/openpilotgcs/models/multi/blackout/BlackoutMiniHQuad.3DS old mode 100755 new mode 100644 diff --git a/ground/openpilotgcs/share/openpilotgcs/models/multi/blackout/BlackoutMiniHQuad.jpg b/ground/openpilotgcs/share/openpilotgcs/models/multi/blackout/BlackoutMiniHQuad.jpg old mode 100755 new mode 100644 From 2ea025a4c2c41ff18f7db6fef588110d656de7f2 Mon Sep 17 00:00:00 2001 From: samguns Date: Wed, 25 Feb 2015 14:11:28 +0800 Subject: [PATCH 2/8] OP-1746 Revise some translations after testing in 15.02-RC1 --- .../translations/openpilotgcs_zh_CN.ts | 142 ++++++++++++++---- 1 file changed, 111 insertions(+), 31 deletions(-) diff --git a/ground/openpilotgcs/share/openpilotgcs/translations/openpilotgcs_zh_CN.ts b/ground/openpilotgcs/share/openpilotgcs/translations/openpilotgcs_zh_CN.ts index 40450ef19..e982fb63a 100644 --- a/ground/openpilotgcs/share/openpilotgcs/translations/openpilotgcs_zh_CN.ts +++ b/ground/openpilotgcs/share/openpilotgcs/translations/openpilotgcs_zh_CN.ts @@ -1610,7 +1610,12 @@ 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-family:'Sans'; font-size:10pt;">Beware! Check </span><span style=" font-family:'Sans'; font-size:10pt; font-weight:600;">all three</span><span style=" font-family:'Sans'; font-size:10pt;"> checkboxes to test Feed Forward.</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-family:'Sans'; font-size:10pt;">It will run only if your airframe armed.</span></p></body></html> - + <!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-family:'Sans'; font-size:10pt;">注意!勾选</span><span style=" font-family:'Sans'; font-size:10pt; font-weight:600;">全部三个</span><span style=" font-family:'Sans'; font-size:10pt;">多选框以确认继续操作。</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-family:'Sans'; font-size:10pt;">只有当飞行器解锁以后才能生效。</span></p></body></html> @@ -1672,7 +1677,7 @@ p, li { white-space: pre-wrap; } <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></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-family:'Lucida Grande'; font-size:13pt;">Beware: Feed Forward Tuning will launch all engines around mid-throttle, you have been warned!</span></p> <p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Lucida Grande'; font-size:13pt;">Remove your props initially, and for fine-tuning, make sure your airframe is safely held in place. Wear glasses and protect your face and body.</span></p></td></tr></table></body></html> - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + <!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;"> @@ -2030,7 +2035,7 @@ p, li { white-space: pre-wrap; } Telemetry - + @@ -2525,12 +2530,12 @@ p, li { white-space: pre-wrap; } settings - 配置 + 设置 IP Network Telemetry - + @@ -5402,7 +5407,7 @@ The same value is used for all axes. Messages - + 信息 @@ -5412,7 +5417,7 @@ The same value is used for all axes. Telemetry speed: - 管理端口速率: + Telemetry波特率: @@ -5437,7 +5442,7 @@ The same value is used for all axes. USB VCP Port - + USB VCP端口 RcvrPort @@ -5575,7 +5580,8 @@ A setting of 0.00 disables the filter. 过滤加速度传感器偏移误差。 设置适当的阙值可以有效过滤传感器偏移误差,提升飞行器自稳性能。 -范围:0.00到0.20,通常设置在0.05至0.10区间比较好 +范围:0.00到0.20,通常可以尝试从0.05至0.10区间开始, +逐渐提高,直到偏移消除。 设定0.00关闭该功能。 @@ -5916,7 +5922,7 @@ p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; 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;">姿态校准</span></p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:11pt; font-weight:600;"><br /></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-family:'Ubuntu'; font-size:11pt;">当前未检测到任何OpenPilot设备,请将设备通过管理端口与GCS连接后开始进行校准。</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-family:'Ubuntu'; font-size:11pt;">当前未检测到任何OpenPilot设备,请将设备通过USB端口或telemetry与GCS连接后开始进行校准。</span></p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:11pt;"><br /></p></body></html> @@ -5943,7 +5949,7 @@ p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; 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;">硬件设置</span></p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:11pt; font-weight:600;"><br /></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-family:'Ubuntu'; font-size:11pt;">当前未检测到任何OpenPilot设备,请将设备通过管理端口与GCS连接。</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-family:'Ubuntu'; font-size:11pt;">当前未检测到任何OpenPilot设备,请将设备通过USB端口或Telemetry与GCS连接。</span></p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:11pt;"><br /></p></body></html> @@ -6096,7 +6102,7 @@ channel value for each flight mode. After the time indicated here, the frame go back to disarmed state. Set to 0 to disable (recommended for soaring fixed wings). 经过这段时间间隔后,飞行器将重新被置为锁定状态。 -设置0将不会再次锁定(建议飞得又高又远的固定翼飞行器设置为0,不要锁定)。 +设置0将不会再次锁定(建议固定翼飞行器设置为0,不要锁定)。 @@ -6577,7 +6583,7 @@ When using OneShot125 all values set in min/max and idle are divided by eight be GroupBox - 输出集 + 输出设置 @@ -8746,22 +8752,22 @@ only when system is armed without disabling the module. Form - 界面 + 界面 Serial Connection - 串口连接 + 串口连接 Serial telemetry speed: - + 串口telemetry波特率: settings - + 设置 @@ -9347,7 +9353,7 @@ p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Cantarell'; font-size:11pt; font-weight:400; font-style:normal;"> <p align="center" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:12pt; font-weight:600;">OpenPilot设置保存</span></p> <p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt;">设置向导准备将设置信息写入到OpenPilot设备中。 </span></p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt;">保存结束后,OpenPilot设备可能会重启以激活某些设置项。</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt;">保存结束后,OpenPilot设备可能会重启以激活设置项。</span></p> <p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt;">请点击下方“Save”按钮保存设置。</span></p> </body></html> @@ -9806,7 +9812,7 @@ to bootloader mode. (Only enabled if telemetry link is established, either through serial or USB) 终止控制板上运行着的操作系统和控制程序,返回到bootloader模式(类似PC的BIOS) -(请确保控制板已经通过串口或USB成功连接) +(请确保控制板已经通过Telemetry成功连接) @@ -9824,7 +9830,7 @@ menu on the right. 启动系统。 只有控制板处于bootloader模式(控制板上绿色LED常亮,蓝色LED慢速闪烁)才有用。 -从右边的下拉菜单中选择适当的连接方式。 +如果Telemetry连接尚未建立,请从右边的下拉菜单中选择一项正确的连接方式。 @@ -9843,7 +9849,7 @@ menu on the right. 启动系统进入安全模式(使用默认设置)。 (控制板上蓝色LED慢速闪烁,橙色LED不亮) -从右边的下拉菜单中选择适当的连接方式。 +如果Telemetry连接尚未建立,请从右边的下拉菜单中选择一项正确的连接方式。 @@ -9856,7 +9862,7 @@ menu on the right. (Only enabled if telemetry link is established, either through serial or USB) 重启系统。 -(当设备通过串口或USB连接成功后才能发送该命令) +(当设备通过Telemetry连接成功后才能使用此命令) @@ -9885,7 +9891,7 @@ method using this combo box. You can use this to force a communication channel when doing a "Boot" (button on the left). It is updated automatically when halting a running board. - 如果管理端口尚未连接控制板,请从下拉菜单中选择一项正确的连接方式。 + 如果Telemetry连接尚未建立,请从右边的下拉菜单中选择一项正确的连接方式。 你也可以在重启系统过程中(点击左边“重启系统”按钮)强制指定一种连接方式。 执行“终止系统”后,该选项会自动更新为当前连接方式。 @@ -9984,8 +9990,8 @@ 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;">请按照下列步骤升级固件或者升级固件并清除设置:</p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- 连接管理端口;</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- 当系统识别到设备后,点击上面&quot;终止系统&quot;按钮;</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- 连接Telemetry;</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- 当系统成功识别设备后,点击上面&quot;终止系统&quot;按钮;</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- 你将会看到一份设备列表清单;</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- 你可以将固件烧写到设备中,也可以将设备上的固件备份到电脑里;</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- 操作结束后,请点击&quot;启动系统&quot;。</p></body></html> @@ -10125,27 +10131,27 @@ p, li { white-space: pre-wrap; } Enable GPS module and reboot the board to be able to select GPS protocol - + 设备将在重启后才能选择GPS协议 Warning: you have configured more than one DebugConsole, this currently is not supported - + 注意:不支持同时选择两个以上端口作为DebugConsole Warning: you have configured both MainPort and FlexiPort for the same function, this currently is not supported - + 注意:MainPort和FlexiPort不能同时配置为相同功能接口 Warning: you have configured both USB HID Port and USB VCP Port for the same function, this currently is not supported - + 注意:USB HID端口和VCP端口不能同时配置为相同功能接口 Warning: you have disabled USB Telemetry on both USB HID Port and USB VCP Port, this currently is not supported - + 注意:不允许将USBTelemetry功能从USB HID和VCP端口上同时关闭 @@ -14875,7 +14881,7 @@ Note: for the OpenPilot v8 GPS please select the U-Blox option. Telemetry Monitor - + Telemetry @@ -15273,4 +15279,78 @@ Note: for the OpenPilot v8 GPS please select the U-Blox option. + + InputWizardWidget + + Welcome to the inputs configuration wizard. + +Please follow the instructions on the screen and only move your controls when asked to. +Make sure you already configured your hardware settings on the proper tab and restarted your board. + +You can press 'back' at any time to return to the previous screen or press 'Cancel' to quit the wizard. + + 欢迎使用遥控输入设置向导。 + +请按照屏幕上提示的指令操作遥控器。 + +设置过程中你可以随时点击“上一步”返回上一设置界面,也可以点击“取消”退出设置向导。 + + + + Please choose your transmitter type: + 请选择遥控类型: + + + Acro: normal transmitter for fixed-wing or quad + Acro:固定翼和多轴飞行器 + + + Helicopter: has collective pitch and throttle input + Helicopter:直升机(油门和俯仰混控) + + + Please choose your transmitter mode: + 请选择遥控器模式: + + + For a Quad: Elevator is Pitch, Ailerons are Roll, and Rudder is Yaw. + 对于多轴飞行器,升降舵相当于俯仰,副翼相当于横滚。 + + + Please center all controls and trims and press Next when ready. + +If your FlightMode switch has only two positions, leave it in either position. + 请将所有摇杆和控制钮放置在中间位置。 + +如果您的飞行模式按钮只有两个档位,请放置在任意一个档位上。 + + + Please move all controls to their maximum extents on both directions. + +Press Next when ready. + 请拨动所有摇杆和控制钮,移动范围涵盖它们的最大行程空间。 + +完成后请点击“下一步”继续。 + + + Please check the picture below and correct all the sticks which show an inverted movement. Press Next when ready. + 拨动摇杆并观察图中显示的移动方向,如果需要,请勾选下方对应选框设置逆转,完成后请点击“下一步”继续。 + + + You have completed this wizard, please check below if the picture mimics your sticks movement. + +IMPORTANT: These new settings have not been saved to the board yet. After pressing Next you will go to the Arming Settings tab where you can set your desired arming sequence and save the configuration. + 遥控器校准结束,请拨动遥控器摇杆和控制钮,观察下方动画与操作是否完全一致。 + +注意:遥控器校准结果尚未保存,请点击“下一步”进入“解锁设置”页,将解锁动作设置好以后,再点击”保存“按钮将所有遥控器输入设置信息保存。 + + + Back + 上一步 + + + Cancel + 取消 + + From edb41b698aca3c32f5a7aab80a6b05ac26be8a4b Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Fri, 27 Feb 2015 01:29:20 +0100 Subject: [PATCH 3/8] OP-1466 Fix Heli tab crash - Refresh Gui - Typos --- .../src/plugins/config/airframe_ccpm.ui | 2428 +++++++++-------- .../cfg_vehicletypes/configccpmwidget.cpp | 71 +- 2 files changed, 1304 insertions(+), 1195 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/airframe_ccpm.ui b/ground/openpilotgcs/src/plugins/config/airframe_ccpm.ui index c9942dc3a..d3f2d1987 100644 --- a/ground/openpilotgcs/src/plugins/config/airframe_ccpm.ui +++ b/ground/openpilotgcs/src/plugins/config/airframe_ccpm.ui @@ -7,7 +7,7 @@ 0 0 850 - 572 + 798 @@ -29,7 +29,16 @@ false - + + 0 + + + 0 + + + 0 + + 0 @@ -92,7 +101,7 @@ #SwashplateBox,#SwashplateBox_2,#SwashplateBox_3,#SwashplateBox_4,#ccpmSwashImageBox,#SwashLvlInstructionsBox,#SwashLvlccpmSwashImageBox,#SwashLvlccpmSliderBox,#SwashLvlStatusBox,#ThrottleCurveBox,#PitchCurveBox{ background-color: qlineargradient(spread:pad, x1:0.507, y1:0.869318, x2:0.507, y2:0.0965909, stop:0 rgba(243, 243, 243, 255), stop:1 rgba(250, 250, 250, 255)); border: 1px outset #999; -border-radius: 3; +border-radius: 6; font:bold; } @@ -100,16 +109,14 @@ QGroupBox::title { subcontrol-origin: margin; subcontrol-position: top center; /* position at the top center */ padding: 0 3px; - background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, - stop: 0 #FFOECE, stop: 1 #FFFFFF); - top: 5px; + top: 5px; } QTabWidget::Rounded - 0 + 1 false @@ -119,42 +126,969 @@ QGroupBox::title { Basic settings - + + 9 + + + 9 + + + 9 + + 9 6 - - + + + + + 1 + 1 + + + + + 200 + 200 + + + + + 16777215 + 16777215 + + + + + 10 + 10 + + + + + 200 + 200 + + + + + 75 + false + true + + + + Swashplate Layout + + + Qt::AlignHCenter|Qt::AlignTop + + + false + + + false + + + + 6 + + + 30 + + + 6 + + + 6 + + + 6 + + + + + Qt::Vertical + + + + + 1 + 1 + + + + + 100 + 100 + + + + + 1000 + 1000 + + + + + 10 + 10 + + + + + 200 + 200 + + + + QFrame::Box + + + QFrame::Plain + + + 1 + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + + + 112 + 184 + 138 + + + + + + + 127 + 127 + 127 + + + + + + 0.000000000000000 + 0.000000000000000 + 400.000000000000000 + 400.000000000000000 + + + + Qt::AlignCenter + + + QGraphicsView::AnchorViewCenter + + + + + + + + + + + QLayout::SetMaximumSize + + + 3 + + + 3 + - + + + true + - + 0 0 + + + 70 + 100 + + - 190 + 16777215 + 16777215 + + + + + 9 + 75 + true + + + + QGroupBox::title { + background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255)); +color: rgb(255, 255, 255); +border-radius: 5; +margin:1px; + } + + + REVO + + + + 3 + + + 3 + + + 10 + + + 3 + + + 3 + + + + + false + + + + 7 + + + + 100% + + + Qt::AlignCenter + + + + + + + + + true + + + + 0 + 0 + + + + + 0 + 100 + + + + 100 + + + 5 + + + Qt::Vertical + + + + + + + + + false + + + + 7 + + + + 0% + + + Qt::AlignCenter + + + + + + + + + + + + + true + + + + 0 + 0 + + + + + 70 + 100 + + + + + 16777215 + 16777215 + + + + + 9 + 75 + true + + + + QGroupBox::title { + background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255)); +color: rgb(255, 255, 255); +border-radius: 5; +margin:1px; + } + + + CCPM + + + Qt::AlignBottom|Qt::AlignHCenter + + + + 3 + + + 3 + + + 10 + + + 3 + + + 3 + + + + + true + + + + 7 + + + + Collective + + + true + + + Qt::AlignCenter + + + + + + + + + true + + + + 0 + 0 + + + + + 0 + 100 + + + + 100 + + + 5 + + + 50 + + + Qt::Vertical + + + + + + + + + true + + + + 7 + + + + Cyclic + + + Qt::AlignCenter + + + + + + + 100 + + + 5 + + + 50 + + + + + + + + + + true + + + + 0 + 0 + + + + + 70 + 100 + + + + + 16777215 + 16777215 + + + + + 9 + 75 + true + + + + QGroupBox::title { + background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255)); +color: rgb(255, 255, 255); +border-radius: 5; +margin:1px; + } + + + Collective + + + Qt::AlignCenter + + + + 3 + + + 3 + + + 20 + + + 3 + + + 3 + + + + + + + true + + + + 0 + 0 + + + + + 0 + 100 + + + + 100 + + + 5 + + + 50 + + + Qt::Vertical + + + + + + + + + 100 + + + 5 + + + 50 + + + + + + + + + + true + + + + 0 + 0 + + + + + 70 + 100 + + + + + 16777215 + 16777215 + + + + + 9 + 75 + true + + + + QGroupBox::title { + background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255)); +color: rgb(255, 255, 255); +border-radius: 5; +margin:1px; + } + + + Cyclic + + + Qt::AlignCenter + + + false + + + + 3 + + + 3 + + + 20 + + + 3 + + + 3 + + + + + + + true + + + + 0 + 0 + + + + + 0 + 100 + + + + 100 + + + 5 + + + 50 + + + Qt::Vertical + + + + + + + + + 100 + + + 5 + + + 50 + + + + + + + + + + true + + + + 0 + 0 + + + + + 70 + 100 + + + + + 16777215 + 16777215 + + + + + 9 + 75 + true + + + + QGroupBox::title { + background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255)); +color: rgb(255, 255, 255); +border-radius: 5; +margin:1px; + } + + + Pitch + + + Qt::AlignCenter + + + + 3 + + + 3 + + + 20 + + + 3 + + + 3 + + + + + + + true + + + + 0 + 0 + + + + + 0 + 100 + + + + 100 + + + 5 + + + 50 + + + Qt::Vertical + + + + + + + + + 100 + + + 5 + + + 50 + + + + + + + + + + true + + + + 0 + 0 + + + + + 70 + 100 + + + + + 16777215 + 16777215 + + + + + 9 + 75 + true + + + + QGroupBox::title { + background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255)); +color: rgb(255, 255, 255); +border-radius: 5; +margin:1px; + } + + + Roll + + + Qt::AlignCenter + + + + 3 + + + 3 + + + 20 + + + 3 + + + 3 + + + + + + + true + + + + 0 + 0 + + + + + 0 + 100 + + + + 100 + + + 5 + + + 50 + + + Qt::Vertical + + + + + + + + + 100 + + + 5 + + + 50 + + + + + + + + + + + + + + + 0 + 0 + + + + + 200 + 0 + + + + + 16777215 16777215 Motor outputs + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + false + + + false + - + 3 - - 2 + + 30 - + 3 - + + 3 + + + 3 + + @@ -171,12 +1105,12 @@ QGroupBox::title { 100 - 16777215 + 25 - + @@ -193,12 +1127,12 @@ QGroupBox::title { 100 - 16777215 + 25 - + @@ -223,7 +1157,7 @@ QGroupBox::title { - + @@ -248,36 +1182,26 @@ QGroupBox::title { - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 20 - - - - - + 0 - 0 + 12 + + + 200 + 0 + + - 190 + 16777215 16777215 @@ -285,16 +1209,22 @@ QGroupBox::title { Swashplate outputs - + 3 - - 2 + + 30 - + 3 - + + 3 + + + 3 + + true @@ -322,7 +1252,7 @@ QGroupBox::title { - + true @@ -342,12 +1272,12 @@ QGroupBox::title { 100 - 16777215 + 25 - + @@ -364,12 +1294,12 @@ QGroupBox::title { 100 - 16777215 + 25 - + true @@ -389,12 +1319,12 @@ QGroupBox::title { 100 - 16777215 + 25 - + @@ -419,7 +1349,7 @@ QGroupBox::title { - + @@ -461,7 +1391,7 @@ QGroupBox::title { - + @@ -486,7 +1416,7 @@ QGroupBox::title { - + @@ -503,12 +1433,12 @@ QGroupBox::title { 100 - 16777215 + 25 - + @@ -533,7 +1463,7 @@ QGroupBox::title { - + true @@ -561,117 +1491,51 @@ QGroupBox::title { - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 20 - - - - - + 0 0 - 70 + 200 0 - 190 + 16777215 16777215 Swashplate Servo Angles + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + - + 3 - - 2 + + 30 - + + 3 + + + 3 + + 3 - - - - - 0 - 0 - - - - - 85 - 0 - - - - - 85 - 16777215 - - - - 0 - - - 360.000000000000000 - - - 15.000000000000000 - - - - - - - true - - - - 0 - 0 - - - - - 80 - 0 - - - - - 80 - 16777215 - - - - Angle W - - - @@ -798,7 +1662,7 @@ QGroupBox::title { 85 - 16777215 + 25 @@ -832,7 +1696,7 @@ QGroupBox::title { 85 - 16777215 + 25 @@ -863,7 +1727,7 @@ QGroupBox::title { 85 - 16777215 + 25 @@ -894,7 +1758,7 @@ QGroupBox::title { 85 - 16777215 + 25 @@ -908,21 +1772,64 @@ QGroupBox::title { - - - - Qt::Vertical + + + + true - - QSizePolicy::Fixed + + + 0 + 0 + - + - 20 - 20 + 80 + 0 - + + + 80 + 16777215 + + + + Angle W + + + + + + + + 0 + 0 + + + + + 85 + 0 + + + + + 85 + 25 + + + + 0 + + + 360.000000000000000 + + + 15.000000000000000 + + @@ -930,14 +1837,20 @@ QGroupBox::title { - + 0 0 + + + 200 + 0 + + - 190 + 16777215 16777215 @@ -945,23 +1858,29 @@ QGroupBox::title { CCPM Options - + 3 - - 2 + + 30 - + 3 - + + 3 + + + 3 + + Collective Pass through - + Link Roll/Pitch @@ -971,7 +1890,7 @@ QGroupBox::title { - + Link Cyclic/Collective @@ -981,895 +1900,6 @@ QGroupBox::title { - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 20 - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - 0 - - - 0 - - - - - - 1 - 1 - - - - - 200 - 200 - - - - - 600 - 600 - - - - - 10 - 10 - - - - - 200 - 200 - - - - - 75 - false - true - - - - Swashplate Layout - - - Qt::AlignHCenter|Qt::AlignTop - - - false - - - false - - - - 3 - - - 3 - - - - - Qt::Vertical - - - - - 1 - 1 - - - - - 10 - 10 - - - - - 1000 - 1000 - - - - - 10 - 10 - - - - - 200 - 200 - - - - QFrame::Box - - - QFrame::Plain - - - 1 - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - - - 112 - 184 - 138 - - - - - - - 127 - 127 - 127 - - - - - - 0.000000000000000 - 0.000000000000000 - 400.000000000000000 - 400.000000000000000 - - - - Qt::AlignCenter - - - QGraphicsView::AnchorViewCenter - - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 20 - - - - - - - - - - - - - QLayout::SetNoConstraint - - - 3 - - - 3 - - - - - true - - - - 0 - 0 - - - - - 50 - 100 - - - - - 50 - 600 - - - - - 9 - 75 - true - - - - QGroupBox::title { - background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255)); -color: rgb(255, 255, 255); -border-radius: 5; -margin:1px; - } - - - REVO - - - - 0 - - - 3 - - - - - false - - - - 7 - - - - 100% - - - Qt::AlignCenter - - - - - - - - - true - - - - 0 - 0 - - - - - 0 - 100 - - - - 100 - - - 5 - - - Qt::Vertical - - - - - - - - - false - - - - 7 - - - - 0% - - - Qt::AlignCenter - - - - - - - - - - - - - true - - - - 0 - 0 - - - - - 60 - 100 - - - - - 50 - 600 - - - - - 9 - 75 - true - - - - QGroupBox::title { - background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255)); -color: rgb(255, 255, 255); -border-radius: 5; -margin:1px; - } - - - CCPM - - - Qt::AlignCenter - - - - 0 - - - 3 - - - - - true - - - - 7 - - - - Collective - - - true - - - Qt::AlignCenter - - - - - - - - - true - - - - 0 - 0 - - - - - 0 - 100 - - - - 100 - - - 5 - - - 50 - - - Qt::Vertical - - - - - - - - - true - - - - 7 - - - - Cyclic - - - Qt::AlignCenter - - - - - - - 100 - - - 5 - - - 50 - - - - - - - - - - true - - - - 0 - 0 - - - - - 70 - 100 - - - - - 50 - 600 - - - - - 9 - 75 - true - - - - QGroupBox::title { - background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255)); -color: rgb(255, 255, 255); -border-radius: 5; -margin:1px; - } - - - Collective - - - Qt::AlignCenter - - - - 0 - - - 3 - - - - - - - true - - - - 0 - 0 - - - - - 0 - 100 - - - - 100 - - - 5 - - - 50 - - - Qt::Vertical - - - - - - - - - 100 - - - 5 - - - 50 - - - - - - - - - - true - - - - 0 - 0 - - - - - 50 - 100 - - - - - 50 - 600 - - - - - 9 - 75 - true - - - - QGroupBox::title { - background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255)); -color: rgb(255, 255, 255); -border-radius: 5; -margin:1px; - } - - - Cyclic - - - Qt::AlignCenter - - - false - - - - 0 - - - 3 - - - - - - - true - - - - 0 - 0 - - - - - 0 - 100 - - - - 100 - - - 5 - - - 50 - - - Qt::Vertical - - - - - - - - - 100 - - - 5 - - - 50 - - - - - - - - - - true - - - - 0 - 0 - - - - - 50 - 100 - - - - - 50 - 600 - - - - - 9 - 75 - true - - - - QGroupBox::title { - background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255)); -color: rgb(255, 255, 255); -border-radius: 5; -margin:1px; - } - - - Pitch - - - Qt::AlignCenter - - - - 0 - - - 3 - - - - - - - true - - - - 0 - 0 - - - - - 0 - 100 - - - - 100 - - - 5 - - - 50 - - - Qt::Vertical - - - - - - - - - 100 - - - 5 - - - 50 - - - - - - - - - - true - - - - 0 - 0 - - - - - 50 - 100 - - - - - 50 - 600 - - - - - 9 - 75 - true - - - - QGroupBox::title { - background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255)); -color: rgb(255, 255, 255); -border-radius: 5; -margin:1px; - } - - - Roll - - - Qt::AlignCenter - - - - 0 - - - 3 - - - - - - - true - - - - 0 - 0 - - - - - 0 - 100 - - - - 100 - - - 5 - - - 50 - - - Qt::Vertical - - - - - - - - - 100 - - - 5 - - - 50 - - - @@ -1882,7 +1912,16 @@ margin:1px; Swashplate Levelling - + + 9 + + + 9 + + + 9 + + 9 @@ -1890,13 +1929,16 @@ margin:1px; + + 6 + 3 - + 0 0 @@ -1911,30 +1953,29 @@ margin:1px; Commands - + + 3 + + + 3 + + + 3 + + 3 - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 20 - - - - 0 + + 30 + + + 3 + @@ -1980,18 +2021,27 @@ margin:1px; + + + 0 + 0 + + - 0 + 250 150 - 220 - 450 + 500 + 800 + + QTextEdit { padding-left:4; padding-top:4; padding-bottom:4; padding-right:4} + Qt::ScrollBarAlwaysOff @@ -2002,6 +2052,12 @@ margin:1px; + + 3 + + + 3 + @@ -2054,7 +2110,7 @@ margin:1px; - + 0 0 @@ -2069,29 +2125,71 @@ margin:1px; Status + + 3 + + + 30 + + + 3 + + + 3 + 3 2 - - 3 - - + + + + 0 + 0 + + - 220 + 100 0 - 190 - 125 + 100 + 92 + + ArrowCursor + + + Qt::NoFocus + + + QFrame::NoFrame + + + QFrame::Sunken + + + 0 + + + 0 + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + 16 + QAbstractItemView::NoEditTriggers @@ -2104,6 +2202,9 @@ margin:1px; QAbstractItemView::SelectRows + + QListView::ListMode + Neutral @@ -2152,41 +2253,9 @@ margin:1px; - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 20 - - - - - - - - Qt::Vertical - - - QSizePolicy::MinimumExpanding - - - - 20 - 0 - - - - @@ -2195,7 +2264,7 @@ margin:1px; true - + 0 0 @@ -2208,8 +2277,8 @@ margin:1px; - 50 - 600 + 16777215 + 16777215 @@ -2220,27 +2289,20 @@ margin:1px; - 0 - - 3 - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 20 - - - - + + 3 + + + 30 + + + 3 + + + 3 + @@ -2338,7 +2400,7 @@ margin:1px; - + 1 1 @@ -2351,8 +2413,8 @@ margin:1px; - 600 - 600 + 16777215 + 16777215 @@ -2380,13 +2442,22 @@ margin:1px; false + + 6 + + + 30 + + + 6 + + + 6 + - 3 + 6 - - 3 - - + Qt::Vertical @@ -2400,8 +2471,8 @@ margin:1px; - 10 - 10 + 100 + 100 @@ -2475,22 +2546,6 @@ margin:1px; - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 20 - - - - @@ -2501,7 +2556,16 @@ margin:1px; Curve settings - + + 9 + + + 9 + + + 9 + + 9 @@ -2554,7 +2618,16 @@ margin:1px; false - + + 0 + + + 0 + + + 0 + + 0 @@ -2627,7 +2700,16 @@ margin:1px; - + + 0 + + + 0 + + + 0 + + 0 @@ -2695,7 +2777,16 @@ margin:1px; Advanced settings - + + 9 + + + 9 + + + 9 + + 9 @@ -3140,7 +3231,6 @@ margin:1px; ccpmServoYChannel ccpmServoZChannel ccpmSingleServo - ccpmAngleW ccpmAngleX ccpmAngleY ccpmAngleZ diff --git a/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configccpmwidget.cpp b/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configccpmwidget.cpp index ad8c4cdc7..fb99174d5 100644 --- a/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configccpmwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configccpmwidget.cpp @@ -552,15 +552,19 @@ void ConfigCcpmWidget::ccpmSwashplateRedraw() QRect size; double scale, xscale, yscale; + size = m_aircraft->SwashplateImage->rect(); + // If size = default, get size from other Img/tab + if (size.width() == 100) { + size = m_aircraft->SwashLvlSwashplateImage->rect(); + } - size = m_aircraft->SwashplateImage->rect(); xscale = size.width(); yscale = size.height(); scale = xscale; if (yscale < scale) { scale = yscale; } - scale /= 460.00; + scale /= 540.00; m_aircraft->SwashplateImage->resetTransform(); m_aircraft->SwashplateImage->scale(scale, scale); @@ -640,16 +644,16 @@ void ConfigCcpmWidget::ccpmSwashplateRedraw() ServoLines[i]->setVisible(defined[i] != 0); } - // m_aircraft->SwashplateImage->centerOn (CenterX, CenterY); + // m_aircraft->SwashplateImage->centerOn(CenterX, CenterY); // m_aircraft->SwashplateImage->fitInView(SwashplateImg, Qt::KeepAspectRatio); } void ConfigCcpmWidget::ccpmSwashplateUpdate() { - ccpmSwashplateRedraw(); - SetUIComponentVisibilities(); UpdateMixer(); + SetUIComponentVisibilities(); + ccpmSwashplateRedraw(); } void ConfigCcpmWidget::UpdateMixer() @@ -782,7 +786,7 @@ void ConfigCcpmWidget::UpdateMixer() for (int i = 0; i < 6; i++) { Channel = table->item(i, 0)->text(); if (Channel == "-") { - Channel = QString("9"); + Channel = QString((int)ConfigCcpmWidget::CHANNEL_NUMELEM + 1); } MixerChannelData[i] = Channel.toInt(); } @@ -874,6 +878,15 @@ void ConfigCcpmWidget::SetUIComponentVisibilities() m_aircraft->ccpmRollScalingBox->setVisible(!m_aircraft->ccpmLinkRoll->isChecked()); m_aircraft->ccpmLinkRoll->setVisible(1); } + // clear status check boxes + m_aircraft->SwashLvlStepList->item(0)->setCheckState(Qt::Unchecked); + m_aircraft->SwashLvlStepList->item(1)->setCheckState(Qt::Unchecked); + m_aircraft->SwashLvlStepList->item(2)->setCheckState(Qt::Unchecked); + m_aircraft->SwashLvlStepList->item(3)->setCheckState(Qt::Unchecked); + m_aircraft->SwashLvlStepList->item(0)->setBackground(Qt::transparent); + m_aircraft->SwashLvlStepList->item(1)->setBackground(Qt::transparent); + m_aircraft->SwashLvlStepList->item(2)->setBackground(Qt::transparent); + m_aircraft->SwashLvlStepList->item(3)->setBackground(Qt::transparent); } /** @@ -939,16 +952,20 @@ void ConfigCcpmWidget::setMixer() UpdateMixer(); // Set up some helper pointers - qint8 *mixers[8] = { mixerSettingsData.Mixer1Vector, - mixerSettingsData.Mixer2Vector, - mixerSettingsData.Mixer3Vector, - mixerSettingsData.Mixer4Vector, - mixerSettingsData.Mixer5Vector, - mixerSettingsData.Mixer6Vector, - mixerSettingsData.Mixer7Vector, - mixerSettingsData.Mixer8Vector }; + qint8 *mixers[12] = { mixerSettingsData.Mixer1Vector, + mixerSettingsData.Mixer2Vector, + mixerSettingsData.Mixer3Vector, + mixerSettingsData.Mixer4Vector, + mixerSettingsData.Mixer5Vector, + mixerSettingsData.Mixer6Vector, + mixerSettingsData.Mixer7Vector, + mixerSettingsData.Mixer8Vector, + mixerSettingsData.Mixer9Vector, + mixerSettingsData.Mixer10Vector, + mixerSettingsData.Mixer11Vector, + mixerSettingsData.Mixer12Vector }; - quint8 *mixerTypes[8] = { + quint8 *mixerTypes[12] = { &mixerSettingsData.Mixer1Type, &mixerSettingsData.Mixer2Type, &mixerSettingsData.Mixer3Type, @@ -956,17 +973,20 @@ void ConfigCcpmWidget::setMixer() &mixerSettingsData.Mixer5Type, &mixerSettingsData.Mixer6Type, &mixerSettingsData.Mixer7Type, - &mixerSettingsData.Mixer8Type + &mixerSettingsData.Mixer8Type, + &mixerSettingsData.Mixer9Type, + &mixerSettingsData.Mixer10Type, + &mixerSettingsData.Mixer11Type, + &mixerSettingsData.Mixer12Type }; // reset all to Disabled for (i = 0; i < 8; i++) { *mixerTypes[i] = 0; } - // go through the user data and update the mixer matrix for (i = 0; i < 6; i++) { - if (MixerChannelData[i] > 0) { + if ((MixerChannelData[i] > 0) && (MixerChannelData[i] < (int)ConfigCcpmWidget::CHANNEL_NUMELEM + 1)) { // Set the mixer type. If Coax, then first two are motors. Otherwise, only first is motor if (TypeText.compare(QString::fromUtf8("Coax 2 Servo 90º"), Qt::CaseInsensitive) == 0) { *(mixerTypes[MixerChannelData[i] - 1]) = i > 1 ? @@ -977,7 +997,6 @@ void ConfigCcpmWidget::setMixer() MixerSettings::MIXER1TYPE_SERVO : MixerSettings::MIXER1TYPE_MOTOR; } - // Configure the vector for (j = 0; j < 5; j++) { mixers[MixerChannelData[i] - 1][j] = m_aircraft->ccpmAdvancedSettingsTable->item(i, j + 1)->text().toInt(); @@ -1052,8 +1071,8 @@ void ConfigCcpmWidget::SwashLvlStartButtonPressed() QMessageBox msgBox; int i; - msgBox.setText("

Swashplate Leveling Routine

"); - msgBox.setInformativeText("You are about to start the Swashplate levelling routine.

This process will start by downloading the current configuration from the GCS to the OP hardware and will adjust your configuration at various stages.

The final state of your system should match the current configuration in the GCS config gadget.

Please ensure all ccpm settings in the GCS are correct before continuing.

If this process is interrupted, then the state of your OP board may not match the GCS configuration.

After completing this process, please check all settings before attempting to fly.

Please disconnect your motor to ensure it will not spin up.


Do you wish to proceed?"); + msgBox.setText(tr("

Swashplate Leveling Routine

")); + msgBox.setInformativeText(tr("You are about to start the Swashplate levelling routine.

This process will start by downloading the current configuration from the GCS to the OP hardware and will adjust your configuration at various stages.

The final state of your system should match the current configuration in the GCS config gadget.

Please ensure all ccpm settings in the GCS are correct before continuing.

If this process is interrupted, then the state of your OP board may not match the GCS configuration.

After completing this process, please check all settings before attempting to fly.

Please disconnect your motor to ensure it will not spin up.


Do you wish to proceed?

")); msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::Cancel); msgBox.setDefaultButton(QMessageBox::Cancel); msgBox.setIcon(QMessageBox::Information); @@ -1170,7 +1189,7 @@ void ConfigCcpmWidget::SwashLvlNextButtonPressed() } // issue user instructions m_aircraft->SwashLvlStepInstruction->setHtml( - "

Neutral levelling

Using adjustment of:

  • servo horns
  • link lengths and
  • Neutral timing spinboxes to the right

ensure that the swashplate is in the center of desired travel range and is level."); + tr("

Neutral levelling

Using adjustment of:

  • Servo horns,
  • Link lengths,
  • Neutral triming spinboxes to the right

Ensure that the swashplate is in the center of desired travel range and is level.")); break; case 2: // Max levelling // check Neutral status as complete @@ -1183,7 +1202,7 @@ void ConfigCcpmWidget::SwashLvlNextButtonPressed() m_aircraft->SwashLvlPositionSpinBox->setValue(100); // issue user instructions m_aircraft->SwashLvlStepInstruction->setText( - "

Max levelling

Using adjustment of:

  • Max timing spinboxes to the right ONLY

ensure that the swashplate is at the top of desired travel range and is level."); + tr("

Max levelling

Using adjustment of:

  • Max triming spinboxes to the right ONLY

Ensure that the swashplate is at the top of desired travel range and is level.")); break; case 3: // Min levelling // check Max status as complete @@ -1196,7 +1215,7 @@ void ConfigCcpmWidget::SwashLvlNextButtonPressed() m_aircraft->SwashLvlPositionSpinBox->setValue(0); // issue user instructions m_aircraft->SwashLvlStepInstruction->setText( - "

Min levelling

Using adjustment of:

  • Min timing spinboxes to the right ONLY

ensure that the swashplate is at the bottom of desired travel range and is level."); + tr("

Min levelling

Using adjustment of:

  • Min triming spinboxes to the right ONLY

Ensure that the swashplate is at the bottom of desired travel range and is level.")); break; case 4: // levelling verification // check Min status as complete @@ -1214,14 +1233,14 @@ void ConfigCcpmWidget::SwashLvlNextButtonPressed() // issue user instructions m_aircraft->SwashLvlStepInstruction->setText( - "

levelling verification

Adjust the slider to the right over it's full range and observe the swashplate motion. It should remain level over the entire range of travel."); + tr("

Levelling verification

Adjust the slider to the right over it's full range and observe the swashplate motion. It should remain level over the entire range of travel.

")); break; case 5: // levelling complete // check verify status as complete m_aircraft->SwashLvlStepList->item(3)->setCheckState(Qt::Checked); // issue user instructions m_aircraft->SwashLvlStepInstruction->setText( - "

levelling complete

Press the Finish button to save these settings to the SD card

Press the cancel button to return to the pre-levelling settings"); + tr("

Levelling complete

Press the Finish button to save these settings to the SD card

Press the cancel button to return to the pre-levelling settings

")); // disable position slider m_aircraft->SwashLvlPositionSlider->setEnabled(false); m_aircraft->SwashLvlPositionSpinBox->setEnabled(false); From c9b80ca0a1ed6b9b4d7ff9b6a764301a7126ae71 Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Fri, 27 Feb 2015 02:27:15 +0100 Subject: [PATCH 4/8] OP-1466 Add a 'Prev' button for servo adjustement --- .../src/plugins/config/airframe_ccpm.ui | 31 +++++++++++++++++-- .../cfg_vehicletypes/configccpmwidget.cpp | 21 +++++++++++-- .../cfg_vehicletypes/configccpmwidget.h | 2 ++ 3 files changed, 50 insertions(+), 4 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/airframe_ccpm.ui b/ground/openpilotgcs/src/plugins/config/airframe_ccpm.ui index d3f2d1987..cc26f7c01 100644 --- a/ground/openpilotgcs/src/plugins/config/airframe_ccpm.ui +++ b/ground/openpilotgcs/src/plugins/config/airframe_ccpm.ui @@ -1968,14 +1968,42 @@ margin:1px; - 0 + 3 + + + 3 30 + + 3 + 3 + + + + false + + + + 85 + 0 + + + + + 85 + 16777215 + + + + Prev + + + @@ -3240,7 +3268,6 @@ margin:1px; ccpmCollectiveSlider ccpmCollectivespinBox SwashplateImage - SwashLvlStartButton SwashLvlNextButton SwashLvlStepInstruction SwashLvlCancelButton diff --git a/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configccpmwidget.cpp b/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configccpmwidget.cpp index fb99174d5..f464a3ba7 100644 --- a/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configccpmwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configccpmwidget.cpp @@ -257,6 +257,7 @@ ConfigCcpmWidget::ConfigCcpmWidget(QWidget *parent) : connect(m_aircraft->SwashLvlStartButton, SIGNAL(clicked()), this, SLOT(SwashLvlStartButtonPressed())); connect(m_aircraft->SwashLvlNextButton, SIGNAL(clicked()), this, SLOT(SwashLvlNextButtonPressed())); + connect(m_aircraft->SwashLvlPrevButton, SIGNAL(clicked()), this, SLOT(SwashLvlPrevButtonPressed())); connect(m_aircraft->SwashLvlCancelButton, SIGNAL(clicked()), this, SLOT(SwashLvlCancelButtonPressed())); connect(m_aircraft->SwashLvlFinishButton, SIGNAL(clicked()), this, SLOT(SwashLvlFinishButtonPressed())); @@ -1094,6 +1095,7 @@ void ConfigCcpmWidget::SwashLvlStartButtonPressed() m_aircraft->SwashLvlStartButton->setEnabled(false); m_aircraft->SwashLvlNextButton->setEnabled(true); + m_aircraft->SwashLvlPrevButton->setEnabled(false); m_aircraft->SwashLvlCancelButton->setEnabled(true); m_aircraft->SwashLvlFinishButton->setEnabled(false); // clear status check boxes @@ -1155,6 +1157,7 @@ void ConfigCcpmWidget::SwashLvlStartButtonPressed() m_aircraft->SwashLvlStartButton->setEnabled(true); m_aircraft->SwashLvlNextButton->setEnabled(false); + m_aircraft->SwashLvlPrevButton->setEnabled(false); m_aircraft->SwashLvlCancelButton->setEnabled(false); m_aircraft->SwashLvlFinishButton->setEnabled(false); break; @@ -1164,15 +1167,24 @@ void ConfigCcpmWidget::SwashLvlStartButtonPressed() } } +void ConfigCcpmWidget::SwashLvlPrevButtonPressed() +{ + SwashLvlState--; + SwashLvlPrevNextButtonPressed(); +} + void ConfigCcpmWidget::SwashLvlNextButtonPressed() { - // ShowDisclaimer(2); SwashLvlState++; - + SwashLvlPrevNextButtonPressed(); +} +void ConfigCcpmWidget::SwashLvlPrevNextButtonPressed() +{ switch (SwashLvlState) { case 0: break; case 1: // Neutral levelling + m_aircraft->SwashLvlPrevButton->setEnabled(false); m_aircraft->SwashLvlStepList->setCurrentRow(0); // set spin boxes and swashplate servos to Neutral values setSwashplateLevel(50); @@ -1192,6 +1204,7 @@ void ConfigCcpmWidget::SwashLvlNextButtonPressed() tr("

Neutral levelling

Using adjustment of:

  • Servo horns,
  • Link lengths,
  • Neutral triming spinboxes to the right

Ensure that the swashplate is in the center of desired travel range and is level.")); break; case 2: // Max levelling + m_aircraft->SwashLvlPrevButton->setEnabled(true); // check Neutral status as complete m_aircraft->SwashLvlStepList->item(0)->setCheckState(Qt::Checked); m_aircraft->SwashLvlStepList->setCurrentRow(1); @@ -1219,6 +1232,7 @@ void ConfigCcpmWidget::SwashLvlNextButtonPressed() break; case 4: // levelling verification // check Min status as complete + m_aircraft->SwashLvlNextButton->setEnabled(true); m_aircraft->SwashLvlStepList->item(2)->setCheckState(Qt::Checked); m_aircraft->SwashLvlStepList->setCurrentRow(3); // enable position slider @@ -1252,6 +1266,7 @@ void ConfigCcpmWidget::SwashLvlNextButtonPressed() m_aircraft->SwashLvlStartButton->setEnabled(false); m_aircraft->SwashLvlNextButton->setEnabled(false); + m_aircraft->SwashLvlPrevButton->setEnabled(true); m_aircraft->SwashLvlCancelButton->setEnabled(true); m_aircraft->SwashLvlFinishButton->setEnabled(true); @@ -1275,6 +1290,7 @@ void ConfigCcpmWidget::SwashLvlCancelButtonPressed() m_aircraft->SwashLvlStartButton->setEnabled(true); m_aircraft->SwashLvlNextButton->setEnabled(false); + m_aircraft->SwashLvlPrevButton->setEnabled(false); m_aircraft->SwashLvlCancelButton->setEnabled(false); m_aircraft->SwashLvlFinishButton->setEnabled(false); @@ -1318,6 +1334,7 @@ void ConfigCcpmWidget::SwashLvlFinishButtonPressed() m_aircraft->SwashLvlStartButton->setEnabled(true); m_aircraft->SwashLvlNextButton->setEnabled(false); + m_aircraft->SwashLvlPrevButton->setEnabled(false); m_aircraft->SwashLvlCancelButton->setEnabled(false); m_aircraft->SwashLvlFinishButton->setEnabled(false); diff --git a/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configccpmwidget.h b/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configccpmwidget.h index d9386830d..92cbc86fd 100644 --- a/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configccpmwidget.h +++ b/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configccpmwidget.h @@ -120,7 +120,9 @@ private slots: void UpdateType(); void SwashLvlStartButtonPressed(); + void SwashLvlPrevButtonPressed(); void SwashLvlNextButtonPressed(); + void SwashLvlPrevNextButtonPressed(); void SwashLvlCancelButtonPressed(); void SwashLvlFinishButtonPressed(); From ac1c893b544f319bf869587b8a5ee48f10392570 Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Fri, 27 Feb 2015 03:49:29 +0100 Subject: [PATCH 5/8] OP-1466 Resize issue --- .../src/plugins/config/airframe_ccpm.ui | 75 +++++++++---------- 1 file changed, 37 insertions(+), 38 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/airframe_ccpm.ui b/ground/openpilotgcs/src/plugins/config/airframe_ccpm.ui index cc26f7c01..87503edc9 100644 --- a/ground/openpilotgcs/src/plugins/config/airframe_ccpm.ui +++ b/ground/openpilotgcs/src/plugins/config/airframe_ccpm.ui @@ -7,7 +7,7 @@ 0 0 850 - 798 + 694
@@ -1946,7 +1946,7 @@ margin:1px; 228 - 0 + 200 @@ -1990,7 +1990,7 @@ margin:1px; 85 - 0 + 20 @@ -2009,7 +2009,7 @@ margin:1px; 85 - 0 + 20 @@ -2031,7 +2031,7 @@ margin:1px; 85 - 0 + 20 @@ -2058,7 +2058,7 @@ margin:1px; 250 - 150 + 20 @@ -2086,37 +2086,15 @@ margin:1px; 3 - - - - false - - - - 170 - 0 - - - - - 170 - 16777215 - - - - Cancel - - - - + false - 170 - 0 + 85 + 20 @@ -2130,6 +2108,28 @@ margin:1px; + + + + false + + + + 85 + 20 + + + + + 170 + 16777215 + + + + Cancel + + +
@@ -2138,7 +2138,7 @@ margin:1px; - + 0 0 @@ -2146,7 +2146,7 @@ margin:1px; 200 - 0 + 130 @@ -2300,7 +2300,7 @@ margin:1px; 70 - 100 + 250 @@ -2436,7 +2436,7 @@ margin:1px; 200 - 200 + 300 @@ -2499,8 +2499,8 @@ margin:1px; - 100 - 100 + 250 + 300 @@ -3269,7 +3269,6 @@ margin:1px; ccpmCollectivespinBox SwashplateImage SwashLvlNextButton - SwashLvlStepInstruction SwashLvlCancelButton SwashLvlFinishButton SwashLvlStepList From 19cbd264651be5dce37f818e8814570c6d9b5304 Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Fri, 27 Feb 2015 05:22:20 +0100 Subject: [PATCH 6/8] OP-1466 Keep previous Mixer table when user choose Custom Settings - Reuse M_PI from math.h --- .../cfg_vehicletypes/configccpmwidget.cpp | 31 ++++++++++++------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configccpmwidget.cpp b/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configccpmwidget.cpp index f464a3ba7..94afcef04 100644 --- a/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configccpmwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configccpmwidget.cpp @@ -40,8 +40,6 @@ #include -#define Pi 3.14159265358979323846 - QStringList ConfigCcpmWidget::getChannelDescriptions() { // init a channel_numelem list of channel desc defaults @@ -392,9 +390,13 @@ void ConfigCcpmWidget::UpdateType() TypeText = m_aircraft->ccpmType->currentText(); SingleServoIndex = m_aircraft->ccpmSingleServo->currentIndex(); - // set visibility of user settings + // set visibility of user settings (When Custom) m_aircraft->ccpmAdvancedSettingsTable->setEnabled(TypeInt == 0); + + // Clear advanced settings table if not Custom selected (Keep previous settings) + if (TypeText.compare(QString::fromUtf8("Custom - Advanced Settings"), Qt::CaseInsensitive) != 0) { m_aircraft->ccpmAdvancedSettingsTable->clearFocus(); + } m_aircraft->ccpmAngleW->setEnabled(TypeInt == 1); m_aircraft->ccpmAngleX->setEnabled(TypeInt == 1); @@ -597,10 +599,10 @@ void ConfigCcpmWidget::ccpmSwashplateRedraw() used[1] = ((m_aircraft->ccpmServoXChannel->currentIndex() > 0) && (m_aircraft->ccpmServoXChannel->isEnabled())); used[2] = ((m_aircraft->ccpmServoYChannel->currentIndex() > 0) && (m_aircraft->ccpmServoYChannel->isEnabled())); used[3] = ((m_aircraft->ccpmServoZChannel->currentIndex() > 0) && (m_aircraft->ccpmServoZChannel->isEnabled())); - angle[0] = (CorrectionAngle + 180 + m_aircraft->ccpmAngleW->value()) * Pi / 180.00; - angle[1] = (CorrectionAngle + 180 + m_aircraft->ccpmAngleX->value()) * Pi / 180.00; - angle[2] = (CorrectionAngle + 180 + m_aircraft->ccpmAngleY->value()) * Pi / 180.00; - angle[3] = (CorrectionAngle + 180 + m_aircraft->ccpmAngleZ->value()) * Pi / 180.00; + angle[0] = (CorrectionAngle + 180 + m_aircraft->ccpmAngleW->value()) * M_PI / 180.00; + angle[1] = (CorrectionAngle + 180 + m_aircraft->ccpmAngleX->value()) * M_PI / 180.00; + angle[2] = (CorrectionAngle + 180 + m_aircraft->ccpmAngleY->value()) * M_PI / 180.00; + angle[3] = (CorrectionAngle + 180 + m_aircraft->ccpmAngleZ->value()) * M_PI / 180.00; for (i = 0; i < CCPM_MAX_SWASH_SERVOS; i++) { @@ -690,8 +692,8 @@ void ConfigCcpmWidget::UpdateMixer() ; } } - - if (config.heli.SwashplateType > 0) { // not advanced settings + int TypeInt = m_aircraft->ccpmType->count() - m_aircraft->ccpmType->currentIndex() - 1; + if (TypeInt != 0) { // not advanced settings // get the channel data from the ui MixerChannelData[0] = m_aircraft->ccpmEngineChannel->currentIndex(); MixerChannelData[1] = m_aircraft->ccpmTailChannel->currentIndex(); @@ -767,11 +769,11 @@ void ConfigCcpmWidget::UpdateMixer() table->item(i, 3)->setText( QString("%1").arg( (int)(127.0 * (RollConstant) - * sin((180 + config.heli.CorrectionAngle + ThisAngle[i]) * Pi / 180.00)))); // Roll + * sin((180 + config.heli.CorrectionAngle + ThisAngle[i]) * M_PI / 180.00)))); // Roll table->item(i, 4)->setText( QString("%1").arg( (int)(127.0 * (PitchConstant) - * cos((config.heli.CorrectionAngle + ThisAngle[i]) * Pi / 180.00)))); // Pitch + * cos((config.heli.CorrectionAngle + ThisAngle[i]) * M_PI / 180.00)))); // Pitch // Yaw table->item(i, 5)->setText(QString("%1").arg(0)); } @@ -784,13 +786,14 @@ void ConfigCcpmWidget::UpdateMixer() } else { // advanced settings QTableWidget *table = m_aircraft->ccpmAdvancedSettingsTable; + for (int i = 0; i < 6; i++) { Channel = table->item(i, 0)->text(); if (Channel == "-") { Channel = QString((int)ConfigCcpmWidget::CHANNEL_NUMELEM + 1); } MixerChannelData[i] = Channel.toInt(); - } + } } } @@ -1323,6 +1326,8 @@ void ConfigCcpmWidget::SwashLvlCancelButtonPressed() m_aircraft->SwashLvlStepInstruction->setText( "

Levelling Cancelled

Previous settings have been restored."); + + ccpmSwashplateUpdate(); } @@ -1367,6 +1372,8 @@ void ConfigCcpmWidget::SwashLvlFinishButtonPressed() ShowDisclaimer(0); // ShowDisclaimer(2); + + ccpmSwashplateUpdate(); } int ConfigCcpmWidget::ShowDisclaimer(int messageID) From 799b4d6240b474403c5f5336d9acb267f13c8192 Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Fri, 27 Feb 2015 05:28:27 +0100 Subject: [PATCH 7/8] OP-1466 Add tr() --- .../config/cfg_vehicletypes/configccpmwidget.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configccpmwidget.cpp b/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configccpmwidget.cpp index 94afcef04..42f3b7dd6 100644 --- a/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configccpmwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configccpmwidget.cpp @@ -1325,7 +1325,7 @@ void ConfigCcpmWidget::SwashLvlCancelButtonPressed() enableSwashplateLevellingControl(false); m_aircraft->SwashLvlStepInstruction->setText( - "

Levelling Cancelled

Previous settings have been restored."); + tr("

Levelling Cancelled

Previous settings have been restored.")); ccpmSwashplateUpdate(); } @@ -1368,7 +1368,7 @@ void ConfigCcpmWidget::SwashLvlFinishButtonPressed() enableSwashplateLevellingControl(false); m_aircraft->SwashLvlStepInstruction->setText( - "

Levelling Completed

New settings have been saved to the SD card"); + tr("

Levelling Completed

New settings have been saved to the SD card")); ShowDisclaimer(0); // ShowDisclaimer(2); @@ -1380,13 +1380,13 @@ int ConfigCcpmWidget::ShowDisclaimer(int messageID) { QMessageBox msgBox; - msgBox.setText("

Warning!!!

"); + msgBox.setText(tr("

Warning!!!

")); int ret; switch (messageID) { case 0: // Basic disclaimer msgBox.setInformativeText( - "

This code has many configurations.

Please double check all settings before attempting flight!"); + tr("

This code has many configurations.

Please double check all settings before attempting flight!")); msgBox.setStandardButtons(QMessageBox::Ok); msgBox.setDefaultButton(QMessageBox::Ok); msgBox.setIcon(QMessageBox::Information); @@ -1397,7 +1397,7 @@ int ConfigCcpmWidget::ShowDisclaimer(int messageID) case 1: // Not Tested disclaimer msgBox.setInformativeText( - "

The CCPM mixer code needs more testing!

Use it at your own risk!

Do you wish to continue?"); + tr("

The CCPM mixer code needs more testing!

Use it at your own risk!

Do you wish to continue?")); msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::Cancel); msgBox.setDefaultButton(QMessageBox::Cancel); msgBox.setIcon(QMessageBox::Warning); @@ -1413,7 +1413,7 @@ int ConfigCcpmWidget::ShowDisclaimer(int messageID) case 2: // DO NOT use msgBox.setInformativeText( - "

The CCPM swashplate levelling code is NOT complete!

DO NOT use it for flight!"); + tr("

The CCPM swashplate levelling code is NOT complete!

DO NOT use it for flight!")); msgBox.setStandardButtons(QMessageBox::Ok); msgBox.setDefaultButton(QMessageBox::Ok); msgBox.setIcon(QMessageBox::Critical); From fcb36b3639e6067478c02438906b2abefdaa235f Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Fri, 27 Feb 2015 22:37:35 +0100 Subject: [PATCH 8/8] OP-1466 Cosmetic changes to Svg / Layer order --- .../cfg_vehicletypes/configccpmwidget.cpp | 3 + .../src/plugins/config/images/ccpm_setup.svg | 565 +++++++++--------- 2 files changed, 302 insertions(+), 266 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configccpmwidget.cpp b/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configccpmwidget.cpp index 42f3b7dd6..11f2aee00 100644 --- a/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configccpmwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configccpmwidget.cpp @@ -179,16 +179,19 @@ ConfigCcpmWidget::ConfigCcpmWidget(QWidget *parent) : Servos[i] = new QGraphicsSvgItem(); Servos[i]->setSharedRenderer(renderer); Servos[i]->setElementId(ServoNames.at(i)); + Servos[i]->setZValue(20); m_aircraft->SwashplateImage->scene()->addItem(Servos[i]); ServosText[i] = new QGraphicsTextItem(); ServosText[i]->setDefaultTextColor(Qt::yellow); ServosText[i]->setPlainText(QString("-")); ServosText[i]->setFont(serifFont); + ServosText[i]->setZValue(31); ServosTextCircles[i] = new QGraphicsEllipseItem(1, 1, 30, 30); ServosTextCircles[i]->setBrush(brush); ServosTextCircles[i]->setPen(pen2); + ServosTextCircles[i]->setZValue(30); m_aircraft->SwashplateImage->scene()->addItem(ServosTextCircles[i]); m_aircraft->SwashplateImage->scene()->addItem(ServosText[i]); diff --git a/ground/openpilotgcs/src/plugins/config/images/ccpm_setup.svg b/ground/openpilotgcs/src/plugins/config/images/ccpm_setup.svg index 08b846628..cf06f04e3 100644 --- a/ground/openpilotgcs/src/plugins/config/images/ccpm_setup.svg +++ b/ground/openpilotgcs/src/plugins/config/images/ccpm_setup.svg @@ -1,266 +1,299 @@ - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - ServoW - - - - ServoX - - - - ServoY - - - - ServoZ - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + ServoW + + + + ServoX + + + + ServoY + + + + ServoZ + + +