Changeset 12406 for trunk/FACT++/gui
- Timestamp:
- 11/05/11 21:16:46 (13 years ago)
- Location:
- trunk/FACT++/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/gui/FactGui.h
r12394 r12406 424 424 DimStampedInfo fDimFscHumidity; 425 425 426 DimStampedInfo fDimFeedbackDeviation; 427 DimStampedInfo fDimFeedbackReference; 428 DimStampedInfo fDimFeedbackCalibration; 429 426 430 DimStampedInfo fDimBiasVolt; 427 431 DimStampedInfo fDimBiasCurrent; 428 429 DimStampedInfo fDimFeedbackDeviation;430 DimStampedInfo fDimFeedbackReference;431 432 432 433 DimStampedInfo fDimRateScan; … … 2608 2609 } 2609 2610 2611 vector<float> fBiasOffsets; 2612 2613 void handleFeedbackCalibration(const DimData &d) 2614 { 2615 if (!CheckSize(d, 2*416*sizeof(float))) 2616 return; 2617 2618 const float *ptr = d.ptr<float>(); 2619 fBiasOffsets.assign(ptr, ptr+416); 2620 } 2621 2610 2622 // ======================= Rate Scan ==================================== 2611 2623 … … 2736 2748 2737 2749 // FIXME: Display Overcurrent 2738 //dat[i] = abs(ptr[entry.hv()])*5000./4096; 2739 2740 dat[i] = fVecBiasVolt[entry.hv()]*90./4096 - (abs(ptr[entry.hv()])-1000)*5000./4096*5200*1e-6; 2750 /* 2751 dat[i] = fVecBiasVolt[entry.hv()]*90./4096; 2752 double amp = abs(ptr[entry.hv()]); 2753 if (fBiasOffsets.size()>0) 2754 amp -= fBiasOffsets[entry.hv()]; 2755 amp *= 5000./4096; 2756 amp *= 5200 *1e-6; 2757 dat[i] -= amp; 2758 */ 2759 2760 dat[i] = abs(ptr[entry.hv()]); 2761 if (fBiasOffsets.size()>0) 2762 dat[i] -= fBiasOffsets[entry.hv()]; 2763 dat[i] *= 5000./4096; 2764 2765 if (entry.group()==1) 2766 dat[i] *= 0.92; 2741 2767 2742 2768 fBiasCamA->SetEnable(i, uint16_t(ptr[entry.hv()])!=0x8000); … … 3317 3343 return PostInfoHandler(&FactGui::handleFeedbackDeviation); 3318 3344 3345 if (getInfo()==&fDimFeedbackCalibration) 3346 return PostInfoHandler(&FactGui::handleFeedbackCalibration); 3347 3319 3348 if (getInfo()==&fDimRateScan) 3320 3349 return PostInfoHandler(&FactGui::handleRateScan); … … 3622 3651 if (fVecBiasCurrent.size()>0) 3623 3652 { 3624 fBiasCurrent->setValue(abs(fVecBiasCurrent[ihw])*5000./4096); 3653 double val = abs(fVecBiasCurrent[ihw]); 3654 if (fBiasOffsets.size()>0) 3655 val -= fBiasOffsets[ihw]; 3656 val *= 5000/4096; 3657 3658 fBiasCurrent->setValue(val); 3625 3659 SetLedColor(fBiasOverCurrentLed, 3626 3660 fVecBiasCurrent[ihw]<0?kLedRed:kLedGreen, Time()); 3627 3661 } 3662 3663 if (fBiasOffsets.size()>0) 3664 fBiasOffset->setValue(fBiasOffsets[ihw]*5000./4096); 3665 fBiasOffset->setEnabled(fBiasOffsets.size()>0); 3628 3666 } 3629 3667 … … 3880 3918 fDimFscHumidity ("FSC_CONTROL/HUMIDITY", (void*)NULL, 0, this), 3881 3919 //- 3920 fDimFeedbackDeviation ("FEEDBACK/DEVIATION", (void*)NULL, 0, this), 3921 fDimFeedbackReference ("FEEDBACK/REFERENCE", (void*)NULL, 0, this), 3922 fDimFeedbackCalibration("FEEDBACK/CALIBRATION", (void*)NULL, 0, this), 3923 //- 3882 3924 fDimBiasVolt ("BIAS_CONTROL/VOLTAGE", (void*)NULL, 0, this), 3883 3925 fDimBiasCurrent ("BIAS_CONTROL/CURRENT", (void*)NULL, 0, this), 3884 //-3885 fDimFeedbackDeviation ("FEEDBACK/DEVIATION", (void*)NULL, 0, this),3886 fDimFeedbackReference ("FEEDBACK/REFERENCE", (void*)NULL, 0, this),3887 3926 //- 3888 3927 fDimRateScan ("RATE_SCAN/DATA", (void*)NULL, 0, this), -
trunk/FACT++/gui/design.ui
r12375 r12406 38 38 <enum>QLayout::SetDefaultConstraint</enum> 39 39 </property> 40 <item row=" 1" column="0">40 <item row="0" column="0"> 41 41 <widget class="QTabWidget" name="fTabWidget"> 42 42 <property name="enabled"> … … 4179 4179 <number>0</number> 4180 4180 </property> 4181 <item row="5" column="1">4182 <widget class="QDoubleSpinBox" name="fBiasCurrent">4183 <property name="sizePolicy">4184 <sizepolicy hsizetype="Preferred" vsizetype="Fixed">4185 <horstretch>0</horstretch>4186 <verstretch>0</verstretch>4187 </sizepolicy>4188 </property>4189 <property name="alignment">4190 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>4191 </property>4192 <property name="readOnly">4193 <bool>true</bool>4194 </property>4195 <property name="buttonSymbols">4196 <enum>QAbstractSpinBox::NoButtons</enum>4197 </property>4198 <property name="suffix">4199 <string> µA</string>4200 </property>4201 <property name="maximum">4202 <double>9999999.000000000000000</double>4203 </property>4204 </widget>4205 </item>4206 4181 <item row="2" column="2"> 4207 4182 <widget class="QLabel" name="label_233"> … … 4211 4186 </widget> 4212 4187 </item> 4213 <item row=" 4" column="2">4188 <item row="3" column="2"> 4214 4189 <widget class="QLabel" name="label_234"> 4215 4190 <property name="text"> 4216 <string> current</string>4191 <string>set value</string> 4217 4192 </property> 4218 4193 </widget> 4219 4194 </item> 4220 <item row="5" column="0"> 4221 <widget class="QPushButton" name="fBiasOverCurrentLed"> 4222 <property name="enabled"> 4223 <bool>true</bool> 4224 </property> 4225 <property name="sizePolicy"> 4226 <sizepolicy hsizetype="Fixed" vsizetype="Minimum"> 4227 <horstretch>0</horstretch> 4228 <verstretch>0</verstretch> 4229 </sizepolicy> 4230 </property> 4231 <property name="maximumSize"> 4232 <size> 4233 <width>18</width> 4234 <height>16777215</height> 4235 </size> 4236 </property> 4237 <property name="text"> 4238 <string/> 4239 </property> 4240 <property name="icon"> 4241 <iconset resource="design.qrc"> 4242 <normaloff>:/Resources/icons/gray circle 1.png</normaloff>:/Resources/icons/gray circle 1.png</iconset> 4243 </property> 4244 <property name="iconSize"> 4245 <size> 4246 <width>16</width> 4247 <height>16</height> 4248 </size> 4249 </property> 4250 <property name="checkable"> 4251 <bool>false</bool> 4252 </property> 4253 <property name="flat"> 4254 <bool>true</bool> 4255 </property> 4256 </widget> 4257 </item> 4258 <item row="4" column="0"> 4195 <item row="3" column="0"> 4259 4196 <widget class="QPushButton" name="fBiasNominalLed"> 4260 4197 <property name="enabled"> … … 4326 4263 </widget> 4327 4264 </item> 4328 <item row="3" column="1">4329 <spacer name="verticalSpacer_68">4330 <property name="orientation">4331 <enum>Qt::Vertical</enum>4332 </property>4333 <property name="sizeType">4334 <enum>QSizePolicy::Preferred</enum>4335 </property>4336 <property name="sizeHint" stdset="0">4337 <size>4338 <width>20</width>4339 <height>5</height>4340 </size>4341 </property>4342 </spacer>4343 </item>4344 4265 <item row="1" column="0" colspan="3"> 4345 4266 <widget class="Line" name="line_50"> … … 4372 4293 </spacer> 4373 4294 </item> 4374 <item row="5" column="2"> 4295 <item row="4" column="1"> 4296 <widget class="QDoubleSpinBox" name="fBiasCurrent"> 4297 <property name="sizePolicy"> 4298 <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> 4299 <horstretch>0</horstretch> 4300 <verstretch>0</verstretch> 4301 </sizepolicy> 4302 </property> 4303 <property name="alignment"> 4304 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> 4305 </property> 4306 <property name="readOnly"> 4307 <bool>true</bool> 4308 </property> 4309 <property name="buttonSymbols"> 4310 <enum>QAbstractSpinBox::NoButtons</enum> 4311 </property> 4312 <property name="suffix"> 4313 <string> µA</string> 4314 </property> 4315 <property name="maximum"> 4316 <double>9999999.000000000000000</double> 4317 </property> 4318 </widget> 4319 </item> 4320 <item row="4" column="2"> 4375 4321 <widget class="QLabel" name="label_239"> 4376 4322 <property name="text"> … … 4379 4325 </widget> 4380 4326 </item> 4381 <item row="4" column="1"> 4327 <item row="4" column="0"> 4328 <widget class="QPushButton" name="fBiasOverCurrentLed"> 4329 <property name="enabled"> 4330 <bool>true</bool> 4331 </property> 4332 <property name="sizePolicy"> 4333 <sizepolicy hsizetype="Fixed" vsizetype="Minimum"> 4334 <horstretch>0</horstretch> 4335 <verstretch>0</verstretch> 4336 </sizepolicy> 4337 </property> 4338 <property name="maximumSize"> 4339 <size> 4340 <width>18</width> 4341 <height>16777215</height> 4342 </size> 4343 </property> 4344 <property name="text"> 4345 <string/> 4346 </property> 4347 <property name="icon"> 4348 <iconset resource="design.qrc"> 4349 <normaloff>:/Resources/icons/gray circle 1.png</normaloff>:/Resources/icons/gray circle 1.png</iconset> 4350 </property> 4351 <property name="iconSize"> 4352 <size> 4353 <width>16</width> 4354 <height>16</height> 4355 </size> 4356 </property> 4357 <property name="checkable"> 4358 <bool>false</bool> 4359 </property> 4360 <property name="flat"> 4361 <bool>true</bool> 4362 </property> 4363 </widget> 4364 </item> 4365 <item row="3" column="1"> 4382 4366 <widget class="QDoubleSpinBox" name="fBiasVoltCur"> 4383 4367 <property name="sizePolicy"> … … 4401 4385 <property name="maximum"> 4402 4386 <double>90.000000000000000</double> 4387 </property> 4388 </widget> 4389 </item> 4390 <item row="5" column="1"> 4391 <widget class="QDoubleSpinBox" name="fBiasOffset"> 4392 <property name="sizePolicy"> 4393 <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> 4394 <horstretch>0</horstretch> 4395 <verstretch>0</verstretch> 4396 </sizepolicy> 4397 </property> 4398 <property name="alignment"> 4399 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> 4400 </property> 4401 <property name="readOnly"> 4402 <bool>true</bool> 4403 </property> 4404 <property name="buttonSymbols"> 4405 <enum>QAbstractSpinBox::NoButtons</enum> 4406 </property> 4407 <property name="suffix"> 4408 <string> µA</string> 4409 </property> 4410 <property name="maximum"> 4411 <double>9999999.000000000000000</double> 4412 </property> 4413 </widget> 4414 </item> 4415 <item row="5" column="2"> 4416 <widget class="QLabel" name="label_261"> 4417 <property name="text"> 4418 <string>offset</string> 4403 4419 </property> 4404 4420 </widget>
Note:
See TracChangeset
for help on using the changeset viewer.