fast-feedback virtual target task code on STM Nucleo

Dependencies:   mbed

Revision:
11:897ecd5413e0
Parent:
9:e136394bdb39
Child:
13:8ea85a33e37a
--- a/task.h	Tue Jun 19 10:11:23 2018 +0000
+++ b/task.h	Thu Jun 21 17:57:22 2018 +0000
@@ -8,30 +8,34 @@
  * command characters
  */
  
-#define CMD_TEST_REWARD   'T'
-#define CMD_EXECUTE       'x'
+#define CMD_TEST_REWARD     'T'
+#define CMD_EXECUTE         'X'
 
-#define CHR_DELAY_MIN     'm'
-#define CHR_DELAY_VAR     'v'
-#define CHR_PREP_DUR      'p'
-#define CHR_CUE_DUR       'c'
-#define CHR_POST_DUR      'n'
-#define CHR_REWARD_DUR    'r'
+#define CHR_DELAY_MIN       'm'
+#define CHR_DELAY_VAR       'd'
+#define CHR_PREP_DUR        'p'
+#define CHR_AUD_DUR         'a'
+#define CHR_AUD_FREQ        'f'
+#define CHR_POST_DUR        'n'
+#define CHR_REWARD_DUR      'r'
+#define CHR_VIS_MIN         'y'
+#define CHR_VIS_AVG         'v'
+#define CHR_VIS_MAX         'j'
 
 enum Mode {
     Pair,
-    WithCue,
     Report,
-    Appear
+    Associate,
+    Motion
 };
 
 struct ModeSelection: public config::CommandResponder
 {
     static const char CMD_ID_MODE;
     static const char CMD_MODE_PAIR;
-    static const char CMD_MODE_WITHCUE;
     static const char CMD_MODE_REPORT;
-    static const char CMD_MODE_APPEAR;
+    static const char CMD_MODE_ASSOCIATE;
+    static const char CMD_MODE_MOTION;
     
     ModeSelection(); // not allowed
     
@@ -59,12 +63,21 @@
     Property<uint16_t>  prep_dur_ms;    // the duration of the "preparatory period", 
                                 // during which licking is not allowed.
     
-    Property<uint16_t>  cue_dur_ms;     // the cue duration.
+    Property<uint16_t>  aud_dur_ms;     // the auditory cue duration.
+    
+    Property<uint16_t>  aud_tick_hz;    // the frequency of auditory cue flickering.
     
     Property<uint16_t>  post_dur_ms;    // the post-reward recording duration.
     
     Property<uint16_t>  reward_ms;      // the duration of reward.
     
+    Property<uint16_t>  vis_min_ms;     // the minimum duration for the (passive) visual cue.
+    
+    Property<uint16_t>  vis_avg_ms;     // the average for the (exponential) variable
+                                        // duration of the (passive) visual cue.
+    
+    Property<uint16_t>  vis_max_ms;     // the maximum duration for the (passive) visual cue.
+    
     Action              test_reward;
     
     Action              run;