Subversion Repositories Projects

Rev

Rev 158 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 158 Rev 337
Line 19... Line 19...
19
#include "dlg_Motortest.h"
19
#include "dlg_Motortest.h"
Line 20... Line 20...
20
 
20
 
21
dlg_Motortest::dlg_Motortest(QWidget *parent) : QDialog(parent)
21
dlg_Motortest::dlg_Motortest(QWidget *parent) : QDialog(parent)
22
{
22
{
23
    setupUi(this);
-
 
24
    connect(sl_Left,  SIGNAL(valueChanged(int)), this, SLOT(slot_Motortest(int)));
-
 
25
    connect(sl_Right, SIGNAL(valueChanged(int)), this, SLOT(slot_Motortest(int)));
23
    setupUi(this);
26
    connect(sl_Front, SIGNAL(valueChanged(int)), this, SLOT(slot_Motortest(int)));
-
 
27
    connect(sl_Back,  SIGNAL(valueChanged(int)), this, SLOT(slot_Motortest(int)));
-
 
28
    connect(sl_All,   SIGNAL(valueChanged(int)), this, SLOT(slot_Motortest(int)));
24
    connect(sl_Speed, SIGNAL(valueChanged(int)), this, SLOT(slot_Motortest(int)));
Line 29... Line 25...
29
}
25
}
30
 
26
 
31
void dlg_Motortest::slot_Motortest(int Wert)
27
void dlg_Motortest::slot_Motortest(int Wert)
-
 
28
{
-
 
29
    sMotor Motor;
-
 
30
 
-
 
31
    for (int z = 0; z < 12; z++)
-
 
32
    {
-
 
33
        Motor.Speed[z] = 0;
-
 
34
    }
-
 
35
 
-
 
36
    if (cb_1->isChecked())
-
 
37
        Motor.Speed[0] = Wert;
-
 
38
    if (cb_2->isChecked())
-
 
39
        Motor.Speed[1] = Wert;
-
 
40
    if (cb_3->isChecked())
-
 
41
        Motor.Speed[2] = Wert;
-
 
42
    if (cb_4->isChecked())
-
 
43
        Motor.Speed[3] = Wert;
-
 
44
    if (cb_5->isChecked())
-
 
45
        Motor.Speed[4] = Wert;
-
 
46
    if (cb_6->isChecked())
-
 
47
        Motor.Speed[5] = Wert;
-
 
48
    if (cb_7->isChecked())
-
 
49
        Motor.Speed[6] = Wert;
-
 
50
    if (cb_8->isChecked())
-
 
51
        Motor.Speed[7] = Wert;
-
 
52
    if (cb_9->isChecked())
-
 
53
        Motor.Speed[8] = Wert;
-
 
54
    if (cb_10->isChecked())
-
 
55
        Motor.Speed[9] = Wert;
-
 
56
    if (cb_11->isChecked())
-
 
57
        Motor.Speed[10] = Wert;
-
 
58
    if (cb_12->isChecked())
32
{
59
        Motor.Speed[11] = Wert;
33
    Wert = Wert;
60
 
Line 34... Line 61...
34
    emit updateMotor(sl_Front->value(),sl_Back->value(),sl_Left->value(),sl_Right->value());
61
    emit updateMotor(Motor);
35
}
62
}
36
 
63