Rev 440 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
158 | KeyOz | 1 | /*************************************************************************** |
2 | * Copyright (C) 2008 by Manuel Schrape * |
||
3 | * manuel.schrape@gmx.de * |
||
4 | * * |
||
5 | * This program is free software; you can redistribute it and/or modify * |
||
6 | * it under the terms of the GNU General Public License as published by * |
||
7 | * the Free Software Foundation; either version 2 of the License. * |
||
8 | * * |
||
9 | * This program is distributed in the hope that it will be useful, * |
||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
||
12 | * GNU General Public License for more details. * |
||
13 | * * |
||
14 | * You should have received a copy of the GNU General Public License * |
||
15 | * along with this program; if not, write to the * |
||
16 | * Free Software Foundation, Inc., * |
||
17 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
||
18 | ***************************************************************************/ |
||
19 | #include "dlg_Motortest.h" |
||
20 | |||
21 | dlg_Motortest::dlg_Motortest(QWidget *parent) : QDialog(parent) |
||
22 | { |
||
23 | setupUi(this); |
||
337 | KeyOz | 24 | connect(sl_Speed, SIGNAL(valueChanged(int)), this, SLOT(slot_Motortest(int))); |
158 | KeyOz | 25 | } |
26 | |||
27 | void dlg_Motortest::slot_Motortest(int Wert) |
||
28 | { |
||
442 | Brean | 29 | //TODO: use KopterData? |
30 | sMotorData Motor; |
||
337 | KeyOz | 31 | |
32 | for (int z = 0; z < 12; z++) |
||
33 | { |
||
442 | Brean | 34 | Motor.desired_speed[z] = 0; |
337 | KeyOz | 35 | } |
36 | |||
37 | if (cb_1->isChecked()) |
||
442 | Brean | 38 | Motor.desired_speed[0] = Wert; |
337 | KeyOz | 39 | if (cb_2->isChecked()) |
442 | Brean | 40 | Motor.desired_speed[1] = Wert; |
337 | KeyOz | 41 | if (cb_3->isChecked()) |
442 | Brean | 42 | Motor.desired_speed[2] = Wert; |
337 | KeyOz | 43 | if (cb_4->isChecked()) |
442 | Brean | 44 | Motor.desired_speed[3] = Wert; |
337 | KeyOz | 45 | if (cb_5->isChecked()) |
442 | Brean | 46 | Motor.desired_speed[4] = Wert; |
337 | KeyOz | 47 | if (cb_6->isChecked()) |
442 | Brean | 48 | Motor.desired_speed[5] = Wert; |
337 | KeyOz | 49 | if (cb_7->isChecked()) |
442 | Brean | 50 | Motor.desired_speed[6] = Wert; |
337 | KeyOz | 51 | if (cb_8->isChecked()) |
442 | Brean | 52 | Motor.desired_speed[7] = Wert; |
337 | KeyOz | 53 | if (cb_9->isChecked()) |
442 | Brean | 54 | Motor.desired_speed[8] = Wert; |
337 | KeyOz | 55 | if (cb_10->isChecked()) |
442 | Brean | 56 | Motor.desired_speed[9] = Wert; |
337 | KeyOz | 57 | if (cb_11->isChecked()) |
442 | Brean | 58 | Motor.desired_speed[10] = Wert; |
337 | KeyOz | 59 | if (cb_12->isChecked()) |
442 | Brean | 60 | Motor.desired_speed[11] = Wert; |
337 | KeyOz | 61 | |
62 | emit updateMotor(Motor); |
||
158 | KeyOz | 63 | } |
64 | |||
65 | dlg_Motortest::~dlg_Motortest() |
||
66 | { |
||
67 | } |
||
68 | |||
69 |