Changeset 17019 for trunk/FACT++/gui
- Timestamp:
- 08/19/13 16:28:42 (11 years ago)
- Location:
- trunk/FACT++/gui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/gui/FactGui.h
r16976 r17019 121 121 DimStampedInfo fDimFscHumidity; 122 122 123 DimStampedInfo fDimFeedbackDeviation;124 DimStampedInfo fDimFeedbackReference;125 123 DimStampedInfo fDimFeedbackCalibration; 124 DimStampedInfo fDimFeedbackCalibrated; 126 125 127 126 DimStampedInfo fDimBiasNominal; … … 2262 2261 #endif 2263 2262 2264 void handleFeedbackDeviation(const DimData &d) 2265 { 2266 if (!CheckSize(d, (2*416+2)*sizeof(float))) 2267 return; 2268 2269 if (d.qos==0) 2263 vector <float> fVecFeedbackCurrents; 2264 2265 void handleFeedbackCalibratedCurrents(const DimData &d) 2266 { 2267 if (!CheckSize(d, (416+1+1+1+1+1+416+1+1)*sizeof(float)+sizeof(uint32_t))) 2270 2268 return; 2271 2269 2272 2270 const float *ptr = d.ptr<float>(); 2273 2274 valarray<float> dev(1440); 2275 valarray<float> cmd(1440); 2276 2277 double avgdev = 0; 2278 double avgcmd = 0; 2279 2280 double rmsdev = 0; 2281 double rmscmd = 0; 2282 2271 const float *Uov = ptr+416+6; 2272 2273 fVecFeedbackCurrents.assign(ptr, ptr+416); 2274 2275 valarray<double> datc(0., 1440); 2276 valarray<double> datu(0., 1440); 2277 2278 // fPatch converts from software id to software patch id 2283 2279 for (int i=0; i<1440; i++) 2284 2280 { 2285 2281 const PixelMapEntry &entry = fPixelMap.index(i); 2286 2282 2287 dev[i] = /*1000*/ptr[entry.hv()]; 2288 cmd[i] = 1000*ptr[entry.hv()+416]; 2289 2290 avgdev += dev[i]; 2291 avgcmd += cmd[i]; 2292 2293 rmsdev += dev[i]*dev[i]; 2294 rmscmd += cmd[i]*cmd[i]; 2295 } 2296 2297 avgdev /= 1440; 2298 avgcmd /= 1440; 2299 2300 rmsdev = sqrt(rmsdev/1440 - avgdev*avgdev); 2301 rmscmd = sqrt(rmscmd/1440 - avgcmd*avgcmd); 2302 2303 fFeedbackDevCam->SetData(dev); 2304 fFeedbackCmdCam->SetData(cmd); 2283 datc[i] = fVecFeedbackCurrents[entry.hv()]; 2284 datu[i] = Uov[entry.hv()]; 2285 2286 if (fVecBiasCurrent.size()>0) 2287 { 2288 fBiasCamA->SetEnable(i, uint16_t(fVecBiasCurrent[entry.hv()])!=0x8000); 2289 fBiasCamA->highlightPixel(i, fVecBiasCurrent[entry.hv()]<0); 2290 } 2291 } 2292 2293 fBiasCamA->SetData(datc); 2294 fBiasCamA->updateCamera(); 2295 2296 UpdateBiasValues(); 2297 2298 // -------------------------------------------------------- 2299 2300 double avg = 0; 2301 double rms = 0; 2302 2303 for (int i=0; i<320; i++) 2304 { 2305 avg += Uov[i]; 2306 rms += Uov[i]*Uov[i]; 2307 } 2308 2309 avg /= 320; 2310 rms /= 320; 2311 rms = sqrt(rms-avg*avg); 2312 2313 2314 fFeedbackDevCam->SetData(datu); 2315 //fFeedbackCmdCam->SetData(cmd); 2305 2316 2306 2317 fFeedbackDevCam->updateCamera(); 2307 fFeedbackCmdCam->updateCamera();2318 //fFeedbackCmdCam->updateCamera(); 2308 2319 2309 2320 #ifdef HAVE_ROOT 2310 UpdateFeedback(*fFeedbackDev, d.time, fGraphFeedbackDev, avg dev, rmsdev);2311 UpdateFeedback(*fFeedbackCmd, d.time, fGraphFeedbackCmd, avgcmd, rmscmd);2321 UpdateFeedback(*fFeedbackDev, d.time, fGraphFeedbackDev, avg, rms); 2322 //UpdateFeedback(*fFeedbackCmd, d.time, fGraphFeedbackCmd, avgcmd, rmscmd); 2312 2323 #endif 2313 }2314 2315 void handleFeedbackReference(const DimData &d)2316 {2317 if (!CheckSize(d, 416*sizeof(float)))2318 return;2319 2320 const float *ptr = d.ptr<float>();2321 2322 // fFeedbackRefCam->SetData(valarray<float>(ptr, 416));2323 // fFeedbackRefCam->updateCamera();2324 }2325 2326 vector<float> fBiasOffsets;2327 2328 void handleFeedbackCalibration(const DimData &d)2329 {2330 if (!CheckSize(d, 3*416*sizeof(float)))2331 return;2332 2333 const float *ptr = d.ptr<float>();2334 fBiasOffsets.assign(ptr+2*416, ptr+3*416);2335 2324 } 2336 2325 … … 2461 2450 vector<int16_t> fVecBiasDac; 2462 2451 vector<int16_t> fVecBiasCurrent; 2463 vector<float> fVecBiasCalibOffset; 2464 2465 void handleBiasNominal(const DimData &d) 2466 { 2467 if (!CheckSize(d, 3*416*sizeof(float))) 2452 2453 void handleBiasVolt(const DimData &d) 2454 { 2455 if (!CheckSize(d, 416*sizeof(float))) 2468 2456 return; 2469 2457 2470 2458 const float *ptr = d.ptr<float>(); 2471 2472 fVecBiasCalibOffset.assign(ptr+2*416, ptr+3*416); 2459 fVecBiasVolt.assign(ptr, ptr+416); 2460 2461 on_fBiasDispRefVolt_stateChanged(); 2462 } 2463 2464 void handleBiasDac(const DimData &d) 2465 { 2466 if (!CheckSize(d, 2*416*sizeof(int16_t))) 2467 return; 2468 2469 const int16_t *ptr = d.ptr<int16_t>(); 2470 fVecBiasDac.assign(ptr, ptr+2*416); 2473 2471 2474 2472 on_fBiasDispRefVolt_stateChanged(); … … 2476 2474 } 2477 2475 2478 void handleBiasVolt(const DimData &d) 2479 { 2480 if (!CheckSize(d, 416*sizeof(float))) 2481 return; 2482 2483 const float *ptr = d.ptr<float>(); 2484 fVecBiasVolt.assign(ptr, ptr+416); 2485 } 2486 2487 void handleBiasDac(const DimData &d) 2488 { 2489 if (!CheckSize(d, 2*416*sizeof(int16_t))) 2490 return; 2491 2492 const int16_t *ptr = d.ptr<int16_t>(); 2493 fVecBiasDac.assign(ptr, ptr+2*416); 2494 2495 on_fBiasDispRefVolt_stateChanged(); 2496 UpdateBiasValues(); 2497 } 2476 int fStateFeedback; 2498 2477 2499 2478 void handleBiasCurrent(const DimData &d) … … 2513 2492 const PixelMapEntry &entry = fPixelMap.index(i); 2514 2493 2515 // FIXME: Display Overcurrent2516 /*2517 dat[i] = fVecBiasVolt[entry.hv()]*90./4096;2518 double amp = abs(ptr[entry.hv()]);2519 if (fBiasOffsets.size()>0)2520 amp -= fBiasOffsets[entry.hv()];2521 amp *= 5000./4096;2522 amp *= 5200 *1e-6;2523 dat[i] -= amp;2524 */2525 2526 2494 dat[i] = abs(ptr[entry.hv()]) * 5000./4096; 2527 2528 if (fBiasOffsets.size()>0 && fVecBiasVolt.size()>0)2529 dat[i] -= fVecBiasVolt[entry.hv()]/fBiasOffsets[entry.hv()]*1e6;2530 2531 dat[i] *= 4.5 / (entry.group() ? 5 : 4);2532 2495 2533 2496 fBiasCamA->SetEnable(i, uint16_t(ptr[entry.hv()])!=0x8000); … … 2535 2498 } 2536 2499 2537 fBiasCamA->SetData(dat); 2500 if (fStateFeedback<Feedback::State::kCalibrated) 2501 fBiasCamA->SetData(dat); 2502 2538 2503 fBiasCamA->updateCamera(); 2539 2504 … … 2593 2558 if (s.index==FTM::State::kConnected || 2594 2559 s.index==FTM::State::kIdle || 2595 s.index==FTM::State::kValid ||2596 2560 configuring) // Dim connection / FTM connected 2597 2561 SetLedColor(fStatusFTMLed, kLedGreen, time); … … 2599 2563 SetLedColor(fStatusFTMLed, kLedGreenCheck, time); 2600 2564 if (s.index==FTM::State::kConnected || 2601 s.index==FTM::State::kIdle || 2602 s.index==FTM::State::kValid) // Dim connection / FTM connected 2565 s.index==FTM::State::kIdle) // Dim connection / FTM connected 2603 2566 enable = true; 2604 2567 if (s.index>=FTM::State::kConfigError1) // Dim connection / FTM connected … … 2745 2708 2746 2709 const bool connected = s.index> Feedback::State::kConnecting; 2747 const bool idle = s.index>=Feedback::State::kTempCtrlIdle && s.index<=Feedback::State::kCurrentCtrlIdle; 2748 const bool running = s.index>=Feedback::State::kTempCtrlRunning && s.index<=Feedback::State::kCurrentCtrlRunning; 2749 const bool calib = s.index==Feedback::State::kCalibrating; 2710 const bool idle = s.index==Feedback::State::kCalibrated || s.index==Feedback::State::kWaitingForData; 2750 2711 2751 2712 if (s.index<=Feedback::State::kConnecting) // NoDim / Disconnected … … 2757 2718 if (connected) // Connected 2758 2719 SetLedColor(fStatusFeedbackLed, kLedYellow, time); 2759 2720 if (idle) 2760 2721 SetLedColor(fStatusFeedbackLed, kLedGreen, time); 2761 if (running)2762 2763 if (calib)2722 if (s.index==Feedback::State::kInProgress) 2723 SetLedColor(fStatusFeedbackLed, kLedGreenCheck, time); 2724 if (s.index==Feedback::State::kCalibrating) 2764 2725 SetLedColor(fStatusFeedbackLed, kLedInProgress, time); 2765 2726 2766 2727 fFeedbackWidget->setEnabled(connected); 2767 2728 2768 fFeedbackCalibrate->setEnabled(s.index==Feedback::State::kConnectedFSC || s.index==Feedback::State::kConnected); 2769 fFeedbackTempStart->setEnabled(s.index==Feedback::State::kConnectedFSC || s.index==Feedback::State::kConnected); 2770 2771 fFeedbackStop->setEnabled(s.index>Feedback::State::kConnected); 2772 2773 fFeedbackTempOffset->setEnabled(s.index<=Feedback::State::kConnected); 2774 fFeedbackOutputEnable->setEnabled(s.index<Feedback::State::kTempCtrlRunning); 2775 fFeedbackOutputDisable->setEnabled(running); 2776 2777 const bool enable = 2778 s.index!=Feedback::State::kTempCtrlIdle || 2779 s.index!=Feedback::State::kCurrentCtrlIdle || 2780 s.index!=Feedback::State::kTempCtrlRunning || 2781 s.index!=Feedback::State::kCurrentCtrlRunning; 2729 fFeedbackCalibrate->setEnabled(s.index==Feedback::State::kConnected || s.index==Feedback::State::kCalibrated); 2730 fFeedbackStart->setEnabled(s.index==Feedback::State::kCalibrated); 2731 fFeedbackStop->setEnabled(s.index>Feedback::State::kCalibrated); 2732 fFeedbackOvervoltage->setEnabled(connected); 2733 2734 const bool enable = s.index>=Feedback::State::kCalibrated; 2782 2735 2783 2736 fFeedbackFrameLeft->setEnabled(enable); 2784 2737 fFeedbackCanvLeft->setEnabled(enable); 2738 2739 fStateFeedback = s.index; 2785 2740 } 2786 2741 … … 3155 3110 return PostInfoHandler(&FactGui::handleFscHumidity); 3156 3111 3157 if (getInfo()==&fDimBiasNominal)3158 return PostInfoHandler(&FactGui::handleBiasNominal);3112 //if (getInfo()==&fDimBiasNominal) 3113 // return PostInfoHandler(&FactGui::handleBiasNominal); 3159 3114 3160 3115 if (getInfo()==&fDimBiasVolt) … … 3167 3122 return PostInfoHandler(&FactGui::handleBiasCurrent); 3168 3123 3169 if (getInfo()==&fDimFeedbackReference) 3170 return PostInfoHandler(&FactGui::handleFeedbackReference); 3171 3172 if (getInfo()==&fDimFeedbackDeviation) 3173 return PostInfoHandler(&FactGui::handleFeedbackDeviation); 3174 3175 if (getInfo()==&fDimFeedbackCalibration) 3176 return PostInfoHandler(&FactGui::handleFeedbackCalibration); 3124 if (getInfo()==&fDimFeedbackCalibrated) 3125 return PostInfoHandler(&FactGui::handleFeedbackCalibratedCurrents); 3177 3126 3178 3127 if (getInfo()==&fDimRateScan) … … 3348 3297 } 3349 3298 3350 /*3351 void ChoosePatchBias(Camera &cam, int isw)3352 {3353 cam.Reset();3354 3355 fBiasChannel->setValue(isw);3356 3357 const int ihw = isw<0 ? 0 : fPatchMapHW[isw];3358 3359 fBiasCurrent->setEnabled(isw>=0);3360 fBiasCrate->setEnabled(isw>=0);3361 fBiasBoard->setEnabled(isw>=0);3362 fBiasPatch->setEnabled(isw>=0);3363 3364 if (isw<0)3365 return;3366 3367 const int patch = ihw%4;3368 const int board = (ihw/4)%10;3369 const int crate = (ihw/4)/10;3370 3371 fInChoosePatchBias = true;3372 3373 fBiasCrate->setValue(crate);3374 fBiasBoard->setValue(board);3375 fBiasPatch->setValue(patch);3376 3377 fInChoosePatchBias = false;3378 3379 if (fVecBias.size()>0)3380 {3381 // FIXME: Mapping3382 fBiasVoltDac->setValue(fVecBias[ihw]);3383 fBiasVolt->setValue(fVecBias[ihw]*90./4096);3384 }3385 3386 fBiasCurrent->setValue(cam.GetData(isw));3387 3388 // Loop over the software idx of all pixels3389 for (unsigned int i=0; i<1440; i++)3390 if (fPatchHW[i]==ihw)3391 cam.SetBold(i);3392 }*/3393 3394 3299 void slot_ChoosePixelThreshold(int isw) 3395 3300 { … … 3425 3330 } 3426 3331 3427 /*3428 void on_fThresholdIdx_valueChanged(int isw)3429 {3430 // fRatesCanv->SetBold(isw);3431 // fRatesCanv->updateGL();3432 }*/3433 3434 /*3435 void UpdateThresholdIdx()3436 {3437 if (fInChoosePatchTH)3438 return;3439 3440 const int crate = fThresholdCrate->value();3441 const int board = fThresholdBoard->value();3442 const int patch = fThresholdPatch->value();3443 3444 const int ihw = patch + board*4 + crate*40;3445 3446 int isw = 0;3447 for (; isw<160; isw++)3448 if (ihw==fPatchMapHW[isw])3449 break;3450 3451 on_fThresholdIdx_valueChanged(isw);3452 }*/3453 3454 3332 void on_fPixelIdx_valueChanged(int isw) 3455 3333 { … … 3475 3353 const int ihw = b*32+c; 3476 3354 3477 const double offset = fVecBiasCalibOffset.size()>0 ? fVecBiasCalibOffset[ihw] : 0; 3478 3479 3480 if (fVecBiasDac.size()>0) 3481 { 3482 fBiasVoltCur->setValue(fVecBiasDac[ihw]*90./4096-offset); 3483 fBiasVoltRef->setValue(fVecBiasDac[ihw+416]*90./4096-offset); 3484 3355 if (fVecBiasVolt.size()>0) 3356 { 3357 fBiasVoltCur->setValue(fVecBiasVolt[ihw]); 3485 3358 SetLedColor(fBiasNominalLed, 3486 3359 fVecBiasDac[ihw]==fVecBiasDac[ihw+416]?kLedGreen:kLedRed, Time()); … … 3489 3362 if (fVecBiasCurrent.size()>0) 3490 3363 { 3491 double val = abs(fVecBiasCurrent[ihw]) * 5000./4096; 3492 if (fBiasOffsets.size()>0 && fVecBiasVolt.size()>0) 3493 val -= fVecBiasVolt[ihw]/fBiasOffsets[ihw]*1e6; 3494 3364 const double val = abs(fVecBiasCurrent[ihw]) * 5000./4096; 3495 3365 fBiasCurrent->setValue(val); 3496 3366 SetLedColor(fBiasOverCurrentLed, … … 3498 3368 } 3499 3369 3500 if (fBiasOffsets.size()>0 && fVecBiasVolt.size()>0) 3501 fBiasOffset->setValue(fVecBiasVolt[ihw]/fBiasOffsets[ihw]*1e6); 3502 3503 fBiasOffset->setEnabled(fBiasOffsets.size()>0 && fVecBiasVolt.size()>0); 3370 const bool calibrated = fStateFeedback>=Feedback::State::kCalibrated && 3371 fVecFeedbackCurrents.size()>0; 3372 3373 fBiasCalibrated->setValue(calibrated ? fVecFeedbackCurrents[ihw] : 0); 3374 fBiasCalibrated->setEnabled(calibrated); 3504 3375 } 3505 3376 … … 3580 3451 3581 3452 valarray<double> dat(0., 1440); 3582 3583 int offset = 0; 3584 if (!fBiasDispRefVolt->isChecked()) 3585 fBiasCamV->setTitle("Applied BIAS voltage"); 3586 else 3587 { 3588 fBiasCamV->setTitle("Reference BIAS voltage"); 3589 offset = 416; 3590 } 3591 3592 if (fVecBiasDac.size()>0) 3453 fBiasCamV->setTitle("Applied BIAS voltage"); 3454 3455 if (fVecBiasVolt.size()>0 && fVecBiasDac.size()>0) 3593 3456 { 3594 3457 for (int i=0; i<1440; i++) 3595 3458 { 3596 3459 const PixelMapEntry &entry = fPixelMap.index(i); 3597 dat[i] = fVecBiasDac[entry.hv()+offset]*90./4096; 3598 3599 if (fVecBiasCalibOffset.size()>0) 3600 dat[i] -= fVecBiasCalibOffset[entry.hv()]; 3601 3460 3461 dat[i] = fVecBiasVolt[entry.hv()]; 3602 3462 fBiasCamV->highlightPixel(i, fVecBiasDac[entry.hv()]!=fVecBiasDac[entry.hv()+416]); 3603 3463 } … … 3758 3618 fDimFscHumidity ("FSC_CONTROL/HUMIDITY", (void*)NULL, 0, this), 3759 3619 //- 3760 fDimFeedbackDeviation ("FEEDBACK/DEVIATION", (void*)NULL, 0, this), 3761 fDimFeedbackReference ("FEEDBACK/REFERENCE", (void*)NULL, 0, this), 3762 fDimFeedbackCalibration("FEEDBACK/CALIBRATION", (void*)NULL, 0, this), 3620 fDimFeedbackCalibrated ("FEEDBACK/CALIBRATED_CURRENTS", (void*)NULL, 0, this), 3763 3621 //- 3764 3622 fDimBiasNominal ("BIAS_CONTROL/NOMINAL", (void*)NULL, 0, this), … … 3954 3812 c->SetGrid(); 3955 3813 3956 TH1 *hf = DrawTimeFrame(" Control deviation [mV] ");3814 TH1 *hf = DrawTimeFrame("Overvoltage [V] "); 3957 3815 hf->GetXaxis()->SetLabelSize(0.07); 3958 3816 hf->GetYaxis()->SetLabelSize(0.07); … … 3960 3818 hf->GetYaxis()->SetTitleOffset(0.55); 3961 3819 hf->GetXaxis()->SetTitle(""); 3962 hf->GetYaxis()->SetRangeUser( -99, 99);3820 hf->GetYaxis()->SetRangeUser(0, 1.5); 3963 3821 3964 3822 c->GetListOfPrimitives()->Add(hf, ""); … … 3973 3831 c->SetGrid(); 3974 3832 3975 hf = DrawTimeFrame("Command delta value [mV] ");3833 hf = DrawTimeFrame("Command temp delta [V] "); 3976 3834 hf->GetXaxis()->SetLabelSize(0.07); 3977 3835 hf->GetYaxis()->SetLabelSize(0.07); … … 3979 3837 hf->GetYaxis()->SetTitleOffset(0.55); 3980 3838 hf->GetXaxis()->SetTitle(""); 3981 hf->GetYaxis()->SetRangeUser(- 99*10, 99*10);3839 hf->GetYaxis()->SetRangeUser(-2, 2); 3982 3840 3983 3841 c->GetListOfPrimitives()->Add(hf, ""); -
trunk/FACT++/gui/MainWindow.cc
r14442 r17019 626 626 } 627 627 628 void MainWindow::on_fFeedbackTempStart_clicked() 629 { 630 Dim::SendCommand("FEEDBACK/START_TEMP_CONTROL", 631 (float)fFeedbackTempOffset->value()); 632 } 633 634 void MainWindow::on_fFeedbackOutputEnable_clicked() 635 { 636 Dim::SendCommand("FEEDBACK/ENABLE_OUTPUT", uint8_t(1)); 637 } 638 639 void MainWindow::on_fFeedbackOutputDisable_clicked() 640 { 641 Dim::SendCommand("FEEDBACK/ENABLE_OUTPUT", uint8_t(0)); 628 void MainWindow::on_fFeedbackStart_clicked() 629 { 630 Dim::SendCommand("FEEDBACK/START", 631 (float)fFeedbackOvervoltage->value()); 642 632 } 643 633 … … 649 639 void MainWindow::on_fFeedbackCalibrate_clicked() 650 640 { 651 Dim::SendCommand("FEEDBACK/CALIBRATE _CURRENTS");641 Dim::SendCommand("FEEDBACK/CALIBRATE"); 652 642 } 653 643 … … 655 645 { 656 646 fBiasVoltDacVolt->setValue(val*90./4096); 657 }658 659 void MainWindow::on_fBiasOffsetDac_valueChanged(int val)660 {661 fBiasOffsetDacVolt->setValue(val*90./4096);662 647 } 663 648 … … 669 654 } 670 655 */ 671 672 void MainWindow::on_fBiasApplyReference_clicked()673 {674 if (!fInHandler)675 Dim::SendCommand("BIAS_CONTROL/SET_GLOBAL_OFFSET_TO_ZERO");676 }677 656 678 657 void MainWindow::on_fBiasSetToZero_clicked() … … 728 707 } 729 708 730 void MainWindow::on_fBiasAddOffsetChVolt_clicked()731 {732 if (fInHandler)733 return;734 735 const struct Data { uint16_t ch; float val; } __attribute__((__packed__)) val = {736 uint16_t(fBiasHvBoard->value()*32+fBiasHvChannel->value()),737 float(fBiasOffsetVolt->value())738 };739 740 Dim::SendCommand("BIAS_CONTROL/INCREASE_CHANNEL_VOLTAGE", &val, sizeof(Data));741 }742 743 void MainWindow::on_fBiasAddOffsetGlobalVolt_clicked()744 {745 if (!fInHandler)746 Dim::SendCommand("BIAS_CONTROL/INCREASE_GLOBAL_VOLTAGE", float(fBiasOffsetVolt->value()));747 }748 749 void MainWindow::on_fBiasAddOffsetChDac_clicked()750 {751 }752 753 void MainWindow::on_fBiasAddOffsetGlobalDac_clicked()754 {755 }756 757 void MainWindow::on_fBiasApplyOffsetChVolt_clicked()758 {759 if (fInHandler)760 return;761 762 const struct Data { uint16_t ch; float val; } __attribute__((__packed__)) val = {763 uint16_t(fBiasHvBoard->value()*32+fBiasHvChannel->value()),764 float(fBiasOffsetVolt->value())765 };766 767 Dim::SendCommand("BIAS_CONTROL/SET_CHANNEL_OFFSET", &val, sizeof(Data));768 }769 770 void MainWindow::on_fBiasApplyOffsetGlobalVolt_clicked()771 {772 if (!fInHandler)773 Dim::SendCommand("BIAS_CONTROL/SET_GLOBAL_OFFSET", float(fBiasOffsetVolt->value()));774 }775 776 /*777 void MainWindow::on_fBiasApplyReferenceCh_clicked()778 {779 if (!fInHandler)780 Dim::SendCommand("BIAS_CONTROL/SET_CHANNEL_OFFSET_TO_ZERO",781 uint16_t(fBiasHvBoard->value()*32+fBiasHvChannel->value()));782 }*/783 784 709 void MainWindow::on_fBiasVoltMin_valueChanged(int min) 785 710 { -
trunk/FACT++/gui/design.ui
r16620 r17019 3816 3816 <string>Controls</string> 3817 3817 </property> 3818 <layout class="QHBoxLayout" name="horizontalLayout_46" stretch="0,0,0,0,0,0,0,0,0 ,0">3818 <layout class="QHBoxLayout" name="horizontalLayout_46" stretch="0,0,0,0,0,0,0,0,0"> 3819 3819 <item> 3820 3820 <layout class="QGridLayout" name="gridLayout_84"> … … 4048 4048 <number>0</number> 4049 4049 </property> 4050 <item row="2" column="1"> 4051 <widget class="QDoubleSpinBox" name="fBiasVoltRef"> 4052 <property name="sizePolicy"> 4053 <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> 4054 <horstretch>0</horstretch> 4055 <verstretch>0</verstretch> 4056 </sizepolicy> 4057 </property> 4058 <property name="alignment"> 4059 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> 4060 </property> 4061 <property name="readOnly"> 4062 <bool>true</bool> 4063 </property> 4064 <property name="buttonSymbols"> 4065 <enum>QAbstractSpinBox::NoButtons</enum> 4066 </property> 4067 <property name="suffix"> 4068 <string> V</string> 4069 </property> 4070 <property name="decimals"> 4071 <number>3</number> 4072 </property> 4073 <property name="maximum"> 4074 <double>90.000000000000000</double> 4075 </property> 4076 </widget> 4077 </item> 4078 <item row="1" column="0" colspan="3"> 4079 <widget class="Line" name="line_50"> 4080 <property name="orientation"> 4081 <enum>Qt::Horizontal</enum> 4082 </property> 4083 </widget> 4084 </item> 4050 4085 <item row="2" column="2"> 4051 4086 <widget class="QLabel" name="label_233"> … … 4113 4148 </widget> 4114 4149 </item> 4115 <item row="2" column="1">4116 <widget class="QDoubleSpinBox" name="fBiasVoltRef">4117 <property name="sizePolicy">4118 <sizepolicy hsizetype="Preferred" vsizetype="Fixed">4119 <horstretch>0</horstretch>4120 <verstretch>0</verstretch>4121 </sizepolicy>4122 </property>4123 <property name="alignment">4124 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>4125 </property>4126 <property name="readOnly">4127 <bool>true</bool>4128 </property>4129 <property name="buttonSymbols">4130 <enum>QAbstractSpinBox::NoButtons</enum>4131 </property>4132 <property name="suffix">4133 <string> V</string>4134 </property>4135 <property name="decimals">4136 <number>3</number>4137 </property>4138 <property name="maximum">4139 <double>90.000000000000000</double>4140 </property>4141 </widget>4142 </item>4143 <item row="1" column="0" colspan="3">4144 <widget class="Line" name="line_50">4145 <property name="orientation">4146 <enum>Qt::Horizontal</enum>4147 </property>4148 </widget>4149 </item>4150 4150 <item row="4" column="1"> 4151 4151 <widget class="QDoubleSpinBox" name="fBiasCurrent"> … … 4176 4176 <widget class="QLabel" name="label_239"> 4177 4177 <property name="text"> 4178 <string> feedback</string>4178 <string>total</string> 4179 4179 </property> 4180 4180 </widget> … … 4219 4219 </item> 4220 4220 <item row="5" column="1"> 4221 <widget class="QDoubleSpinBox" name="fBias Offset">4221 <widget class="QDoubleSpinBox" name="fBiasCalibrated"> 4222 4222 <property name="sizePolicy"> 4223 4223 <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> … … 4246 4246 <widget class="QLabel" name="label_261"> 4247 4247 <property name="text"> 4248 <string> offset</string>4248 <string>calibrated</string> 4249 4249 </property> 4250 4250 </widget> … … 4275 4275 <property name="maximum"> 4276 4276 <double>90.000000000000000</double> 4277 </property>4278 </widget>4279 </item>4280 <item row="6" column="1" colspan="2">4281 <widget class="QPushButton" name="fBiasApplyReferenceCh">4282 <property name="text">4283 <string>Set channel to Vgapd</string>4284 4277 </property> 4285 4278 </widget> … … 4462 4455 </item> 4463 4456 <item> 4464 <layout class="QVBoxLayout" name="verticalLayout_18">4465 <item>4466 <widget class="QLabel" name="label_237">4467 <property name="sizePolicy">4468 <sizepolicy hsizetype="Preferred" vsizetype="Preferred">4469 <horstretch>0</horstretch>4470 <verstretch>0</verstretch>4471 </sizepolicy>4472 </property>4473 <property name="text">4474 <string>Voltage offset</string>4475 </property>4476 </widget>4477 </item>4478 <item>4479 <widget class="Line" name="line_49">4480 <property name="orientation">4481 <enum>Qt::Horizontal</enum>4482 </property>4483 </widget>4484 </item>4485 <item>4486 <layout class="QGridLayout" name="gridLayout_113">4487 <item row="1" column="2">4488 <widget class="QSpinBox" name="fBiasOffsetDac">4489 <property name="enabled">4490 <bool>false</bool>4491 </property>4492 <property name="sizePolicy">4493 <sizepolicy hsizetype="Preferred" vsizetype="Fixed">4494 <horstretch>0</horstretch>4495 <verstretch>0</verstretch>4496 </sizepolicy>4497 </property>4498 <property name="alignment">4499 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>4500 </property>4501 <property name="suffix">4502 <string> DAC</string>4503 </property>4504 <property name="minimum">4505 <number>-4095</number>4506 </property>4507 <property name="maximum">4508 <number>4095</number>4509 </property>4510 </widget>4511 </item>4512 <item row="3" column="2">4513 <widget class="QPushButton" name="fBiasAddOffsetGlobalDac">4514 <property name="enabled">4515 <bool>false</bool>4516 </property>4517 <property name="text">4518 <string>Add global</string>4519 </property>4520 </widget>4521 </item>4522 <item row="0" column="2">4523 <widget class="QDoubleSpinBox" name="fBiasOffsetDacVolt">4524 <property name="enabled">4525 <bool>false</bool>4526 </property>4527 <property name="sizePolicy">4528 <sizepolicy hsizetype="Preferred" vsizetype="Fixed">4529 <horstretch>0</horstretch>4530 <verstretch>0</verstretch>4531 </sizepolicy>4532 </property>4533 <property name="alignment">4534 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>4535 </property>4536 <property name="readOnly">4537 <bool>true</bool>4538 </property>4539 <property name="buttonSymbols">4540 <enum>QAbstractSpinBox::NoButtons</enum>4541 </property>4542 <property name="prefix">4543 <string>~</string>4544 </property>4545 <property name="suffix">4546 <string> V</string>4547 </property>4548 <property name="decimals">4549 <number>3</number>4550 </property>4551 <property name="minimum">4552 <double>-90.000000000000000</double>4553 </property>4554 <property name="maximum">4555 <double>99.000000000000000</double>4556 </property>4557 </widget>4558 </item>4559 <item row="0" column="0">4560 <widget class="QDoubleSpinBox" name="fBiasOffsetVolt">4561 <property name="sizePolicy">4562 <sizepolicy hsizetype="Preferred" vsizetype="Fixed">4563 <horstretch>0</horstretch>4564 <verstretch>0</verstretch>4565 </sizepolicy>4566 </property>4567 <property name="alignment">4568 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>4569 </property>4570 <property name="readOnly">4571 <bool>false</bool>4572 </property>4573 <property name="buttonSymbols">4574 <enum>QAbstractSpinBox::UpDownArrows</enum>4575 </property>4576 <property name="prefix">4577 <string/>4578 </property>4579 <property name="suffix">4580 <string> V</string>4581 </property>4582 <property name="decimals">4583 <number>3</number>4584 </property>4585 <property name="minimum">4586 <double>-90.000000000000000</double>4587 </property>4588 <property name="maximum">4589 <double>99.000000000000000</double>4590 </property>4591 </widget>4592 </item>4593 <item row="2" column="2">4594 <widget class="QPushButton" name="fBiasAddOffsetChDac">4595 <property name="enabled">4596 <bool>false</bool>4597 </property>4598 <property name="text">4599 <string>Add Ch</string>4600 </property>4601 </widget>4602 </item>4603 <item row="0" column="1" rowspan="6">4604 <widget class="Line" name="line_63">4605 <property name="orientation">4606 <enum>Qt::Vertical</enum>4607 </property>4608 </widget>4609 </item>4610 <item row="1" column="0">4611 <widget class="QPushButton" name="fBiasAddOffsetChVolt">4612 <property name="enabled">4613 <bool>true</bool>4614 </property>4615 <property name="text">4616 <string>Add Ch</string>4617 </property>4618 </widget>4619 </item>4620 <item row="2" column="0">4621 <widget class="QPushButton" name="fBiasAddOffsetGlobalVolt">4622 <property name="enabled">4623 <bool>true</bool>4624 </property>4625 <property name="text">4626 <string>Add global</string>4627 </property>4628 </widget>4629 </item>4630 <item row="3" column="0">4631 <widget class="QPushButton" name="fBiasApplyOffsetChVolt">4632 <property name="enabled">4633 <bool>true</bool>4634 </property>4635 <property name="text">4636 <string>Set Ch</string>4637 </property>4638 </widget>4639 </item>4640 <item row="4" column="0">4641 <widget class="QPushButton" name="fBiasApplyOffsetGlobalVolt">4642 <property name="text">4643 <string>Set global</string>4644 </property>4645 </widget>4646 </item>4647 </layout>4648 </item>4649 </layout>4650 </item>4651 <item>4652 4457 <widget class="Line" name="line_44"> 4653 4458 <property name="orientation"> … … 4665 4470 <property name="text"> 4666 4471 <string>Set all to 0</string> 4667 </property>4668 </widget>4669 </item>4670 <item>4671 <widget class="QPushButton" name="fBiasApplyReference">4672 <property name="text">4673 <string>Set all to Vgapd</string>4674 4472 </property> 4675 4473 </widget> … … 4840 4638 </property> 4841 4639 <property name="value"> 4842 <number> 2000</number>4640 <number>110</number> 4843 4641 </property> 4844 4642 </widget> … … 4920 4718 <property name="value"> 4921 4719 <number>0</number> 4922 </property>4923 </widget>4924 </item>4925 <item>4926 <spacer name="horizontalSpacer_56">4927 <property name="orientation">4928 <enum>Qt::Horizontal</enum>4929 </property>4930 <property name="sizeHint" stdset="0">4931 <size>4932 <width>40</width>4933 <height>20</height>4934 </size>4935 </property>4936 </spacer>4937 </item>4938 <item>4939 <widget class="QCheckBox" name="fBiasDispRefVolt">4940 <property name="text">4941 <string>Display Reference Voltage</string>4942 4720 </property> 4943 4721 </widget> … … 5342 5120 <widget class="QGroupBox" name="groupBox_23"> 5343 5121 <property name="title"> 5344 <string> Temp feedback</string>5122 <string>Feedback</string> 5345 5123 </property> 5346 5124 <layout class="QGridLayout" name="gridLayout_99"> … … 5356 5134 </item> 5357 5135 <item row="3" column="0"> 5358 <widget class="QDoubleSpinBox" name="fFeedback TempOffset">5136 <widget class="QDoubleSpinBox" name="fFeedbackOvervoltage"> 5359 5137 <property name="alignment"> 5360 5138 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> … … 5372 5150 <double>0.100000000000000</double> 5373 5151 </property> 5152 <property name="value"> 5153 <double>1.100000000000000</double> 5154 </property> 5374 5155 </widget> 5375 5156 </item> 5376 5157 <item row="4" column="0"> 5377 <widget class="QPushButton" name="fFeedbackTempStart"> 5378 <property name="text"> 5379 <string>Start</string> 5380 </property> 5381 </widget> 5382 </item> 5383 </layout> 5384 </widget> 5385 </item> 5386 <item> 5387 <widget class="QGroupBox" name="groupBox_24"> 5388 <property name="title"> 5389 <string>Gain feedback</string> 5390 </property> 5391 <layout class="QGridLayout" name="gridLayout_100"> 5392 <item row="0" column="0"> 5393 <widget class="QPushButton" name="pushButton_5"> 5394 <property name="enabled"> 5395 <bool>false</bool> 5396 </property> 5158 <widget class="QPushButton" name="fFeedbackStart"> 5397 5159 <property name="text"> 5398 5160 <string>Start</string> … … 5409 5171 </property> 5410 5172 <layout class="QGridLayout" name="gridLayout_101"> 5411 <item row="1" column="0">5412 <widget class="QPushButton" name="fFeedbackOutputDisable">5413 <property name="text">5414 <string>Disable output</string>5415 </property>5416 </widget>5417 </item>5418 <item row="0" column="0">5419 <widget class="QPushButton" name="fFeedbackOutputEnable">5420 <property name="text">5421 <string>Enable output</string>5422 </property>5423 </widget>5424 </item>5425 5173 <item row="2" column="0"> 5426 <spacer name="verticalSpacer_ 78">5174 <spacer name="verticalSpacer_85"> 5427 5175 <property name="orientation"> 5428 5176 <enum>Qt::Vertical</enum> … … 5439 5187 </spacer> 5440 5188 </item> 5441 <item row="3" column="0"> 5442 <widget class="QPushButton" name="fFeedbackStop"> 5443 <property name="text"> 5444 <string>Stop</string> 5445 </property> 5446 </widget> 5447 </item> 5448 <item row="4" column="0"> 5449 <spacer name="verticalSpacer_85"> 5189 <item row="0" column="0"> 5190 <spacer name="verticalSpacer_78"> 5450 5191 <property name="orientation"> 5451 5192 <enum>Qt::Vertical</enum> … … 5462 5203 </spacer> 5463 5204 </item> 5464 <item row="5" column="0"> 5205 <item row="1" column="0"> 5206 <widget class="QPushButton" name="fFeedbackStop"> 5207 <property name="text"> 5208 <string>Stop</string> 5209 </property> 5210 </widget> 5211 </item> 5212 <item row="3" column="0"> 5465 5213 <widget class="QPushButton" name="fFeedbackCalibrate"> 5466 5214 <property name="text">
Note:
See TracChangeset
for help on using the changeset viewer.