Permalink
Browse files

Jrk rotor control updates

  • Loading branch information...
1 parent 8126eca commit a7e65b3a27738564be50eef2034f833a44a0bf5c @poes-weather committed May 4, 2012
Showing with 30 additions and 30 deletions.
  1. +0 −6 jrk/jrklutdialog.cpp
  2. +10 −1 jrk/jrkusb.cpp
  3. +7 −6 jrk/usbjrkdialog.cpp
  4. +11 −15 jrk/usbjrkdialog.ui
  5. +2 −2 oceanserver/osdialog.ui
View
@@ -190,12 +190,6 @@ void JrkLUTDialog::on_saveTb_clicked()
QString inifile = QFileDialog::getSaveFileName(this, tr("Save LUT File"), "jrk/conf/", "INI files (*.ini);;All files (*.*)", 0);
if(!inifile.isEmpty()) {
-#if 0
- QFileInfo fi(inifile);
- if(fi.suffix().toLower() != "ini") {
- fi.
- inifile += ".ini";
-#endif
save(inifile);
}
}
View
@@ -463,7 +463,7 @@ void TJrkUSB::loadLUT(void)
QSettings reg(lutFile_, QSettings::IniFormat);
QString d_str, t_str, str;
- double d;
+ double d, dmax = -999, dmin = 999;
int t, i = 0;
reg.beginGroup("JrkTargetToDegrees");
@@ -487,11 +487,20 @@ void TJrkUSB::loadLUT(void)
if(t < 0 || t > 4095 || d < 0 || d > 360)
break;
+ if(d < dmin)
+ dmin = d;
+ if(d > dmax)
+ dmax = d;
+
jrklut.push_back(new JrkLUT(t, d));
}
reg.endGroup();
if(jrklut.size() == 0)
setFlag(JRK_USE_LUT, false);
+ else {
+ min_deg = dmin;
+ max_deg = dmax;
+ }
}
View
@@ -255,15 +255,15 @@ void USBJrkDialog::onJrkReadWrite(void)
}
if(wFlags & WF_CALIB_MIN_FB) {
- ui->feedbackMin->setValue(jrkusb->vars.scaledFeedback);
- ui->feedbackDisconnectMin->setValue(jrkusb->vars.scaledFeedback / 2);
+ ui->feedbackMin->setValue(jrkusb->vars.feedback);
+ ui->feedbackDisconnectMin->setValue(jrkusb->vars.feedback - 20);
wFlags &= ~WF_CALIB_MIN_FB;
}
if(wFlags & WF_CALIB_MAX_FB) {
- ui->feedbackMax->setValue(jrkusb->vars.scaledFeedback);
- ui->feedbackDisconnectMax->setValue(jrkusb->vars.scaledFeedback + (4095 - jrkusb->vars.scaledFeedback) / 2);
+ ui->feedbackMax->setValue(jrkusb->vars.feedback);
+ ui->feedbackDisconnectMax->setValue(jrkusb->vars.feedback + 20); // (4095 - jrkusb->vars.scaledFeedback) / 2);
wFlags &= ~WF_CALIB_MAX_FB;
}
@@ -1076,11 +1076,12 @@ void USBJrkDialog::on_recordLUTButton_clicked()
ui->recordLUTButton->setText("Record");
+ ui->mindegSb->setValue(jrkusb->minDegrees());
+ ui->maxdegSb->setValue(jrkusb->maxDegrees());
+
return;
}
-
-
if(!jrk || !compass || !compass->isOpen()) {
qDebug("FATAL Error: on_recordLUTButton_clicked.");
return;
View
@@ -18,7 +18,7 @@
<rect>
<x>10</x>
<y>10</y>
- <width>1007</width>
+ <width>631</width>
<height>721</height>
</rect>
</property>
@@ -707,13 +707,6 @@
</property>
</widget>
</item>
- <item row="3" column="4">
- <widget class="QPushButton" name="applyDegBtn">
- <property name="text">
- <string>Apply</string>
- </property>
- </widget>
- </item>
<item row="7" column="0">
<widget class="QLabel" name="label_44">
<property name="text">
@@ -747,6 +740,13 @@
</property>
</widget>
</item>
+ <item row="6" column="4">
+ <widget class="QPushButton" name="applyDegBtn">
+ <property name="text">
+ <string>Apply</string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</widget>
@@ -1455,15 +1455,11 @@
</item>
<item row="0" column="2">
<widget class="QPushButton" name="velocityBtn">
- <property name="text">
- <string>Start</string>
+ <property name="enabled">
+ <bool>false</bool>
</property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QCheckBox" name="checkBox">
<property name="text">
- <string>CheckBox</string>
+ <string>Start</string>
</property>
</widget>
</item>
View
@@ -332,10 +332,10 @@
<number>1</number>
</property>
<property name="minimum">
- <double>-90.000000000000000</double>
+ <double>-180.000000000000000</double>
</property>
<property name="maximum">
- <double>90.000000000000000</double>
+ <double>180.000000000000000</double>
</property>
</widget>
</item>

0 comments on commit a7e65b3

Please sign in to comment.