Rev 391 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 391 | Rev 396 | ||
---|---|---|---|
Line 66... | Line 66... | ||
66 | connect(sb_GIER_12, SIGNAL(valueChanged(int)), this, SLOT(slot_CheckValue(int))); |
66 | connect(sb_GIER_12, SIGNAL(valueChanged(int)), this, SLOT(slot_CheckValue(int))); |
Line 67... | Line 67... | ||
67 | 67 | ||
Line 68... | Line 68... | ||
68 | } |
68 | } |
69 | 69 | ||
70 | // Connection-Object übergeben. |
70 | // Connection-Object übergeben. |
71 | void dlg_MotorMixer::set_Objects(cConnection *t_Connection, cSettings *t_Settings) |
71 | void dlg_MotorMixer::set_Objects(Handler *handler, cSettings *t_Settings) |
72 | { |
72 | { |
73 | o_Connection = t_Connection; |
73 | this->handler = handler; |
Line 74... | Line 74... | ||
74 | o_Settings = t_Settings; |
74 | o_Settings = t_Settings; |
75 | } |
75 | } |
76 | 76 | ||
77 | // Motordaten übernehmen. |
77 | // Motordaten übernehmen. |
Line 78... | Line 78... | ||
78 | void dlg_MotorMixer::set_MotorConfig(sRxData RX) |
78 | void dlg_MotorMixer::set_MotorConfig(sRxData RX) |
Line 79... | Line 79... | ||
79 | { |
79 | { |
Line 80... | Line 80... | ||
80 | int Pos = 0; |
80 | int Pos = 0; |
81 | 81 | ||
82 | MixerName = ToolBox::Data2QString(RX.Decode, 1, 12); |
82 | MixerName = ToolBox::dataToQString(RX.decode, 1, 12); |
83 | 83 | ||
84 | Pos = 13; |
84 | Pos = 13; |
85 | 85 | ||
86 | for (int z = 0; z < 16; z++) |
86 | for (int z = 0; z < 16; z++) |
87 | { |
87 | { |
Line 88... | Line 88... | ||
88 | for (int y = 0; y < 4; y++) |
88 | for (int y = 0; y < 4; y++) |
Line 251... | Line 251... | ||
251 | { |
251 | { |
252 | lb_GIER->setEnabled(false); |
252 | lb_GIER->setEnabled(false); |
253 | } |
253 | } |
254 | } |
254 | } |
Line -... | Line 255... | ||
- | 255 | ||
- | 256 | //FIXME: put this in com/Handler.cpp |
|
255 | 257 | /* |
|
256 | int dlg_MotorMixer::get_MotorConfig() |
258 | int dlg_MotorMixer::get_MotorConfig() |
257 | { |
259 | { |
Line 258... | Line 260... | ||
258 | get_MotorData(); |
260 | get_MotorData(); |
Line 278... | Line 280... | ||
278 | 280 | ||
279 | for (int z = 0; z < 16; z++) |
281 | for (int z = 0; z < 16; z++) |
280 | { |
282 | { |
281 | for (int y = 0; y < 4; y++) |
283 | for (int y = 0; y < 4; y++) |
282 | { |
284 | { |
283 | TX_Data[Pos] = ToolBox::Char2Data(Motor[z][y]); |
285 | TX_Data[Pos] = Parser::charToData(Motor[z][y]); |
284 | Pos++; |
286 | Pos++; |
285 | } |
287 | } |
Line 286... | Line 288... | ||
286 | } |
288 | } |
Line 290... | Line 292... | ||
290 | 292 | ||
291 | void dlg_MotorMixer::read_Mixer() |
293 | void dlg_MotorMixer::read_Mixer() |
292 | { |
294 | { |
293 | TX_Data[0] = 0; |
295 | TX_Data[0] = 0; |
294 | o_Connection->send_Cmd('n', ADDRESS_FC, TX_Data, 1, true); |
296 | o_Connection->send_Cmd('n', ADDRESS_FC, TX_Data, 1, true); |
Line 295... | Line 297... | ||
295 | } |
297 | }*/ |
296 | 298 | ||
297 | // Motordaten auslesen |
299 | // read motor values |
298 | void dlg_MotorMixer::slot_pb_READ() |
300 | void dlg_MotorMixer::slot_pb_READ() |
299 | { |
301 | { |
300 | TX_Data[0] = 0; |
302 | //send command to get mixer values |
Line -... | Line 303... | ||
- | 303 | handler->read_mixer(); |
|
- | 304 | } |
|
- | 305 | ||
301 | o_Connection->send_Cmd('n', ADDRESS_FC, TX_Data, 1, true); |
306 | //write motor values |
302 | } |
307 | //FIXME: put this in com/Handler.cpp |
303 | 308 | ||
304 | void dlg_MotorMixer::slot_pb_WRITE() |
309 | void dlg_MotorMixer::slot_pb_WRITE() |
305 | { |
310 | { |
Line 306... | Line 311... | ||
306 | int Length = get_MotorConfig(); |
311 | /* int Length = get_MotorConfig(); |
307 | o_Connection->send_Cmd('m', ADDRESS_FC, TX_Data, Length, true); |
312 | o_Connection->send_Cmd('m', ADDRESS_FC, TX_Data, Length, true);*/ |
308 | } |
313 | } |