Commit [r30] Maximize Restore History

fixed name

log tested
pid testet, some scaling to check

zahl 2003-01-13

added /trunk/SRanger/TiCC-project-files/FB_spmcontrol/spm_log.asm
changed /trunk/SRanger/TiCC-project-files/FB_spmcontrol/FB_spm.c
changed /trunk/SRanger/TiCC-project-files/FB_spmcontrol/FB_spm_analog.h
changed /trunk/SRanger/TiCC-project-files/FB_spmcontrol/FB_spm_irq_control.c
changed /trunk/SRanger/TiCC-project-files/FB_spmcontrol/FB_spm_scan.c
changed /trunk/SRanger/TiCC-project-files/FB_spmcontrol/dataprocess.c
changed /trunk/SRanger/TiCC-project-files/FB_spmcontrol/dataprocess.h
changed /trunk/SRanger/TiCC-project-files/FB_spmcontrol/vectors.asm
copied /trunk/SRanger/TiCC-project-files/FB_spmcontrol/FB_spm_statemachine.h -> /trunk/SRanger/TiCC-project-files/FB_spmcontrol/FB_spm_statemaschine.h
copied /trunk/SRanger/TiCC-project-files/FB_spmcontrol/FB_spm_statemachine.c -> /trunk/SRanger/TiCC-project-files/FB_spmcontrol/FB_spm_statemaschine.c
/trunk/SRanger/TiCC-project-files/FB_spmcontrol/spm_log.asm Diff Switch to side-by-side view
Loading...
/trunk/SRanger/TiCC-project-files/FB_spmcontrol/FB_spm.c Diff Switch to side-by-side view
Loading...
/trunk/SRanger/TiCC-project-files/FB_spmcontrol/FB_spm_analog.h Diff Switch to side-by-side view
Loading...
/trunk/SRanger/TiCC-project-files/FB_spmcontrol/FB_spm_irq_control.c Diff Switch to side-by-side view
Loading...
/trunk/SRanger/TiCC-project-files/FB_spmcontrol/FB_spm_scan.c Diff Switch to side-by-side view
Loading...
/trunk/SRanger/TiCC-project-files/FB_spmcontrol/dataprocess.c Diff Switch to side-by-side view
Loading...
/trunk/SRanger/TiCC-project-files/FB_spmcontrol/dataprocess.h Diff Switch to side-by-side view
Loading...
/trunk/SRanger/TiCC-project-files/FB_spmcontrol/vectors.asm Diff Switch to side-by-side view
Loading...
/trunk/SRanger/TiCC-project-files/FB_spmcontrol/FB_spm_statemachine.c to /trunk/SRanger/TiCC-project-files/FB_spmcontrol/FB_spm_statemaschine.c
--- a/trunk/SRanger/TiCC-project-files/FB_spmcontrol/FB_spm_statemachine.c
+++ b/trunk/SRanger/TiCC-project-files/FB_spmcontrol/FB_spm_statemaschine.c
@@ -1,136 +1,141 @@
-/* SRanger and Gxsm - Gnome X Scanning Microscopy Project
- * universal STM/AFM/SARLS/SPALEED/... controlling and
- * data analysis software
- *
- * DSP tools for Linux
- *
- * Copyright (C) 1999,2000,2001,2002 Percy Zahl
- *
- * Authors: Percy Zahl <zahl@users.sf.net>
- * WWW Home:
- * DSP part:  http://sranger.sf.net
- * Gxsm part: http://gxsm.sf.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
- */
-
-/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 8 c-style: "K&R" -*- */
-
-#include "FB_spm_statemachine.h"
-#include "FB_spm_analog.h"
-#include "FB_spm_scan.h"
-
-extern SPM_STATEMACHINE state;
-extern ANALOG_VALUES    analog;
-extern LINE_SCAN        lscan;
-extern AREA_SCAN        ascan;
-extern MOVE_OFFSET      move;
-
-/*
- *	DSP idle loop, runs for ever, returns never !!!!
- *  ============================================================
- *	Main of the DSP State Maschine
- *      - State Status "STMMode", heartbeat
- *      - manage process commands via state, 
- *        this may change the state
- *      - enable/disable of all tasks
- */
-
-void dsp_idle_loop (void){
-
-	for(;;){	/* forever !!! */
-
-		/* Sate Machines heartbeat... */
-		if(state.BLK_count >= state.BLK_Ncount){
-			state.BLK_count=0L;
-			++state.DSP_time;
-			if (++state.DSP_tens == 10){
-				state.STMMode ^= MD_BLK;
-				state.DSP_tens = 0;
-			}
-		}
-
-		/* PID-feedback on/off only via flag MD_PID -- nothing to do here */
-
-		/* Check (Line)Scan task */
-		if(STMMode & MD_SCAN){
-			if (!lscan.pflg)
-				enable_linescan_interrupt ();
-			continue;
-		}else{
-			if (lscan.pflg)
-				disable_linescan_interrupt ();
-		}
-		
-		/* Check Move task */
-		if(STMMode & MD_MOVE){
-			if (!move.pflg)
-				enable_xymove_interrupt ();
-			continue;
-		}else{
-			if (move.pflg)
-				disable_xymove_interrupt ();
-		}
-
-#if 0 // not yet
-		/* Probe control task (spectroscopy etc.) ? */
-		if(STMMode & MD_PROBE){
-			md_probe_action ();
-			continue;
-		}
-#endif //0
-    
-		/* Check Area Scan task */
-		if(STMMode & MD_ASCAN){
-			if (!ascan.pflg)
-				enable_areascan_interrupt ();
-			continue;
-		}else{
-			if (ascan.pflg){
-				disable_areascan_interrupt ();
-				ascan.flg = 0;
-			}
-		}
-
-#if 0 // not yet
-		/* Mover/Slider control task */
-#ifdef BESOCKE_MOVER
-		if (STMMode & MD__AFMADJ){
-			if (!afm_mover_flg)
-				enable_mover_interrupt ();
-		}else{
-			if (afm_mover_flg)
-				disable_mover_interrupt ();
-		}
-#endif
-
-		/* Auto Approach task ? */
-#ifdef TYP_STM
-		if(STMMode & MD_TIPDN){
-			md_tip_approch_stm ();
-		}
-#endif
-
-#ifdef TYP_AFM
-		/* Leverann�herung ausf�hren ? */
-		if(STMMode & MD_TIPDN){
-			md_tip_approch_afm ();
-		}
-#endif
-
-#endif //0
-
-	} /* repeat idle loop forever... */
-}
+/* SRanger and Gxsm - Gnome X Scanning Microscopy Project
+ * universal STM/AFM/SARLS/SPALEED/... controlling and
+ * data analysis software
+ *
+ * DSP tools for Linux
+ *
+ * Copyright (C) 1999,2000,2001,2002 Percy Zahl
+ *
+ * Authors: Percy Zahl <zahl@users.sf.net>
+ * WWW Home:
+ * DSP part:  http://sranger.sf.net
+ * Gxsm part: http://gxsm.sf.net
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 8 c-style: "K&R" -*- */
+
+#include "FB_spm_statemaschine.h"
+#include "FB_spm_analog.h"
+#include "FB_spm_scan.h"
+
+extern SPM_STATEMACHINE state;
+extern ANALOG_VALUES    analog;
+extern LINE_SCAN        lscan;
+extern AREA_SCAN        ascan;
+extern MOVE_OFFSET      move;
+
+/*
+ *	DSP idle loop, runs for ever, returns never !!!!
+ *  ============================================================
+ *	Main of the DSP State Maschine
+ *      - State Status "STMMode", heartbeat
+ *      - manage process commands via state, 
+ *        this may change the state
+ *      - enable/disable of all tasks
+ */
+
+void dsp_idle_loop (void){
+
+	for(;;){	/* forever !!! */
+
+		/* Sate Machines heartbeat... */
+		if(state.BLK_count >= state.BLK_Ncount){
+			state.BLK_count=0L;
+			++state.DSP_time;
+			if (++state.DSP_tens == 10){
+				state.mode ^= MD_BLK;
+				state.DSP_tens = 0;
+			}
+		}
+
+		/* PID-feedback on/off only via flag MD_PID -- nothing to do here */
+#if 0 // not yet
+		/* Check (Line)Scan task */
+		if(state.mode & MD_SCAN){
+			if (!lscan.pflg)
+				enable_linescan_interrupt ();
+			continue;
+		}else{
+			if (lscan.pflg)
+				disable_linescan_interrupt ();
+		}
+		
+		/* Check Move task */
+		if(state.mode & MD_MOVE){
+			if (!move.pflg)
+				enable_xymove_interrupt ();
+			continue;
+		}else{
+			if (move.pflg)
+				disable_xymove_interrupt ();
+		}
+
+#endif //0
+
+#if 0 // not yet
+		/* Probe control task (spectroscopy etc.) ? */
+		if(state.mode & MD_PROBE){
+			md_probe_action ();
+			continue;
+		}
+#endif //0
+
+#if 0 // not yet
+		/* Check Area Scan task */
+		if(state.mode & MD_ASCAN){
+			if (!ascan.pflg)
+				enable_areascan_interrupt ();
+			continue;
+		}else{
+			if (ascan.pflg){
+				disable_areascan_interrupt ();
+				ascan.flg = 0;
+			}
+		}
+#endif //0
+
+
+#if 0 // not yet
+		/* Mover/Slider control task */
+#ifdef BESOCKE_MOVER
+		if (state.mode & MD__AFMADJ){
+			if (!afm_mover_flg)
+				enable_mover_interrupt ();
+		}else{
+			if (afm_mover_flg)
+				disable_mover_interrupt ();
+		}
+#endif
+
+		/* Auto Approach task ? */
+#ifdef TYP_STM
+		if(state.mode & MD_TIPDN){
+			md_tip_approch_stm ();
+		}
+#endif
+
+#ifdef TYP_AFM
+		/* Leverann�herung ausf�hren ? */
+		if(STMMode & MD_TIPDN){
+			md_tip_approch_afm ();
+		}
+#endif
+
+#endif //0
+
+	} /* repeat idle loop forever... */
+}