00001 #include "gui.h"
00002 #include "V24_strings.h"
00003
00007 void Simulation::v24_start_walking_button_clicked() {
00008
00009 V24COMMAND c;
00010
00011 this->lg->v24Data->setText("walking...");
00012
00013
00014 c.command = V24_COMMAND_START_WALKING;
00015 c.dataLength = 0;
00016
00017 if (!v24->transmitCommand(&c)) {
00018 v24->closeDevice();
00019 this->lg->v24Data->setText("!!transmit error!!");
00020 return;
00021 }
00022
00023 v24->receiveTransmitOKCommand();
00024 v24->closeDevice();
00025
00026
00027 }
00028
00032 void Simulation::v24_start_learning_button_clicked() {
00033
00034 V24COMMAND c;
00035
00036 this->lg->v24Data->setText("learning...");
00037
00038
00039 c.command = V24_COMMAND_START_LEARNING;
00040 c.dataLength = 0;
00041
00042 if (!v24->transmitCommand(&c)) {
00043 v24->closeDevice();
00044 this->lg->v24Data->setText("!!transmit error!!");
00045 return;
00046 }
00047
00048 v24->receiveTransmitOKCommand();
00049 v24->closeDevice();
00050
00051
00052 }
00053
00057 void Simulation::v24_exploration_mode_changed() {
00058
00059 if (this->lg->v24ExplorationModeEGreedy->isChecked()) {
00060 this->lg->v24ExplorationLabel->setText("<b>exploration/exploitation parameter (epsilon):</b>");
00061 }
00062 else if (this->lg->v24ExplorationModeValueBased->isChecked()) {
00063 this->lg->v24ExplorationLabel->setText("<b>exploration/exploitation parameter (sigma):</b>");
00064 }
00065 }
00066
00070 void Simulation::v24_debug_button_clicked() {
00071
00072 V24COMMAND c, d;
00073 QString output;
00074 unsigned char randomNumbers[10];
00075
00076
00077 this->lg->v24Data->setText("performing debug function...");
00078
00079 c.command = V24_COMMAND_GET_DEBUG;
00080 c.dataLength = 0x00;
00081
00082 if (!v24->transmitCommand(&c)) {
00083 v24->closeDevice();
00084 this->lg->v24Data->setText("!!transmit error!!");
00085 return;
00086 }
00087
00088 if (!v24->receiveCommand(&d)) {
00089 DBG();
00090 v24->closeDevice();
00091 this->lg->v24Data->setText("!!receive error!!");
00092 return;
00093 }
00094
00095 for (int i=4; i<d.dataLength; i++) {
00096 randomNumbers[i] = d.data[i];
00097 }
00098
00099 float _expProbability;
00100 v24->parseFloatData(&d.data[0], (float*)&_expProbability);
00101
00102 this->lg->v24Data->setText( "eta=" + QString::number (_expProbability) + ", Random actions: " +
00103 QString::number (randomNumbers[4]) + ", " +
00104 QString::number (randomNumbers[5]) + ", " +
00105 QString::number (randomNumbers[6]) + ", " +
00106 QString::number (randomNumbers[7]) + ", " +
00107 QString::number (randomNumbers[8]) + ", " +
00108 QString::number (randomNumbers[9]));
00109
00110 }
00111
00115 void Simulation::v24_get_exploration_clicked() {
00116
00117 V24COMMAND c, d;
00118 QString output;
00119 float _expParameter;
00120 unsigned char _expMode;
00121
00122
00123 this->lg->v24Data->setText("reading exploration config...");
00124
00125 c.command = V24_COMMAND_GET_EXPLORATION_CONFIG;
00126 c.dataLength = 0x00;
00127
00128 if (!v24->transmitCommand(&c)) {
00129 v24->closeDevice();
00130 this->lg->v24Data->setText("!!transmit error!!");
00131 return;
00132 }
00133
00134 if (!v24->receiveCommand(&d)) {
00135 DBG();
00136 v24->closeDevice();
00137 this->lg->v24Data->setText("!!receive error!!");
00138 return;
00139 }
00140
00141
00142 v24->parseFloatData(&d.data[0], (float*)&_expParameter);
00143 _expMode = d.data[4];
00144
00145
00146 this->expMode = _expMode;
00147 if (this->expMode == 0) {
00148 this->lg->v24ExplorationModeEGreedy->setChecked(true);
00149 this->lg->v24ExplorationModeValueBased->setChecked(false);
00150 }
00151 if (this->expMode == 1) {
00152 this->lg->v24ExplorationModeEGreedy->setChecked(false);
00153 this->lg->v24ExplorationModeValueBased->setChecked(true);
00154 }
00155 this->v24_exploration_mode_changed();
00156
00157 this->expParameter = _expParameter;
00158 this->lg->v24ExplorationParameterInput->setText(QString::number(this->expParameter));
00159
00160
00161
00162 output = QString("mode: " + QString::number(_expMode) + ", parameter: " + QString::number(_expParameter));
00163 this->lg->v24Data->setText(output);
00164
00165
00166 v24->receiveTransmitOKCommand();
00167 v24->closeDevice();
00168 }
00169
00170
00174 void Simulation::v24_exploration_accept_clicked() {
00175
00176 V24COMMAND c;
00177 unsigned char* _bytes;
00178
00179 this->lg->v24Data->setText("new expParameter set to " + this->lg->v24ExplorationParameterInput->text());
00180
00181
00182 this->expParameter = this->lg->v24ExplorationParameterInput->text().toDouble();
00183 if (this->lg->v24ExplorationModeEGreedy->isOn()) {
00184 this->expMode = V24_EXP_MODE_EGREEDY;
00185 } else if (this->lg->v24ExplorationModeValueBased->isOn()) {
00186 this->expMode = V24_EXP_MODE_VALUE_BASED;
00187 }
00188
00189 printf ("Exploration Mode %d, Parameter: %f\n", this->expMode, this->expParameter);
00190
00191
00192
00193
00194
00195 c.command = V24_COMMAND_SET_EXPLORATION_CONFIG;
00196 c.dataLength = sizeof(this->expParameter)+1;
00197 _bytes = (unsigned char*) &expParameter;
00198 for (int i=0; i < c.dataLength-1; i++) {
00199 c.data[i] = _bytes[i];
00200 }
00201 c.data[c.dataLength-1] = expMode;
00202
00203
00204
00205 if (!v24->transmitCommand(&c)) {
00206 v24->closeDevice();
00207 this->lg->v24Data->setText("!!transmit error!!");
00208 return;
00209 }
00210
00211 v24->receiveTransmitOKCommand();
00212 v24->closeDevice();
00213 }
00214
00218 void Simulation::v24_accept_button_clicked() {
00219
00220 if (v24->setInterface(this->lg->v24Interface->text())) {
00221 this->lg->v24StartWalkingButton->setEnabled(true);
00222 this->lg->v24StartLearningButton->setEnabled(true);
00223 this->lg->v24StopWalkingButton->setEnabled(true);
00224 this->lg->v24CopyStatesAndGammaToRobotButton->setEnabled(true);
00225 this->lg->v24GetStatesAndGammaFromRobotButton->setEnabled(true);
00226 this->lg->v24GetPositionAndModeButton->setEnabled(true);
00227 this->lg->v24RamtestButton->setEnabled(true);
00228 this->lg->v24ExploreFeedbackButton->setEnabled(true);
00229 this->lg->v24GetDistanceButton->setEnabled(true);
00230 this->lg->v24ExplorationAcceptButton->setEnabled(true);
00231 this->lg->v24GetExplorationButton->setEnabled(true);
00232 this->lg->v24ExplorationParameterInput->setEnabled(true);
00233 this->lg->v24ResetDistanceButton->setEnabled(true);
00234 this->lg->v24DebugButton->setEnabled(true);
00235 } else {
00236 this->lg->v24StartWalkingButton->setEnabled(false);
00237 this->lg->v24StartLearningButton->setEnabled(false);
00238 this->lg->v24StopWalkingButton->setEnabled(false);
00239 this->lg->v24CopyStatesAndGammaToRobotButton->setEnabled(false);
00240 this->lg->v24GetStatesAndGammaFromRobotButton->setEnabled(false);
00241 this->lg->v24GetPositionAndModeButton->setEnabled(false);
00242 this->lg->v24RamtestButton->setEnabled(false);
00243 this->lg->v24ExploreFeedbackButton->setEnabled(false);
00244 this->lg->v24GetDistanceButton->setEnabled(false);
00245 this->lg->v24ExplorationAcceptButton->setEnabled(false);
00246 this->lg->v24GetExplorationButton->setEnabled(false);
00247 this->lg->v24ExplorationParameterInput->setEnabled(false);
00248 this->lg->v24ResetDistanceButton->setEnabled(false);
00249 this->lg->v24DebugButton->setEnabled(false);
00250 }
00251 }
00252
00256 void Simulation::v24_distance_button_clicked() {
00257
00258 V24COMMAND c, d;
00259 QString output;
00260 signed int _distance=5;
00261
00262
00263 this->lg->v24Data->setText("reading distance traveled...");
00264
00265 c.command = V24_COMMAND_GET_DISTANCE;
00266 c.dataLength = 0x00;
00267
00268 if (!v24->transmitCommand(&c)) {
00269 v24->closeDevice();
00270 this->lg->v24Data->setText("!!transmit error!!");
00271 return;
00272 }
00273
00274
00275 if (!v24->receiveCommand(&d)) {
00276 DBG();
00277 v24->closeDevice();
00278 this->lg->v24Data->setText("!!receive error!!");
00279 return;
00280 }
00281
00282
00283 v24->parseIntegerData(&d.data[0], (unsigned int*)&_distance);
00284
00285 output = QString("distance covered: " + QString::number(_distance));
00286
00287 this->lg->v24Data->setText(output);
00288
00289
00290 v24->receiveTransmitOKCommand();
00291 v24->closeDevice();
00292 }
00293
00297 void Simulation::v24_reset_distance_button_clicked() {
00298
00299 V24COMMAND c;
00300
00301 this->lg->v24Data->setText("distance cleared...");
00302
00303
00304 c.command = V24_COMMAND_RESET_DISTANCE_COUNTER;
00305 c.dataLength = 0;
00306
00307 if (!v24->transmitCommand(&c)) {
00308 v24->closeDevice();
00309 this->lg->v24Data->setText("!!transmit error!!");
00310 return;
00311 }
00312
00313 v24->receiveTransmitOKCommand();
00314 v24->closeDevice();
00315
00316 }
00317
00321 void Simulation::v24_stop_walking_button_clicked() {
00322
00323
00324 this->lg->v24Data->setText("stopped.");
00325
00326 V24COMMAND c;
00327
00328
00329
00330
00331
00332
00333
00334
00335
00336
00337 c.command = V24_COMMAND_STOP_WALKING;
00338 c.dataLength = 0;
00339
00340 if (!v24->transmitCommand(&c)) {
00341 v24->closeDevice();
00342 this->lg->v24Data->setText("!!transmit error!!");
00343 return;
00344 }
00345
00346 v24->receiveTransmitOKCommand();
00347
00348
00349 v24->closeDevice();
00350
00351 }
00352
00356 void Simulation::v24_copy_states_and_gamma_to_robot_button_clicked() {
00357
00358 V24COMMAND c;
00359 unsigned char* _bytes;
00360 State _state;
00361
00362 this->stopLearningThread();
00363
00364
00365 c.command = V24_COMMAND_SET_ALL_STATES_AND_GAMMA;
00366 c.dataLength = 0;
00367
00368
00369 if (!v24->transmitCommand(&c)) {
00370 v24->closeDevice();
00371 this->lg->v24Data->setText("!!transmit error!!");
00372 return;
00373 }
00374
00375
00376
00377
00378 c.command = V24_COMMAND_SET_GAMMA;
00379 c.dataLength = sizeof(this->gamma);
00380 _bytes = (unsigned char*) γ
00381 for (int i=0; i < c.dataLength; i++) {
00382 c.data[i] = _bytes[i];
00383 }
00384
00385
00386 if (!v24->transmitCommand(&c)) {
00387 v24->closeDevice();
00388 this->lg->v24Data->setText("!!transmit error!!");
00389 return;
00390 }
00391 if (!v24->receiveTransmitOKCommand()) {
00392 v24->closeDevice();
00393 this->lg->v24Data->setText("!!transmit error!!");
00394 return;
00395 }
00396
00397
00398
00399
00400 c.command = V24_COMMAND_SET_GRIDSIZE;
00401 c.dataLength = 2;
00402 c.data[0] = (unsigned char)scalY;
00403 c.data[1] = (unsigned char)scalX;
00404
00405
00406 if (!v24->transmitCommand(&c)) {
00407 v24->closeDevice();
00408 this->lg->v24Data->setText("!!transmit error!!");
00409 return;
00410 }
00411 if (!v24->receiveTransmitOKCommand()) {
00412 v24->closeDevice();
00413 this->lg->v24Data->setText("!!transmit error!!");
00414 return;
00415 }
00416
00417
00418
00419
00420
00421 c.command = V24_COMMAND_SET_STATE;
00422 c.dataLength = STATESIZE+2;
00423
00424
00425 for (int _row=0; _row < this->scalY; _row++) {
00426 for (int _column=0; _column < this->scalX; _column++) {
00427
00428
00429 c.data[0] = (unsigned char)_row;
00430 c.data[1] = (unsigned char)_column;
00431
00432
00433 _state.value = (float)fValueMemory[_row][_column];
00434
00435 _state.feedback_up = (char)getReward(_row, _column, UP);
00436 _state.feedback_down = (char)getReward(_row, _column, DOWN);
00437 _state.feedback_left = (char)getReward(_row, _column, LEFT);
00438 _state.feedback_right = (char)getReward(_row, _column, RIGHT);
00439
00440
00441 _bytes = (unsigned char*)&_state;
00442 for (int i=0; i < STATESIZE; i++) {
00443 c.data[2 + i] = _bytes[i];
00444 }
00445
00446
00447 if (!v24->transmitCommand(&c)) {
00448 v24->closeDevice();
00449 this->lg->v24Data->setText("!!receive error!!");
00450 return;
00451 }
00452
00453
00454 if (!v24->receiveTransmitOKCommand()) {
00455 v24->closeDevice();
00456 this->lg->v24Data->setText("!!receive error!!");
00457 return;
00458 }
00459 }
00460 }
00461
00462
00463
00464
00465
00466
00467
00468 v24->closeDevice();
00469
00470 this->lg->v24Data->setText("Configuration successfully applied...");
00471 }
00472
00476 void Simulation::v24_getPositionAndMode_button_clicked() {
00477
00478 V24COMMAND c, d;
00479 QString output;
00480 unsigned int _itCount=5;
00481
00482
00483 this->lg->v24Data->setText("reading position...");
00484
00485 v24->openDevice();
00486
00487
00488 c.command = V24_COMMAND_GET_CURRENTPOSITION_AND_MODE;
00489 c.dataLength = 0x00;
00490
00491 if (!v24->transmitCommand(&c)) {
00492 DBG();
00493 v24->closeDevice();
00494 this->lg->v24Data->setText("!!receive error!!");
00495 return;
00496 }
00497
00498 if (!v24->receiveCommand(&d)) {
00499 DBG();
00500 v24->closeDevice();
00501 this->lg->v24Data->setText("!!receive error!!");
00502 return;
00503 }
00504
00505
00506 v24->parseIntegerData(&d.data[3], &_itCount);
00507
00508 output = QString("Y=" + QString::number (d.data[0]+1) +
00509 ", X=" + QString::number (d.data[1]+1) +
00510 ", Mode: " + v24Modes[d.data[2]] +
00511 ", Iteration#: " + QString::number(_itCount));
00512
00513 this->lg->v24Data->setText(output);
00514
00515
00516 v24->receiveTransmitOKCommand();
00517
00518
00519 v24->closeDevice();
00520 }
00521
00525 void Simulation::v24_explore_feedback_button_clicked() {
00526
00527 V24COMMAND c;
00528
00529 v24->openDevice();
00530
00531 this->lg->v24Data->setText("exploring environment...");
00532
00533
00534 c.command = V24_COMMAND_EXPLORE_FEEDBACK;
00535 c.dataLength = 0x00;
00536 if (!v24->transmitCommand(&c)) {
00537 v24->closeDevice();
00538 this->lg->v24Data->setText("!!transmit error!!");
00539 return;
00540 }
00541
00542
00543 v24->receiveTransmitOKCommand();
00544
00545
00546 v24->closeDevice();
00547 }
00548
00552 void Simulation::v24_ramtest_button_clicked() {
00553
00554
00555 #define RAMSIZE ((9*200)/16)*16
00556
00557 unsigned char ramArrayLocal[RAMSIZE], ramArrayRemote[RAMSIZE];
00558
00559
00560 srand( (unsigned int) time(NULL));
00561
00562 V24COMMAND c, d;
00563
00564 this->lg->v24Data->setText("initializing...");
00565
00566 for (int i=0; i<RAMSIZE; i++) {
00567 ramArrayLocal[i] = (rand() %255)+1;
00568 ramArrayRemote[i] = 0x00;
00569 }
00570
00571
00572
00573
00574
00575
00576 this->lg->v24Data->setText("writing random data to RAM...");
00577 c.command = V24_COMMAND_WRITE_RAM_BYTES;
00578 c.dataLength = 0x12;
00579
00580 for (int i=0; i<RAMSIZE; i+=16) {
00581
00582
00583
00584 c.data[0] = i/256;
00585 c.data[1] = i%256;
00586
00587 for (int j=0; j<16; j++) {
00588 c.data[2+j] = ramArrayLocal[i+j];
00589 }
00590
00591
00592 if (!v24->transmitCommand(&c)) {
00593 this->lg->v24Data->setText("!!transmit error!!");
00594 v24->closeDevice();
00595 return;
00596 }
00597
00598
00599 if (!v24->receiveTransmitOKCommand()) {
00600 this->lg->v24Data->setText("!!receive error!!");
00601 v24->closeDevice();
00602 return;
00603 }
00604
00605 printf ("written data=%d to addr=%d\n", ramArrayLocal[i], i);
00606 }
00607
00608
00609 this->lg->v24Data->setText("reading data from RAM...");
00610 c.command = V24_COMMAND_READ_RAM_BYTES;
00611 c.dataLength = 0x03;
00612 for (int i=0; i<RAMSIZE; i=i+16) {
00613
00614
00615 c.data[0] = i/256;
00616 c.data[1] = i%256;
00617 c.data[2] = 16;
00618
00619
00620 if (!v24->transmitCommand(&c)) {
00621 this->lg->v24Data->setText("!!transmit error!!");
00622 v24->closeDevice();
00623 return;
00624 }
00625
00626
00627 DBG();
00628 v24->receiveCommand(&d);
00629 DBG();
00630 for (int j=0; j<16; j++) {
00631 ramArrayRemote[i+j] = d.data[2+j];
00632 }
00633
00634
00635 if (!v24->receiveTransmitOKCommand()) {
00636 this->lg->v24Data->setText("!!receive error!!");
00637 v24->closeDevice();
00638 return;
00639 }
00640
00641
00642 for (int j=0; j<16; j++) {
00643 if (ramArrayLocal[i+j] != ramArrayRemote[i+j]) {
00644 printf ("ERROR: ramArrayLocal[%d]=%d != ramArrayRemote[%d]=%d\n",
00645 i+j, ramArrayLocal[i+j], i+j, ramArrayRemote[i+j]);
00646 this->lg->v24Data->setText("ERROR: RAM test failed...");
00647 return;
00648 } else {
00649 printf ("OK: data=%d from addr=%d, matches local data\n", ramArrayLocal[i+j], i+j);
00650 }
00651 }
00652 }
00653
00654
00655
00656 v24->closeDevice();
00657 this->lg->v24Data->setText("RAM test OK...");
00658 }
00659
00664 void Simulation::v24_get_states_and_gamma_from_robot_button_clicked() {
00665
00666 V24COMMAND c, d;
00667 STATE _state;
00668 float _gamma;
00669 unsigned char* _bytes = (unsigned char*) &_state;
00670 int _scalX, _scalY;
00671
00672
00673 if (this->pkt != NULL) {
00674 this->apply_button_clicked();
00675 }
00676
00677 this->stopLearningThread();
00678
00679
00680
00681
00682 c.command = V24_COMMAND_GET_ALL_STATES_AND_GAMMA;
00683 c.dataLength = 0x00;
00684
00685
00686 if (!v24->transmitCommand(&c)) {
00687 this->lg->v24Data->setText("!!transmit error!!");
00688 DBG();
00689 v24->closeDevice();
00690 return;
00691 }
00692
00693
00694
00695
00696 c.command = V24_COMMAND_GET_GAMMA;
00697 c.dataLength = 0x00;
00698
00699
00700 if (!v24->transmitCommand(&c)) {
00701 this->lg->v24Data->setText("!!transmit error!!");
00702 DBG();
00703 v24->closeDevice();
00704 return;
00705 }
00706
00707
00708 if (!v24->receiveCommand(&d)) {
00709 this->lg->v24Data->setText("!!receive error!!");
00710 DBG();
00711 v24->closeDevice();
00712 return;
00713 }
00714 v24->parseFloatData(&d.data[0], &_gamma);
00715
00716
00717 this->lg->viGammaInput->setText(QString::number(_gamma));
00718
00719
00720 if (!v24->receiveTransmitOKCommand()) {
00721 this->lg->v24Data->setText("!!receive error!!");
00722 DBG();
00723 v24->closeDevice();
00724 return;
00725 }
00726
00727
00728
00729
00730
00731 c.command = V24_COMMAND_GET_GRIDSIZE;
00732 c.dataLength = 0x00;
00733
00734
00735 if (!v24->transmitCommand(&c)) {
00736 this->lg->v24Data->setText("!!transmit error!!");
00737 DBG();
00738 v24->closeDevice();
00739 return;
00740 }
00741
00742
00743 if (!v24->receiveCommand(&d)) {
00744 this->lg->v24Data->setText("!!receive error!!");
00745 DBG();
00746 v24->closeDevice();
00747 return;
00748 }
00749
00750
00751 if (!v24->receiveTransmitOKCommand()) {
00752 this->lg->v24Data->setText("!!receive error!!");
00753 DBG();
00754 v24->closeDevice();
00755 return;
00756 }
00757
00758 _scalY = scalY = d.data[0];
00759 _scalX = scalX = d.data[1];
00760
00761 this->lg->numCols->setValue(_scalX);
00762 this->scalX = _scalX;
00763 this->lg->numRows->setValue(_scalY);
00764 this->scalY = _scalY;
00765
00766
00767
00768
00769
00770 this->guiReady = false;
00771 this->apply_button_clicked();
00772
00773
00774 this->pkt->setModusFromExtern('q');
00775 while (this->pkt->running()) {
00776 this->pkt->unlockMutex();
00777 }
00778
00779
00780
00781
00782
00783 for (int _row=0; _row<scalY; _row++) {
00784 for (int _column=0; _column<scalX; _column++) {
00785
00786
00787 c.command = V24_COMMAND_GET_STATE;
00788 c.dataLength = 0x02;
00789 c.data[0] = (unsigned char)_row;
00790 c.data[1] = (unsigned char)_column;
00791
00792
00793 if (!v24->transmitCommand(&c)) {
00794 this->lg->v24Data->setText("!!transmit error!!");
00795 DBG();
00796 v24->closeDevice();
00797 return;
00798 }
00799
00800
00801 if (!v24->receiveCommand(&d)) {
00802 this->lg->v24Data->setText("!!receive error!!");
00803 DBG();
00804 v24->closeDevice();
00805 return;
00806 }
00807
00808
00809 if (!v24->receiveTransmitOKCommand()) {
00810 this->lg->v24Data->setText("!!receive error!!");
00811 v24->closeDevice();
00812 return;
00813 }
00814
00815 for (uint i=0; i<STATESIZE; i++) {
00816
00817 _bytes[i] = d.data[2+i];
00818 }
00819
00820
00821
00822 this->updatePolicyTable ( _row, _column, (double)_state.value, NOTHING);
00823 this->pkt->setViValue( _row, _column, _state.value );
00824
00825
00826 this->updateFeedbackTable(_row, _column, _state.feedback_up,
00827 _state.feedback_down,
00828 _state.feedback_left,
00829 _state.feedback_right );
00830 this->pkt->setFeedback( _row, _column, _state.feedback_up,
00831 _state.feedback_down,
00832 _state.feedback_left,
00833 _state.feedback_right );
00834
00835
00836 lg->viValueTable->updateCell(_row, _column);
00837 lg->strategyTable->updateCell(_row, _column);
00838 }
00839 }
00840
00841
00842
00843
00844
00845
00846
00847
00848 this->dad->lock();
00849 for (int i=0; i < this->scalX; i++) {
00850 lg->viValueTable->adjustColumn (i);
00851 lg->strategyTable->adjustColumn (i);
00852 }
00853 this->dad->unlock();
00854
00855
00856 this->lg->v24Data->setText("grid size: " + QString::number(scalY) + "x" + QString::number(scalX) +
00857 ", Gamma: " + QString::number(_gamma));
00858
00859
00860 v24->closeDevice();
00861 }