[med-svn] [aghermann] 54/60: .5-assed WIP on enabling lua in rk1968

andrei zavada hmmr-guest at alioth.debian.org
Mon Nov 4 23:50:01 UTC 2013


This is an automated email from the git hooks/post-receive script.

hmmr-guest pushed a commit to branch WIP
in repository aghermann.

commit 481f5c8e27e37c31ef6e51e4fa048ec5aac66845
Author: Andrei Zavada <johnhommer at gmail.com>
Date:   Fri Oct 25 23:47:07 2013 +0300

    .5-assed WIP on enabling lua in rk1968
---
 upstream/ChangeLog                      |    2 +-
 upstream/data/basic_score.lua           |   13 +++++++++++++
 upstream/data/sf-rk1968.glade           |   26 +++++++++++---------------
 upstream/src/aghermann/rk1968/rk1968.cc |    5 ++++-
 4 files changed, 29 insertions(+), 17 deletions(-)

diff --git a/upstream/ChangeLog b/upstream/ChangeLog
index 85532e5..8091847 100644
--- a/upstream/ChangeLog
+++ b/upstream/ChangeLog
@@ -1,11 +1,11 @@
 v.0.9.2 (2013-xx-xx)
+	* New: SF: let RK1968 wisdom reside in external lua scripts.
 	* New: SF: unified Artifact Detection dialog including MC-based,
 	  flat region (ex-Simple AD) and by EMG-perturbation.
 	* New: Get a reasonable logging facility (use -l file; "-" is
 	  stdout; default is /dev/null).
 	* New: Properly handle various system/user/experiment/subject/
 	  session stored settings packs (patterns, rk1968, etc).
-	* New: SF: basic dialog for RK1968 scoring assistant parameters.
 	* New: SF: compute, draw EMG steady tone.
 	* Fix: SF: don't blindly delete files in various pattern
 	  locations, just append ~ to their file names.
diff --git a/upstream/data/basic_score.lua b/upstream/data/basic_score.lua
new file mode 100644
index 0000000..4880231
--- /dev/null
+++ b/upstream/data/basic_score.lua
@@ -0,0 +1,13 @@
+                // for ( size_t p = 0; p < F1.n_pages(); ++p ) {
+                //         auto    Di = courses_delta.begin(),
+                //                 Ti = courses_theta.begin();
+                //         int decision = 0;
+                //         for ( ; Di != courses_delta.end(); ++Di, ++Ti ) {
+                //                 decision +=
+                //                         ( (*Di)[p] > (*Ti)[p] * Pp.nrem3_delta_theta_ratio );
+                //         }
+                //         if ( decision > 0 ) {
+                //                 F1[p].mark( sigfile::SPage::TScore::nrem3);
+                //                 ++n_pages_scored;
+                //         }
+                // }
diff --git a/upstream/data/sf-rk1968.glade b/upstream/data/sf-rk1968.glade
index 70be5d1..8ec580a 100644
--- a/upstream/data/sf-rk1968.glade
+++ b/upstream/data/sf-rk1968.glade
@@ -200,31 +200,27 @@
                 <property name="can_focus">False</property>
                 <property name="n_rows">2</property>
                 <property name="column_spacing">5</property>
-                <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
+                <property name="row_spacing">5</property>
                 <child>
                   <object class="GtkLabel" id="label1">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="xalign">1</property>
+                    <property name="xalign">0</property>
                     <property name="label" translatable="yes">Script:</property>
                   </object>
                 </child>
                 <child>
-                  <object class="GtkTextView" id="eSFRKScript">
+                  <object class="GtkScrolledWindow" id="scrolledwindow1">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="buffer">tSFRKScript</property>
+                    <property name="shadow_type">in</property>
+                    <child>
+                      <object class="GtkTextView" id="eSFRKScript">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="buffer">tSFRKScript</property>
+                      </object>
+                    </child>
                   </object>
                   <packing>
                     <property name="top_attach">1</property>
diff --git a/upstream/src/aghermann/rk1968/rk1968.cc b/upstream/src/aghermann/rk1968/rk1968.cc
index 4afd8e1..f572e8b 100644
--- a/upstream/src/aghermann/rk1968/rk1968.cc
+++ b/upstream/src/aghermann/rk1968/rk1968.cc
@@ -60,7 +60,9 @@ int
 CScoreAssistant::
 save()
 {
-        
+        ofstream oleg (path());
+        oleg << script_contents;
+
         return 0;
 }
 
@@ -115,6 +117,7 @@ score( agh::SEpisode& E, size_t* n_pages_scored_p)
                 *n_pages_scored_p = n_pages_scored;
 
         return 0;
+
 }
 
 

-- 
Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git



More information about the debian-med-commit mailing list