Fixed GUI output of RA/DEC d and out values

master
Stefan Jahn 2 years ago
parent 4830b0fd1f
commit c54953fcc8

@ -310,15 +310,15 @@ void cb_posctl_angles_draw(GtkWidget *area, cairo_t *cr, int w, int h, gpointer
cairo_stroke(cr); cairo_stroke(cr);
// draw distance to axis // draw distance to axis
lpos.x = sindeg(posctl.calib_axis1.a) * posctl.axis_pv[0] * pscale; lpos.x = sindeg(posctl.calib_axis1.a) * posctl.axis_pv[AXIS_DEC] * pscale;
lpos.y = cosdeg(posctl.calib_axis1.a) * posctl.axis_pv[0] * pscale; lpos.y = cosdeg(posctl.calib_axis1.a) * posctl.axis_pv[AXIS_DEC] * pscale;
cairo_move_to(cr, center.x + p.x, center.y + p.y); cairo_move_to(cr, center.x + p.x, center.y + p.y);
cairo_line_to(cr, center.x + p.x + lpos.x, center.y + p.y + lpos.y); cairo_line_to(cr, center.x + p.x + lpos.x, center.y + p.y + lpos.y);
cairo_stroke(cr); cairo_stroke(cr);
// draw distance to axis // draw distance to axis
lpos.x = sindeg(posctl.calib_axis2.a) * posctl.axis_pv[1] * pscale; lpos.x = sindeg(posctl.calib_axis2.a) * posctl.axis_pv[AXIS_RA] * pscale;
lpos.y = cosdeg(posctl.calib_axis2.a) * posctl.axis_pv[1] * pscale; lpos.y = cosdeg(posctl.calib_axis2.a) * posctl.axis_pv[AXIS_RA] * pscale;
cairo_move_to(cr, center.x + p.x, center.y + p.y); cairo_move_to(cr, center.x + p.x, center.y + p.y);
cairo_line_to(cr, center.x + p.x + lpos.x, center.y + p.y + lpos.y); cairo_line_to(cr, center.x + p.x + lpos.x, center.y + p.y + lpos.y);
cairo_stroke(cr); cairo_stroke(cr);
@ -534,14 +534,14 @@ void posctl_gui_update() {
gtk_label_set_text (GTK_LABEL(lb_axisaxis), txt); gtk_label_set_text (GTK_LABEL(lb_axisaxis), txt);
gtk_entry_set_text (GTK_ENTRY(e_posdevice), posctl.GetDevice().c_str()); gtk_entry_set_text (GTK_ENTRY(e_posdevice), posctl.GetDevice().c_str());
strfromd (txt, sizeof(txt-1), (char *)"%f", posctl.axis_op[0]); strfromd (txt, sizeof(txt-1), (char *)"%f", posctl.axis_op[AXIS_RA]);
gtk_label_set_text(GTK_LABEL(ra_out), txt); gtk_label_set_text(GTK_LABEL(ra_out), txt);
strfromd (txt, sizeof(txt-1), (char *)"%f", posctl.axis_op[1]); strfromd (txt, sizeof(txt-1), (char *)"%f", posctl.axis_op[AXIS_DEC]);
gtk_label_set_text(GTK_LABEL(dec_out), txt); gtk_label_set_text(GTK_LABEL(dec_out), txt);
strfromd (txt, sizeof(txt-1), (char *)"%f", posctl.axis_pv[0]); strfromd (txt, sizeof(txt-1), (char *)"%f", posctl.axis_pv[AXIS_RA]);
gtk_label_set_text(GTK_LABEL(ra_pv), txt); gtk_label_set_text(GTK_LABEL(ra_pv), txt);
strfromd (txt, sizeof(txt-1), (char *)"%f", posctl.axis_pv[1]); strfromd (txt, sizeof(txt-1), (char *)"%f", posctl.axis_pv[AXIS_DEC]);
gtk_label_set_text(GTK_LABEL(dec_pv), txt); gtk_label_set_text(GTK_LABEL(dec_pv), txt);
posctl.GetAxisParam(AXIS_RA, &mi, &ma, &kp, &ki, &kd); posctl.GetAxisParam(AXIS_RA, &mi, &ma, &kp, &ki, &kd);

Loading…
Cancel
Save