69,9 → 69,8 |
// Beta-Sachen einschalten. |
#ifdef _BETA_ |
ac_QMKServer->setEnabled(true); |
#else |
ac_MotorMixer->setVisible(false); |
#endif |
|
// Settings-Tab hinzufügen. |
f_Settings = new wdg_Settings( this ); |
f_Settings->set_Config(Settings); |
480,6 → 479,7 |
} |
} |
|
// Hardware-Auswahl im Menp |
void MKTool::slot_ac_Hardware() |
{ |
QAction *Action = (QAction*)sender(); |
492,6 → 492,7 |
slot_rb_Hardware(); |
} |
|
// Hardware Auswahl und umschalten |
void MKTool::slot_rb_Hardware() |
{ |
if ((rb_SelNC->isChecked() == false) && (Mode.ID != ADDRESS_NC)) |
546,7 → 547,7 |
TickerDiv = false; |
else |
TickerDiv = true; |
|
/* |
if (cb_ClipBoard->isChecked()) |
{ |
QString s_OLD = te_KML->toPlainText(); |
557,7 → 558,7 |
parse_TargetKML(); |
} |
} |
|
*/ |
for (int a = 0; a < MaxTickerEvents; a++) |
{ |
if (TickerEvent[a] == true) |
565,10 → 566,7 |
switch(a) |
{ |
case 0 : |
if (TickerDiv) |
{ |
QByteArray Temp(LastSend.toUtf8()); |
// serialPort->sendData(Temp); |
} |
break; |
case 1 : |
600,11 → 598,21 |
o_Connection->send_Cmd('d', ADDRESS_ALL, TX_Data, 1, false); |
} |
break; |
case 4 : |
{ |
for (int z = 0; z<12; z++) |
{ |
TX_Data[z] = Motor.Speed[z]; |
} |
o_Connection->send_Cmd('t', ADDRESS_FC, TX_Data, 12, false); |
} |
|
} |
} |
} |
} |
|
// Zum QMK-Datenserver verbinden |
void MKTool::slot_QMKS_Connect() |
{ |
if (ac_QMKServer->isChecked()) |
630,6 → 638,7 |
} |
} |
|
// Verbindung zum QMK-Server hergestellt. |
void MKTool::slot_QMKS_Connected() |
{ |
QMK_Server->setProperty("Connect", true); |
637,6 → 646,7 |
lb_Status->setText(tr("Verbunden mit QMK-Datenserver.")); |
} |
|
// QMK-Serververbindung getrennt |
void MKTool::slot_QMKS_Disconnected(int Error) |
{ |
QMK_Server->setProperty("Connect", false); |
679,16 → 689,42 |
{ |
dlg_Motortest *f_Motortest = new dlg_Motortest(this); |
|
connect(f_Motortest, SIGNAL(updateMotor(int, int, int, int)), this, SLOT(slot_Motortest(int, int, int, int))); |
// connect(f_Motortest, SIGNAL(updateMotor(int, int, int, int)), this, SLOT(slot_Motortest(int, int, int, int))); |
connect(f_Motortest, SIGNAL(updateMotor(sMotor)), this, SLOT(slot_Motortest(sMotor))); |
|
|
Ticker->setInterval(500); |
TickerEvent[4] = true; |
|
if (f_Motortest->exec()==QDialog::Accepted) |
{ |
} |
|
disconnect(f_Motortest, 0,0,0); |
slot_Motortest(0,0,0,0); |
|
for (int z = 0; z<12; z++) |
{ |
Motor.Speed[z] = 0; |
} |
|
slot_Motortest(Motor); |
|
Ticker->setInterval(2000); |
TickerEvent[4] = false; |
} |
|
void MKTool::slot_Motortest(sMotor p_Motor) |
{ |
Motor = p_Motor; |
|
for (int z = 0; z<12; z++) |
{ |
TX_Data[z] = Motor.Speed[z]; |
} |
o_Connection->send_Cmd('t', ADDRESS_FC, TX_Data, 12, false); |
} |
|
// Motormixer-Einstellungen anzeigen |
void MKTool::slot_ac_MotorMixer() |
{ |
f_MotorMixer->set_Objects(o_Connection, Settings); |
699,6 → 735,7 |
} |
} |
|
// LCD Anzeigen |
void MKTool::slot_ac_LCD() |
{ |
if (!f_LCD->isVisible()) |
720,6 → 757,7 |
} |
} |
|
// Map-Fenster anzeigen |
void MKTool::slot_ac_Map() |
{ |
if (!f_Map->isVisible()) |
747,15 → 785,6 |
slot_pb_SendWaypoint(); |
} |
|
void MKTool::slot_Motortest(int Motor1, int Motor2, int Motor3, int Motor4) |
{ |
TX_Data[0] = Motor1; |
TX_Data[1] = Motor2; |
TX_Data[2] = Motor3; |
TX_Data[3] = Motor4; |
o_Connection->send_Cmd('t', ADDRESS_FC, TX_Data, 4, false); |
} |
|
void MKTool::slot_ac_Config() |
{ |
set_Analog Old_Analog1; |