DSPControl.C

Go to the documentation of this file.
00001 /* Gnome gxsm - Gnome X Scanning Microscopy
00002  * universal STM/AFM/SARLS/SPALEED/... controlling and
00003  * data analysis software
00004  * 
00005  * Gxsm Plugin Name: DSPControl.C
00006  * ========================================
00007  * 
00008  * Copyright (C) 1999 The Free Software Foundation
00009  *
00010  * Authors: Percy Zahl <zahl@fkp.uni-hannover.de>
00011  * additional features: Andreas Klust <klust@fkp.uni-hannover.de>
00012  *
00013  * This program is free software; you can redistribute it and/or modify
00014  * it under the terms of the GNU General Public License as published by
00015  * the Free Software Foundation; either version 2 of the License, or
00016  * (at your option) any later version.
00017  *
00018  * This program is distributed in the hope that it will be useful,
00019  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00021  * GNU General Public License for more details.
00022  *
00023  * You should have received a copy of the GNU General Public License
00024  * along with this program; if not, write to the Free Software
00025  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
00026  */
00027 
00028 
00029 /* Please do not change the Begin/End lines of this comment section!
00030  * this is a LaTeX style section used for auto generation of the PlugIn Manual 
00031  * Chapter. Add a complete PlugIn documentation inbetween the Begin/End marks!
00032  * All "% PlugInXXX" commentary tags are mandatory
00033  * All "% OptPlugInXXX" tags are optional
00034  * --------------------------------------------------------------------------------
00035 % PlugInModuleIgnore
00036 
00037 % BeginPlugInDocuSection
00038 % PlugInDocuCaption: DSP Feedback and Scan Control (OBSOLETE)
00039 % PlugInName: DSPControl
00040 % PlugInAuthor: Percy Zahl
00041 % PlugInAuthorEmail: zahl@users.sf.net
00042 % PlugInMenuPath: Windows/DSP Control
00043 
00044 % PlugInDescription
00045 This the main DSP feedback control panel. Here the feedback parameters
00046 and tunneling/force settings are adjusted. The feedback loop can also
00047 be disabled/enabled here. The second purpose of this control panel is
00048 the adjustment of all scan parameters of the digital vector scan
00049 generator like speed and subsampling.
00050 
00051 \GxsmScreenShot{DSPControl}{The DSPControl window.}
00052 
00053 %% PlugInUsage
00054 
00055 % OptPlugInSubSection: Proportional Integral Feedback Loop Control
00056 
00057 \begin{figure}[hbt]
00058 \includegraphics[width=10cm]{feedbk}
00059 \caption{Control circuit - scheme (STM)}
00060 \label{feedbk}
00061 \end{figure}
00062 
00063 All control parameters of the digital vector scan generator are set in
00064 this dialog. In STM-mode $U$ is the tunnel voltage and $I$ the tunneling
00065 current setpoint. In AFM-mode the setpoint -- that is the voltage or
00066 corresponding force to which the z-force-signal from the PSD should
00067 be adjusted to -- is used for the feedback, $I$ and $U$ are without
00068 function in this case.
00069 
00070 The control behaviour -- \menuentry{FeedBack - Characteristics} -- is set
00071 through \textbf{CP} (proportional part) and \textbf{CI} (integral part).
00072 
00073 Recipe if no sensible values are known:
00074 \begin{enumerate}
00075 \item Set CP to zero, CI to 0.0005. If you now change the z-offset,
00076   the control should follow slowly -- typical stable values are around 0.001.
00077 \item Increase CI slowly until the control behaviour begins to become
00078   unstable. When you abruptly change z-offset the control oscillates.
00079 \item Now decrease CI again until all oscillations are gone.  
00080 \item Set CP to 100\% to 200\% of CI to stabilize the control.
00081 \end{enumerate}
00082 You may increase CI and CP experimentally for quicker response.
00083 
00084 \textbf{CS} is a slope correction in the case, that your sample is
00085 tilted towards the intended optimal focus plane.  CS=1 results in the
00086 addition of the mean slope to lighten the load off the
00087 z-signal-correction.  CS=0 prevents this slope correction, CS=0.5 adds
00088 only the half of the extrapolated height, CS$>$1 adds accordingly more
00089 than the average slope would suggest. Usage of the slope parameter CS
00090 is dependent on the DSP software version.
00091 
00092 % OptPlugInSubSection: Scan Characteristics
00093 
00094 \begin{figure}[hbt]
00095 \includegraphics[width=14cm]{scanandsample}
00096 \caption{Linescan execution}
00097 \label{linescan}
00098 \end{figure}
00099 
00100 The dialog allows the user to set the following scan properties:
00101 
00102 A 2D-Scan is defined by a parameter set: Size (range X, Y), and a
00103 number of points in X and Y (points x, y). With this information one
00104 can calculate the sample dot distance (dx, dy). This dx and dy have to
00105 be a integer multiple of the smallest possible stepwidth
00106 (\filename{DA-unit}) and, as a consequence, the total range has to be
00107 a multiple of the small stepwidth (dx, resp. dy).
00108 \GxsmNote{In principal this is not necessary, because the integer data 
00109 acquisition position could be rounded up, but it is not really a disadvantage:
00110 It assures a very continous scanning with constant and precise step width.}
00111 
00112 If the stepwidth is large, it leads to a smoother movement not
00113 to jump from sample point to sample point, but to define some intermediate
00114 steps (Inter-steps).
00115 
00116 Inter-steps contains the stepwidth of intermediate steps in multiples of
00117 DA-units. An entry of 1 means, that the range between two sample points
00118 is covered via steps of the length 1xDA-unit. A smaller value is not
00119 possible.
00120 
00121 During a scan for position changes the \GxsmEmph{Line} entry is used, otherwise
00122 the \GxsmEmph{Move} entry.
00123 
00124 Additionaly it is possible to stay for some time at any sample point.
00125 The textfield \GxsmEmph{FB-Loops} contains the number of feedback-loops which
00126 halts the scanhead for a limited time. The loop runs with 50 kHz. 
00127 
00128 The parameter \GxsmEmph{N} sets the how often at any position a value is sampled.
00129 After these values are measured. The result is their average.
00130 
00131 \GxsmEmph{Pre} defined the number of steps, which are scanned before any
00132 data acquisition takes place.
00133 
00134 \GxsmEmph{DPL} (dots per line) and \GxsmEmph{dos distance} (in DA-units) cannot be set.
00135 They are FYI only and set at scan-start
00136 
00137 %% OptPlugInSection: replace this by the section caption
00138 
00139 %% OptPlugInSubSection: replace this line by the subsection caption
00140 
00141 % OptPlugInConfig
00142 
00143 % OptPlugInKnownBugs
00144 Dual Mode is still beta! Be careful and prepared something worse could
00145 happen\dots! But testing reports are welcome!
00146 \GxsmScreenShot{DSPControl-Dual}{This is how the DSPControl window
00147 looks like in dual mode.}
00148 
00149 % OptPlugInNotes
00150 CS usage depends on DSP program version running.
00151 
00152 % OptPlugInHints
00153 I have a lot\dots
00154 
00155 % EndPlugInDocuSection
00156  * -------------------------------------------------------------------------------- 
00157  */
00158 
00159 #include <gtk/gtk.h>
00160 #include "config.h"
00161 #include "gxsm/plugin.h"
00162 
00163 #include "gxsm/unit.h"
00164 #include "gxsm/pcs.h"
00165 #include "gxsm/xsmtypes.h"
00166 #include "gxsm/glbvars.h"
00167 
00168 #include "include/dsp-pci32/xsm/xsmcmd.h"
00169 
00170 
00171 
00172                                         static void DSPControl_about( void );
00173 static void DSPControl_query( void );
00174 static void DSPControl_cleanup( void );
00175 
00176 static void DSPControl_show_callback( GtkWidget*, void* );
00177 static void DSPControl_StartScan_callback( gpointer );
00178 
00179 GxsmPlugin DSPControl_pi = {
00180         NULL,
00181         NULL,
00182         0,
00183         NULL,
00184         "DSPControl",
00185         "+spmHARD +Innovative_DSP:SPMHARD +STM +AFM +SARLS",
00186 //      "+ALL",
00187         NULL,
00188         "Percy Zahl",
00189         N_("_Windows/"),
00190         N_("DSP Control"),
00191         N_("open the DSP feedback/scan controlwindow"),
00192         "DSP feedback control",
00193         NULL,
00194         NULL,
00195         NULL,
00196         DSPControl_query,
00197         DSPControl_about,
00198         NULL,
00199         NULL,
00200         DSPControl_cleanup
00201 };
00202 
00203 static const char *about_text = N_(
00204         "Gxsm DSPControl Plugin:\n"
00205         "This plugin runs a control window to set "
00206         "the DSP feedback and scan characteristics.\n"
00207         "The digital feedback can be turned on and off, "
00208         "All feedback constants (CP, CI, CS (slope) are "
00209         "controlled here.\n"
00210         "Via scan characteristics the digital DSP vector scan "
00211         "generator is programmed."
00212         );
00213 
00214 GxsmPlugin *get_gxsm_plugin_info ( void ){ 
00215         DSPControl_pi.description = g_strdup_printf(N_("Gxsm DSPControl plugin %s"), VERSION);
00216         return &DSPControl_pi; 
00217 }
00218 
00219 
00220 typedef union AmpIndex {
00221         struct { unsigned char ch, x, y, z; } s;
00222         unsigned long   l;
00223 };
00224 
00225 typedef struct DSP_Param{
00226         /* Feedback Control */
00227         double        UTunnel;                /* Tunnelspannung */
00228         double        ITunnelSoll;            /* Tunnelsollstrom */
00229         double        SetPoint;               /* AFM FB Setpoint */
00230         double        LogOffset;              /* Offset f<FC>r Logregler */
00231         double        LogSkl;                 /* Logskalierung */
00232         double        usrCP, usrCI, usrCD;    /* Reglerkonstante User */
00233         double        CP, CI, CS, tau;        /* Reglerkonstante DSP (scaled) */
00234         double        Rotation;               /* Bilddrehwinkel */
00235         double        fb_frq;                 /* Timerfrequenz des Regelinterrupts [Hz] */
00236         double        fir_fg;                 /* FIR Grenzfrq. / LowPass */
00237         int           LinLog;                 /* Lin / Log Flag */
00238 
00239         /* Scan Control */
00240         int   LS_nx2scan;             /* Scanlinel<E4>nge */
00241         int   LS_nx_pre;              /* Scan Vorlaufl<E4>nge */
00242         int   LS_dnx;                 /* Me<DF>punktabstand */
00243         int   LS_stepsize;            /* max. Schrittweite */
00244         int   LS_nRegel;              /* Anzahl Reglerdurchl<E4>ufe je Schritt */
00245         int   LS_nAve;                /* Anzahl durchzuf<FC>hrender Mittelungen */
00246         int   LS_IntAve;              /* =0: kein IntAve, =1: Aufsummieren von Punkte zu Punkt */
00247 
00248         int   MV_stepsize;            /* max. Schrittweite f<FC>r MoveTo */
00249         int   MV_nRegel;              /* Anzahl Reglerdurchl<E4>ufe je Schritt */
00250 };
00251 
00252 DSP_Param data_hardpars;
00253 DSP_Param data_hardpars_dual;
00254 
00255 
00256 typedef struct DSP_Param_Mover{
00257         /* Mover Control */
00258         double MOV_Ampl, MOV_Speed, MOV_Steps;
00259 
00260         /* Auto Approch */
00261         int    TIP_nSteps;            /* Anzahl Z Steps (grob) */
00262         double TIP_Delay;             /* Anzahl Wartezyclen zwischen Z-Steps */
00263         int    TIP_DUz;               /* Schrittweite f<FC>r Z-Piezo-Spannung "ran" */
00264         int    TIP_DUzRev;            /* Schrittweite f<FC>r Z-Piezo-Spannung "zur<FC>ck" */
00265 
00266         /* AFM special */
00267 #define DSP_AFMMOV_MODES 4
00268         double  AFM_Amp, AFM_Speed, AFM_Steps; /* AFM Besocke Kontrolle */
00269         double  AFM_usrAmp[DSP_AFMMOV_MODES];
00270         double  AFM_usrSpeed[DSP_AFMMOV_MODES], AFM_usrSteps[DSP_AFMMOV_MODES]; /* Parameter Memory */
00271 
00272         /* SPA-LEED special */
00273         double SPA_Energy, SPA_EnergyVolt;
00274         double SPA_Gatetime;
00275         double SPA_Length;
00276 };
00277  
00278 class DSPControl : public AppBase{
00279 #define DSP_FB_ON  1
00280 #define DSP_FB_OFF 0
00281 public:
00282         DSPControl();
00283         virtual ~DSPControl();
00284         
00285         void update();
00286         void updateDSP(int FbFlg=-1);
00287         static void ExecCmd(int cmd);
00288         static void ChangedNotify(Param_Control* pcs, gpointer data);
00289         static int ChangedAction(GtkWidget *widget, DSPControl *dspc);
00290         static int feedback_callback(GtkWidget *widget, DSPControl *dspc);
00291         static int dualmode_callback(GtkWidget *widget, DSPControl *dspc);
00292         static int choice_Ampl_callback(GtkWidget *widget, DSPControl *dspc);
00293 private:
00294         GSList *RemoteEntryList;
00295         UnitObj *Unity, *Volt, *Current, *SetPtUnit;
00296         DSP_Param *dsp, *dsp_dual;
00297         GtkWidget *DualSettingsFrame;
00298 };
00299 
00300 
00301 DSPControl *DSPControlClass = NULL;
00302 
00303 static void DSPControl_query(void)
00304 {
00305         static GnomeUIInfo menuinfo[] = { 
00306                 { GNOME_APP_UI_ITEM, 
00307                   DSPControl_pi.menuentry, DSPControl_pi.help,
00308                   (gpointer) DSPControl_show_callback, NULL,
00309                   NULL, GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_BLANK, 
00310                   0, GDK_CONTROL_MASK, NULL },
00311 
00312                 GNOMEUIINFO_END
00313         };
00314 
00315         gnome_app_insert_menus
00316                 ( GNOME_APP(DSPControl_pi.app->getApp()), 
00317                   DSPControl_pi.menupath, menuinfo );
00318 
00319         // new ...
00320         DSPControlClass = new DSPControl;
00321 
00322         DSPControlClass->SetResName ("WindowDSPControl", "false", xsmres.geomsave);
00323 
00324         DSPControl_pi.app->ConnectPluginToStartScanEvent
00325                 ( DSPControl_StartScan_callback );
00326 
00327         DSPControl_pi.status = g_strconcat(N_("Plugin query has attached "),
00328                                            DSPControl_pi.name, 
00329                                            N_(": DSPControl is created."),
00330                                            NULL);
00331 }
00332 
00333 static void DSPControl_about(void)
00334 {
00335         const gchar *authors[] = { "Percy Zahl", NULL};
00336         gtk_widget_show(gnome_about_new ( DSPControl_pi.name,
00337                                           VERSION,
00338                                           N_("(C) 2000 the Free Software Foundation"),
00339                                           about_text,
00340                                           authors,
00341                                           NULL, NULL, NULL
00342                                 ));
00343 }
00344 
00345 static void DSPControl_cleanup( void ){
00346         PI_DEBUG (DBG_L2, "DSPControl Plugin Cleanup" );
00347         gchar *mp = g_strconcat(DSPControl_pi.menupath, DSPControl_pi.menuentry, NULL);
00348         gnome_app_remove_menus (GNOME_APP( DSPControl_pi.app->getApp() ), mp, 1);
00349         g_free(mp);
00350 
00351         // delete ...
00352         if( DSPControlClass )
00353                 delete DSPControlClass ;
00354 }
00355 
00356 static void DSPControl_show_callback( GtkWidget* widget, void* data){
00357         if( DSPControlClass )
00358                 DSPControlClass->show();
00359 }
00360 
00361 static void DSPControl_StartScan_callback( gpointer ){
00362         DSPControlClass->update();
00363 }
00364 
00365 // Achtung: Remote is not released :=(
00366 // DSP-Param sollten lokal werden...
00367 DSPControl::DSPControl ()
00368 {
00369         XsmRescourceManager xrm("innovative_dsp_hwi_control");
00370 
00371         int i,j;
00372         AmpIndex  AmpI;
00373         GSList *EC_list=NULL;
00374 
00375         RemoteEntryList = NULL;
00376 
00377         Gtk_EntryControl *ec;
00378 
00379         GtkWidget *box;
00380         GtkWidget *frame_param, *vbox_param, *hbox_param;
00381 
00382         GtkWidget *input;
00383 
00384         GtkWidget* wid, *label;
00385         GtkWidget* menu;
00386         GtkWidget* menuitem;
00387         GtkWidget *checkbutton;
00388 
00389         Unity    = new UnitObj(" "," ");
00390         Volt     = new UnitObj("V","V");
00391         Current  = new UnitObj("nA","nA");
00392         SetPtUnit = gapp->xsm->MakeUnit (xsmres.daqZunit[0], xsmres.daqZlabel[0]);
00393         if (strncmp (xsmres.daqZunit[0], "nN", 2) == 0) SetPtUnit->setval ("f", xsmres.nNewton2Volt);
00394         if (strncmp (xsmres.daqZunit[0], "Hz", 2) == 0) SetPtUnit->setval ("f", xsmres.dHertz2Volt);
00395 
00396         // shorthand
00397         dsp = &data_hardpars;
00398         dsp_dual = &data_hardpars_dual;
00399 
00400         // get values from resources
00401         xrm.Get("data_hardpars.UTunnel", &data_hardpars.UTunnel, "2.0");
00402         xrm.Get("data_hardpars_dual.UTunnel", &data_hardpars_dual.UTunnel, "2.0");
00403         xrm.Get("data_hardpars.ITunnelSoll", &data_hardpars.ITunnelSoll, "0.8");
00404         xrm.Get("data_hardpars_dual.ITunnelSoll", &data_hardpars_dual.ITunnelSoll, "0.8");
00405         xrm.Get("data_hardpars.SetPoint", &data_hardpars.SetPoint, "-1.0");
00406         xrm.Get("data_hardpars_dual.SetPoint", &data_hardpars_dual.SetPoint, "-1.0");
00407         xrm.Get("data_hardpars.LogOffset", &data_hardpars.LogOffset, "100.0");
00408         xrm.Get("data_hardpars_dual.LogOffset", &data_hardpars_dual.LogOffset, "100.0");
00409         xrm.Get("data_hardpars.LogSkl", &data_hardpars.LogSkl, "5.0");
00410         xrm.Get("data_hardpars_dual.LogSkl", &data_hardpars_dual.LogSkl, "5.0");
00411         xrm.Get("data_hardpars.usrCP", &data_hardpars.usrCP, "0.01");
00412         xrm.Get("data_hardpars_dual.usrCP", &data_hardpars_dual.usrCP, "0.01");
00413         xrm.Get("data_hardpars.usrCI", &data_hardpars.usrCI, "0.01");
00414         xrm.Get("data_hardpars_dual.usrCI", &data_hardpars_dual.usrCI, "0.01");
00415         xrm.Get("data_hardpars.CS", &data_hardpars.CS, "1.0");
00416         xrm.Get("data_hardpars_dual.CS", &data_hardpars_dual.CS, "1.0");
00417         xrm.Get("data_hardpars.Rotation", &data_hardpars.Rotation, "0.0");
00418         xrm.Get("data_hardpars_dual.Rotation", &data_hardpars_dual.Rotation, "0.0");
00419         xrm.Get("data_hardpars.fb_frq", &data_hardpars.fb_frq, "50000");
00420         xrm.Get("data_hardpars_dual.fb_frq", &data_hardpars_dual.fb_frq, "50000");
00421         xrm.Get("data_hardpars.fir_fg", &data_hardpars.fir_fg, "3000");
00422         xrm.Get("data_hardpars_dual.fir_fg", &data_hardpars_dual.fir_fg, "3000");
00423         xrm.Get("data_hardpars.LinLog", &data_hardpars.LinLog, "0");
00424         xrm.Get("data_hardpars_dual.LinLog", &data_hardpars_dual.LinLog, "0");
00425         xrm.Get("data_hardpars.LS_nx2scan", &data_hardpars.LS_nx2scan, "1");
00426         xrm.Get("data_hardpars_dual.LS_nx2scan", &data_hardpars_dual.LS_nx2scan, "1");
00427         xrm.Get("data_hardpars.LS_nx_pre", &data_hardpars.LS_nx_pre, "10");
00428         xrm.Get("data_hardpars_dual.LS_nx_pre", &data_hardpars_dual.LS_nx_pre, "10");
00429         xrm.Get("data_hardpars.LS_dnx", &data_hardpars.LS_dnx, "1");
00430         xrm.Get("data_hardpars_dual.LS_dnx", &data_hardpars_dual.LS_dnx, "1");
00431         xrm.Get("data_hardpars.LS_stepsize", &data_hardpars.LS_stepsize, "1");
00432         xrm.Get("data_hardpars_dual.LS_stepsize", &data_hardpars_dual.LS_stepsize, "1");
00433         xrm.Get("data_hardpars.LS_nRegel", &data_hardpars.LS_nRegel, "5");
00434         xrm.Get("data_hardpars_dual.LS_nRegel", &data_hardpars_dual.LS_nRegel, "1");
00435         xrm.Get("data_hardpars.LS_nAve", &data_hardpars.LS_nAve, "1");
00436         xrm.Get("data_hardpars_dual.LS_nAve", &data_hardpars_dual.LS_nAve, "1");
00437         xrm.Get("data_hardpars.LS_IntAve", &data_hardpars.LS_IntAve, "1");
00438         xrm.Get("data_hardpars_dual.LS_IntAve", &data_hardpars_dual.LS_IntAve, "1");
00439         xrm.Get("data_hardpars.MV_stepsize", &data_hardpars.MV_stepsize, "1");
00440         xrm.Get("data_hardpars_dual.MV_stepsize", &data_hardpars_dual.MV_stepsize, "1");
00441         xrm.Get("data_hardpars.MV_nRegel", &data_hardpars.MV_nRegel, "5");
00442         xrm.Get("data_hardpars_dual.MV_nRegel", &data_hardpars_dual.MV_nRegel, "1");
00443 
00444 
00445 
00446         AppWidgetInit(N_("DSP Control"));
00447 
00448         box = gtk_vbox_new (FALSE, 0);
00449         gtk_widget_show (box);
00450         gtk_box_pack_start (GTK_BOX (vbox), box, TRUE, TRUE, 0);
00451 
00452         // ========================================
00453         frame_param = gtk_frame_new (N_("FB Characteristics for <-> or -> Scandir in Dual Mode"));
00454         gtk_widget_show (frame_param);
00455         gtk_container_add (GTK_CONTAINER (box), frame_param);
00456 
00457         vbox_param = gtk_vbox_new (FALSE, 0);
00458         gtk_widget_show (vbox_param);
00459         gtk_container_add (GTK_CONTAINER (frame_param), vbox_param);
00460 
00461         // ------- FB Characteristics
00462 
00463         hbox_param = gtk_hbox_new (FALSE, 0);
00464         gtk_widget_show (hbox_param);
00465         gtk_container_add (GTK_CONTAINER (vbox_param), hbox_param);
00466         label = gtk_label_new (N_("FB Switch"));
00467         gtk_widget_set_usize (label, 100, -1);
00468         gtk_widget_show (label);
00469         gtk_box_pack_start (GTK_BOX (hbox_param), label, FALSE, TRUE, 0);
00470 
00471         checkbutton = gtk_check_button_new_with_label(N_("Feed Back"));
00472         gtk_widget_set_usize (checkbutton, 100, -1);
00473         gtk_box_pack_start (GTK_BOX (hbox_param), checkbutton, TRUE, TRUE, 0);
00474         gtk_widget_show (checkbutton);
00475         gtk_signal_connect (GTK_OBJECT (checkbutton), "clicked",
00476                             GTK_SIGNAL_FUNC (DSPControl::feedback_callback), this);
00477 
00478         checkbutton = gtk_check_button_new_with_label(N_("Dual DSP Settings"));
00479         gtk_widget_set_usize (checkbutton, 100, -1);
00480         gtk_box_pack_start (GTK_BOX (hbox_param), checkbutton, TRUE, TRUE, 0);
00481         gtk_widget_show (checkbutton);
00482         gtk_signal_connect (GTK_OBJECT (checkbutton), "clicked",
00483                             GTK_SIGNAL_FUNC (DSPControl::dualmode_callback), this);
00484 
00485 
00486         input = mygtk_create_input("U", vbox_param, hbox_param);
00487         ec = new Gtk_EntryControl (Volt, MLD_WERT_NICHT_OK, &dsp->UTunnel, -10., 10., "5g", input, 0.0001);
00488         ec->Set_ChangeNoticeFkt(DSPControl::ChangedNotify, this);
00489         EC_list = g_slist_prepend( EC_list, ec);
00490         RemoteEntryList = ec->AddEntry2RemoteList("DSP_U", RemoteEntryList);
00491 
00492         input = mygtk_add_input("CP", hbox_param);
00493         ec = new Gtk_EntryControl (Unity, MLD_WERT_NICHT_OK, &dsp->usrCP, -10., 10., "5g", input);
00494         ec->Set_ChangeNoticeFkt(DSPControl::ChangedNotify, this);
00495         EC_list = g_slist_prepend( EC_list, ec);
00496         RemoteEntryList = ec->AddEntry2RemoteList("DSP_CP", RemoteEntryList);
00497 
00498         input = mygtk_create_input("I", vbox_param, hbox_param);
00499         ec = new Gtk_EntryControl (Current, MLD_WERT_NICHT_OK, &dsp->ITunnelSoll, 0.0001, 50., "5g", input);
00500         ec->Set_ChangeNoticeFkt(DSPControl::ChangedNotify, this);
00501         EC_list = g_slist_prepend( EC_list, ec);
00502         RemoteEntryList = ec->AddEntry2RemoteList("DSP_I", RemoteEntryList);
00503 
00504         input = mygtk_add_input("CI", hbox_param);
00505         ec = new Gtk_EntryControl (Unity, MLD_WERT_NICHT_OK, &dsp->usrCI, -10., 10., "5g", input);
00506         ec->Set_ChangeNoticeFkt(DSPControl::ChangedNotify, this);
00507         EC_list = g_slist_prepend( EC_list, ec);
00508         RemoteEntryList = ec->AddEntry2RemoteList("DSP_CI", RemoteEntryList);
00509 
00510         input = mygtk_create_input("SetPoint", vbox_param, hbox_param);
00511         ec = new Gtk_EntryControl (SetPtUnit, MLD_WERT_NICHT_OK, &dsp->SetPoint, -500., 500., "5g", input);
00512         ec->Set_ChangeNoticeFkt(DSPControl::ChangedNotify, this);
00513         EC_list = g_slist_prepend( EC_list, ec);
00514         RemoteEntryList = ec->AddEntry2RemoteList("DSP_SetPoint", RemoteEntryList);
00515 
00516         input = mygtk_add_input("CS", hbox_param);
00517         ec = new Gtk_EntryControl (Unity, MLD_WERT_NICHT_OK, &dsp->CS, 0., 4., "5g", input);
00518         ec->Set_ChangeNoticeFkt(DSPControl::ChangedNotify, this);
00519         EC_list = g_slist_prepend( EC_list, ec);
00520         RemoteEntryList = ec->AddEntry2RemoteList("DSP_CS", RemoteEntryList);
00521 
00522 
00523 
00524         // ========================================
00525         frame_param = gtk_frame_new (N_("Scan Characteristics"));
00526         gtk_widget_show (frame_param);
00527         gtk_container_add (GTK_CONTAINER (box), frame_param);
00528 
00529         vbox_param = gtk_vbox_new (FALSE, 0);
00530         gtk_widget_show (vbox_param);
00531         gtk_container_add (GTK_CONTAINER (frame_param), vbox_param);
00532 
00533         input = mygtk_create_input("Move Spd:", vbox_param, hbox_param);
00534         ec = new Gtk_EntryControl (Unity, MLD_WERT_NICHT_OK, &dsp->MV_stepsize, 1., 100., "4.0f", input);
00535         ec->Set_ChangeNoticeFkt(DSPControl::ChangedNotify, this);
00536         EC_list = g_slist_prepend( EC_list, ec);
00537         RemoteEntryList = ec->AddEntry2RemoteList("DSP_MoveSpd", RemoteEntryList);
00538 
00539         input = mygtk_add_input("#Loops", hbox_param);
00540         ec = new Gtk_EntryControl (Unity, MLD_WERT_NICHT_OK, &dsp->MV_nRegel, 1., 1000., "4.0f", input);
00541         ec->Set_ChangeNoticeFkt(DSPControl::ChangedNotify, this);
00542         EC_list = g_slist_prepend( EC_list, ec);
00543         RemoteEntryList = ec->AddEntry2RemoteList("DSP_MoveLoops", RemoteEntryList);
00544 
00545         input = mygtk_create_input("Scan Spd:", vbox_param, hbox_param);
00546         ec = new Gtk_EntryControl (Unity, MLD_WERT_NICHT_OK, &dsp->LS_stepsize, 1., 1000., "4.0f", input);
00547         ec->Set_ChangeNoticeFkt(DSPControl::ChangedNotify, this);
00548         EC_list = g_slist_prepend( EC_list, ec);
00549         RemoteEntryList = ec->AddEntry2RemoteList("DSP_ScanSpd", RemoteEntryList);
00550 
00551         input = mygtk_add_input("#Loops", hbox_param);
00552         ec = new Gtk_EntryControl (Unity, MLD_WERT_NICHT_OK, &dsp->LS_nRegel, 1., 1000., "4.0f", input);
00553         ec->Set_ChangeNoticeFkt(DSPControl::ChangedNotify, this);
00554         EC_list = g_slist_prepend( EC_list, ec);
00555         RemoteEntryList = ec->AddEntry2RemoteList("DSP_ScanLoops", RemoteEntryList);
00556 
00557         input = mygtk_create_input("#Pre:", vbox_param, hbox_param);
00558         ec = new Gtk_EntryControl (Unity, MLD_WERT_NICHT_OK, &dsp->LS_nx_pre, 0., 1000., "4.0f", input);
00559         ec->Set_ChangeNoticeFkt(DSPControl::ChangedNotify, this);
00560         EC_list = g_slist_prepend( EC_list, ec);
00561         RemoteEntryList = ec->AddEntry2RemoteList("DSP_Pre", RemoteEntryList);
00562 
00563         input = mygtk_add_input("#N Avg", hbox_param);
00564         ec = new Gtk_EntryControl (Unity, MLD_WERT_NICHT_OK, &dsp->LS_nAve, 1., 1000., "4.0f", input);
00565         ec->Set_ChangeNoticeFkt(DSPControl::ChangedNotify, this);
00566         EC_list = g_slist_prepend( EC_list, ec);
00567         RemoteEntryList = ec->AddEntry2RemoteList("DSP_NAvg", RemoteEntryList);
00568 
00569 
00570         input = mygtk_create_input("DPL:", vbox_param, hbox_param);
00571         gtk_entry_set_editable(GTK_ENTRY(input), FALSE);
00572         ec = new Gtk_EntryControl (Unity, MLD_WERT_NICHT_OK, &dsp->LS_nx2scan, 0., 9999., "4.0f", input);
00573         EC_list = g_slist_prepend( EC_list, ec);
00574 
00575         input = mygtk_add_input("DDist", hbox_param);
00576         gtk_entry_set_editable(GTK_ENTRY(input), FALSE);
00577         ec = new Gtk_EntryControl (Unity, MLD_WERT_NICHT_OK, &dsp->LS_dnx, 1., 9999., "4.0f", input);
00578         EC_list = g_slist_prepend( EC_list, ec);
00579 
00580 
00581 
00582         // ======================================== 2nd DSP Set in Dual Mode
00583         frame_param = gtk_frame_new (N_("FB and Scan Characteristics for <- Scan Dir in Dual Mode"));
00584         DualSettingsFrame = frame_param;
00585         //  gtk_widget_show (frame_param);
00586         gtk_container_add (GTK_CONTAINER (box), frame_param);
00587 
00588         vbox_param = gtk_vbox_new (FALSE, 0);
00589         gtk_widget_show (vbox_param);
00590         gtk_container_add (GTK_CONTAINER (frame_param), vbox_param);
00591 
00592         // ------- FB Characteristics
00593 
00594         input = mygtk_create_input("U", vbox_param, hbox_param);
00595         ec = new Gtk_EntryControl (Volt, MLD_WERT_NICHT_OK, &dsp_dual->UTunnel, -10., 10., "5g", input);
00596         ec->Set_ChangeNoticeFkt(DSPControl::ChangedNotify, this);
00597         EC_list = g_slist_prepend( EC_list, ec);
00598         RemoteEntryList = ec->AddEntry2RemoteList("DSP2_U", RemoteEntryList);
00599 
00600         input = mygtk_add_input("CP", hbox_param);
00601         ec = new Gtk_EntryControl (Unity, MLD_WERT_NICHT_OK, &dsp_dual->usrCP, -10., 10., "5g", input);
00602         ec->Set_ChangeNoticeFkt(DSPControl::ChangedNotify, this);
00603         EC_list = g_slist_prepend( EC_list, ec);
00604         RemoteEntryList = ec->AddEntry2RemoteList("DSP2_CP", RemoteEntryList);
00605 
00606         input = mygtk_create_input("I", vbox_param, hbox_param);
00607         ec = new Gtk_EntryControl (Current, MLD_WERT_NICHT_OK, &dsp_dual->ITunnelSoll, 0.0001, 50., "5g", input);
00608         ec->Set_ChangeNoticeFkt(DSPControl::ChangedNotify, this);
00609         EC_list = g_slist_prepend( EC_list, ec);
00610         RemoteEntryList = ec->AddEntry2RemoteList("DSP2_I", RemoteEntryList);
00611 
00612         input = mygtk_add_input("CI", hbox_param);
00613         ec = new Gtk_EntryControl (Unity, MLD_WERT_NICHT_OK, &dsp_dual->usrCI, -10., 10., "5g", input);
00614         ec->Set_ChangeNoticeFkt(DSPControl::ChangedNotify, this);
00615         EC_list = g_slist_prepend( EC_list, ec);
00616         RemoteEntryList = ec->AddEntry2RemoteList("DSP2_CI", RemoteEntryList);
00617 
00618         input = mygtk_create_input("SetPoint", vbox_param, hbox_param);
00619         ec = new Gtk_EntryControl (SetPtUnit, MLD_WERT_NICHT_OK, &dsp_dual->SetPoint, -500., 500., "5g", input);
00620         ec->Set_ChangeNoticeFkt(DSPControl::ChangedNotify, this);
00621         EC_list = g_slist_prepend( EC_list, ec);
00622         RemoteEntryList = ec->AddEntry2RemoteList("DSP2_SetPoint", RemoteEntryList);
00623 
00624         input = mygtk_add_input("CS", hbox_param);
00625         ec = new Gtk_EntryControl (Unity, MLD_WERT_NICHT_OK, &dsp_dual->CS, 0., 2., "5g", input);
00626         ec->Set_ChangeNoticeFkt(DSPControl::ChangedNotify, this);
00627         EC_list = g_slist_prepend( EC_list, ec);
00628         RemoteEntryList = ec->AddEntry2RemoteList("DSP2_CS", RemoteEntryList);
00629 
00630         input = mygtk_create_input("Move Spd:", vbox_param, hbox_param);
00631         ec = new Gtk_EntryControl (Unity, MLD_WERT_NICHT_OK, &dsp_dual->MV_stepsize, 1., 100., "4.0f", input);
00632         ec->Set_ChangeNoticeFkt(DSPControl::ChangedNotify, this);
00633         EC_list = g_slist_prepend( EC_list, ec);
00634         RemoteEntryList = ec->AddEntry2RemoteList("DSP2_MoveSpd", RemoteEntryList);
00635 
00636         input = mygtk_add_input("#Loops", hbox_param);
00637         ec = new Gtk_EntryControl (Unity, MLD_WERT_NICHT_OK, &dsp_dual->MV_nRegel, 1., 1000., "4.0f", input);
00638         ec->Set_ChangeNoticeFkt(DSPControl::ChangedNotify, this);
00639         EC_list = g_slist_prepend( EC_list, ec);
00640         RemoteEntryList = ec->AddEntry2RemoteList("DSP2_MoveLoops", RemoteEntryList);
00641 
00642         input = mygtk_create_input("Scan Spd:", vbox_param, hbox_param);
00643         ec = new Gtk_EntryControl (Unity, MLD_WERT_NICHT_OK, &dsp_dual->LS_stepsize, 1., 1000., "4.0f", input);
00644         ec->Set_ChangeNoticeFkt(DSPControl::ChangedNotify, this);
00645         EC_list = g_slist_prepend( EC_list, ec);
00646         RemoteEntryList = ec->AddEntry2RemoteList("DSP2_ScanSpd", RemoteEntryList);
00647 
00648         input = mygtk_add_input("#Loops", hbox_param);
00649         ec = new Gtk_EntryControl (Unity, MLD_WERT_NICHT_OK, &dsp_dual->LS_nRegel, 1., 1000., "4.0f", input);
00650         ec->Set_ChangeNoticeFkt(DSPControl::ChangedNotify, this);
00651         EC_list = g_slist_prepend( EC_list, ec);
00652         RemoteEntryList = ec->AddEntry2RemoteList("DSP2_ScanLoops", RemoteEntryList);
00653 
00654         input = mygtk_create_input("#Pre:", vbox_param, hbox_param);
00655         ec = new Gtk_EntryControl (Unity, MLD_WERT_NICHT_OK, &dsp_dual->LS_nx_pre, 0., 1000., "4.0f", input);
00656         ec->Set_ChangeNoticeFkt(DSPControl::ChangedNotify, this);
00657         EC_list = g_slist_prepend( EC_list, ec);
00658         RemoteEntryList = ec->AddEntry2RemoteList("DSP2_Pre", RemoteEntryList);
00659 
00660         input = mygtk_add_input("#N Avg", hbox_param);
00661         ec = new Gtk_EntryControl (Unity, MLD_WERT_NICHT_OK, &dsp_dual->LS_nAve, 1., 1000., "4.0f", input);
00662         ec->Set_ChangeNoticeFkt(DSPControl::ChangedNotify, this);
00663         EC_list = g_slist_prepend( EC_list, ec);
00664         RemoteEntryList = ec->AddEntry2RemoteList("DSP2_NAvg", RemoteEntryList);
00665 
00666 
00667 
00668 
00669         // ======================================== Piezo Drive / Amplifier Settings
00670         frame_param = gtk_frame_new (N_("Piezo Drive Settings"));
00671         gtk_widget_show (frame_param);
00672         gtk_container_add (GTK_CONTAINER (box), frame_param);
00673 
00674         vbox_param = gtk_vbox_new (FALSE, 0);
00675         gtk_widget_show (vbox_param);
00676         gtk_container_add (GTK_CONTAINER (frame_param), vbox_param);
00677 
00678         /* Amplifier Settings */
00679         hbox_param = gtk_hbox_new (FALSE, 0);
00680         gtk_widget_show (hbox_param);
00681         gtk_container_add (GTK_CONTAINER (vbox_param), hbox_param);
00682   
00683         for(j=0; j<3; j++){
00684                 switch(j){
00685                 case 0: label = gtk_label_new ("VX"); break;
00686                 case 1: label = gtk_label_new ("VY"); break;
00687                 case 2: label = gtk_label_new ("VZ"); break;
00688                 }
00689                 gtk_widget_show (label);
00690                 gtk_container_add (GTK_CONTAINER (hbox_param), label);
00691                 //    gtk_box_pack_start (GTK_BOX (hbox_param), label, FALSE, TRUE, 0);
00692                 gtk_widget_set_usize (label, 20, -1);
00693 
00694                 wid = gtk_option_menu_new ();
00695                 gtk_widget_set_usize (wid, 50, -1);
00696                 gtk_widget_show (wid);
00697                 gtk_container_add (GTK_CONTAINER (hbox_param), wid);
00698 
00699                 menu = gtk_menu_new ();
00700 
00701                 // Init Verstärkungs-Choicelist
00702                 gchar *Vxyz;
00703                 for(i=0; i<GAIN_POSITIONS; i++){
00704                         if(xsmres.V[i] >= 1.)
00705                                 Vxyz = g_strdup_printf("%2d",(int)xsmres.V[i]);
00706                         else
00707                                 Vxyz = g_strdup_printf("%g",xsmres.V[i]);
00708                         menuitem = gtk_menu_item_new_with_label (Vxyz);
00709                         gtk_widget_show (menuitem);
00710                         gtk_menu_append (GTK_MENU (menu), menuitem);
00711                         /* connect with signal-handler if selected */
00712                         AmpI.l = 0L;
00713                         AmpI.s.ch = j;
00714                         AmpI.s.x  = i;
00715                         gtk_object_set_data(GTK_OBJECT (menuitem), "chindex", (gpointer)AmpI.l);
00716                         gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
00717                                             GTK_SIGNAL_FUNC (DSPControl::choice_Ampl_callback),
00718                                             this);
00719                 }
00720                 gtk_option_menu_set_menu (GTK_OPTION_MENU (wid), menu);
00721                 switch(j){
00722                 case 0: gtk_option_menu_set_history (GTK_OPTION_MENU (wid), xsmres.VXdefault); break;
00723                 case 1: gtk_option_menu_set_history (GTK_OPTION_MENU (wid), xsmres.VYdefault); break;
00724                 case 2: gtk_option_menu_set_history (GTK_OPTION_MENU (wid), xsmres.VZdefault); break;
00725                 }
00726         }
00727 
00728         gapp->RemoteEntryList = g_slist_concat (gapp->RemoteEntryList, RemoteEntryList);
00729 
00730         // save List away...
00731         gtk_object_set_data( GTK_OBJECT (widget), "DSP_EC_list", EC_list);
00732 }
00733 
00734 static void remove(gpointer entry, gpointer from){
00735         from = (gpointer) g_slist_remove ((GSList*)from, entry);
00736 }
00737 
00738 DSPControl::~DSPControl (){
00739         XsmRescourceManager xrm("innovative_dsp_hwi_control");
00740 
00741         xrm.Put("data_hardpars.UTunnel", data_hardpars.UTunnel);
00742         xrm.Put("data_hardpars_dual.UTunnel", data_hardpars_dual.UTunnel);
00743         xrm.Put("data_hardpars.SetPoint", data_hardpars.SetPoint);
00744         xrm.Put("data_hardpars_dual.SetPoint", data_hardpars_dual.SetPoint);
00745         xrm.Put("data_hardpars.ITunnelSoll", data_hardpars.ITunnelSoll);
00746         xrm.Put("data_hardpars_dual.ITunnelSoll", data_hardpars_dual.ITunnelSoll);
00747         xrm.Put("data_hardpars.LogOffset", data_hardpars.LogOffset);
00748         xrm.Put("data_hardpars_dual.LogOffset", data_hardpars_dual.LogOffset);
00749         xrm.Put("data_hardpars.LogSkl", data_hardpars.LogSkl);
00750         xrm.Put("data_hardpars_dual.LogSkl", data_hardpars_dual.LogSkl);
00751         xrm.Put("data_hardpars.usrCP", data_hardpars.usrCP);
00752         xrm.Put("data_hardpars_dual.usrCP", data_hardpars_dual.usrCP);
00753         xrm.Put("data_hardpars.usrCI", data_hardpars.usrCI);
00754         xrm.Put("data_hardpars_dual.usrCI", data_hardpars_dual.usrCI);
00755         xrm.Put("data_hardpars.CS", data_hardpars.CS);
00756         xrm.Put("data_hardpars_dual.CS", data_hardpars_dual.CS);
00757         xrm.Put("data_hardpars.Rotation", data_hardpars.Rotation);
00758         xrm.Put("data_hardpars_dual.Rotation", data_hardpars_dual.Rotation);
00759         xrm.Put("data_hardpars.fb_frq", data_hardpars.fb_frq);
00760         xrm.Put("data_hardpars_dual.fb_frq", data_hardpars_dual.fb_frq);
00761         xrm.Put("data_hardpars.fir_fg", data_hardpars.fir_fg);
00762         xrm.Put("data_hardpars_dual.fir_fg", data_hardpars_dual.fir_fg);
00763         xrm.Put("data_hardpars.LinLog", data_hardpars.LinLog);
00764         xrm.Put("data_hardpars_dual.LinLog", data_hardpars_dual.LinLog);
00765         xrm.Put("data_hardpars.LS_nx2scan", data_hardpars.LS_nx2scan);
00766         xrm.Put("data_hardpars_dual.LS_nx2scan", data_hardpars_dual.LS_nx2scan);
00767         xrm.Put("data_hardpars.LS_nx_pre", data_hardpars.LS_nx_pre);
00768         xrm.Put("data_hardpars_dual.LS_nx_pre", data_hardpars_dual.LS_nx_pre);
00769         xrm.Put("data_hardpars.LS_dnx", data_hardpars.LS_dnx);
00770         xrm.Put("data_hardpars_dual.LS_dnx", data_hardpars_dual.LS_dnx);
00771         xrm.Put("data_hardpars.LS_stepsize", data_hardpars.LS_stepsize);
00772         xrm.Put("data_hardpars_dual.LS_stepsize", data_hardpars_dual.LS_stepsize);
00773         xrm.Put("data_hardpars.LS_nRegel", data_hardpars.LS_nRegel);
00774         xrm.Put("data_hardpars_dual.LS_nRegel", data_hardpars_dual.LS_nRegel);
00775         xrm.Put("data_hardpars.LS_nAve", data_hardpars.LS_nAve);
00776         xrm.Put("data_hardpars_dual.LS_nAve", data_hardpars_dual.LS_nAve);
00777         xrm.Put("data_hardpars.LS_IntAve", data_hardpars.LS_IntAve);
00778         xrm.Put("data_hardpars_dual.LS_IntAve", data_hardpars_dual.LS_IntAve);
00779         xrm.Put("data_hardpars.MV_stepsize", data_hardpars.MV_stepsize);
00780         xrm.Put("data_hardpars_dual.MV_stepsize", data_hardpars_dual.MV_stepsize);
00781         xrm.Put("data_hardpars.MV_nRegel", data_hardpars.MV_nRegel);
00782         xrm.Put("data_hardpars_dual.MV_nRegel", data_hardpars_dual.MV_nRegel);
00783 
00784 
00785         g_slist_foreach(RemoteEntryList, (GFunc) remove, gapp->RemoteEntryList);
00786         g_slist_free (RemoteEntryList);
00787         RemoteEntryList = NULL;
00788         delete Unity;
00789         delete Volt;
00790         delete Current;
00791         delete SetPtUnit;
00792 }
00793 
00794 void DSPControl::update(){
00795         g_slist_foreach((GSList*)gtk_object_get_data( GTK_OBJECT (widget), "DSP_EC_list"),
00796                         (GFunc) App::update_ec, NULL);
00797 }
00798 
00799 void DSPControl::updateDSP(int FbFlg){
00800         PI_DEBUG (DBG_L2, "Hallo DSP ! FB=" << FbFlg );
00801         switch(FbFlg){
00802         case DSP_FB_ON: ExecCmd(DSP_CMD_START); break;
00803         case DSP_FB_OFF: ExecCmd(DSP_CMD_HALT); break;
00804         }
00805         // Scale Regler Consts. with 1/VZ
00806         dsp->CP = dsp->usrCP/DSPControl_pi.app->xsm->Inst->VZ();
00807         dsp->CI = dsp->usrCI/DSPControl_pi.app->xsm->Inst->VZ();
00808         DSPControl_pi.app->xsm->hardware->PutParameter(dsp);
00809 }
00810 
00811 int DSPControl::ChangedAction(GtkWidget *widget, DSPControl *dspc){
00812         dspc->updateDSP();
00813         return 0;
00814 }
00815 
00816 void DSPControl::ChangedNotify(Param_Control* pcs, gpointer dspc){
00817         //  gchar *us=pcs->Get_UsrString();
00818         //  PI_DEBUG (DBG_L2, "DSPC: " << us );
00819         //  g_free(us);
00820         ((DSPControl*)dspc)->updateDSP();
00821 }
00822 
00823 void DSPControl::ExecCmd(int cmd){
00824         DSPControl_pi.app->xsm->hardware->ExecCmd(cmd);
00825 }
00826 
00827 int DSPControl::feedback_callback( GtkWidget *widget, DSPControl *dspc){
00828         if (GTK_TOGGLE_BUTTON (widget)->active)
00829                 dspc->updateDSP(DSP_FB_ON);
00830         else
00831                 dspc->updateDSP(DSP_FB_OFF);
00832         return 0;
00833 }
00834 
00835 int DSPControl::dualmode_callback( GtkWidget *widget, DSPControl *dspc){
00836         if (GTK_TOGGLE_BUTTON (widget)->active){
00837                 DSPControl_pi.app->xsm->data.scan_mode = SCAN_MODE_DUAL_DSPSET;
00838                 gtk_widget_show (dspc->DualSettingsFrame);
00839         }
00840         else{
00841                 DSPControl_pi.app->xsm->data.scan_mode = SCAN_MODE_SINGLE_DSPSET;
00842                 gtk_widget_hide (dspc->DualSettingsFrame);
00843         }
00844         return 0;
00845 }
00846 
00847 int DSPControl::choice_Ampl_callback (GtkWidget *widget, DSPControl *dspc){
00848         AmpIndex i;
00849         i.l=(long)gtk_object_get_data( GTK_OBJECT (widget), "chindex");
00850         switch(i.s.ch){
00851         case 0: DSPControl_pi.app->xsm->Inst->VX((int)i.s.x); break;
00852         case 1: DSPControl_pi.app->xsm->Inst->VY((int)i.s.x); break;
00853         case 2: DSPControl_pi.app->xsm->Inst->VZ((int)i.s.x); break;
00854         }
00855         PI_DEBUG (DBG_L2, "Ampl: " << i.l << " " << (int)i.s.ch << " " << (int)i.s.x );
00856         DSPControl_pi.app->spm_range_check(NULL, DSPControl_pi.app);
00857         dspc->updateDSP();
00858         return 0;
00859 }
00860 
00861 

Generated on Sat Apr 1 09:04:12 2006 for GXSM by  doxygen 1.4.6