Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: task.cpp
- Revision:
- 11:897ecd5413e0
- Parent:
- 10:7c216d528c35
- Child:
- 13:8ea85a33e37a
--- a/task.cpp Tue Jun 19 10:11:23 2018 +0000
+++ b/task.cpp Thu Jun 21 17:57:22 2018 +0000
@@ -8,18 +8,22 @@
delay_min_ms(CHR_DELAY_MIN, 3000),
delay_var_ms(CHR_DELAY_VAR, 3000),
prep_dur_ms (CHR_PREP_DUR, 3000),
- cue_dur_ms (CHR_CUE_DUR, 3000),
+ aud_dur_ms (CHR_AUD_DUR, 3000),
+ aud_tick_hz (CHR_AUD_FREQ, 4),
post_dur_ms (CHR_POST_DUR, 4000),
reward_ms (CHR_REWARD_DUR,10),
+ vis_min_ms (CHR_VIS_MIN, 50),
+ vis_avg_ms (CHR_VIS_AVG, 300),
+ vis_max_ms (CHR_VIS_MAX, 1500),
test_reward (CMD_TEST_REWARD, callback(this, &Task::testReward)),
run (CMD_EXECUTE, callback(this, &Task::runTrial))
{ }
-const char ModeSelection::CMD_ID_MODE = '_';
-const char ModeSelection::CMD_MODE_PAIR = 'P';
-const char ModeSelection::CMD_MODE_WITHCUE = 'W';
-const char ModeSelection::CMD_MODE_REPORT = 'R';
-const char ModeSelection::CMD_MODE_APPEAR = 'A';
+const char ModeSelection::CMD_ID_MODE = '_';
+const char ModeSelection::CMD_MODE_PAIR = 'P';
+const char ModeSelection::CMD_MODE_REPORT = 'R';
+const char ModeSelection::CMD_MODE_ASSOCIATE = 'A';
+const char ModeSelection::CMD_MODE_MOTION = 'M';
ModeSelection::ModeSelection(const Mode& defaultValue):
value(defaultValue) {
@@ -32,10 +36,10 @@
bool ModeSelection::parse(const char& c) {
switch(c) {
- case CMD_MODE_PAIR: value = Pair; return true;
- case CMD_MODE_WITHCUE: value = WithCue; return true;
- case CMD_MODE_REPORT: value = Report; return true;
- case CMD_MODE_APPEAR: value = Appear; return true;
+ case CMD_MODE_PAIR: value = Pair; return true;
+ case CMD_MODE_REPORT: value = Report; return true;
+ case CMD_MODE_ASSOCIATE: value = Associate; return true;
+ case CMD_MODE_MOTION: value = Motion; return true;
default:
return false;
}
@@ -43,10 +47,10 @@
bool ModeSelection::writeSettings() {
#define WRITE(CHR, VAL) if (value == (VAL)) { IO::write("[%c]",CHR); } else { IO::write("%c",CHR); }
- WRITE(CMD_MODE_PAIR, Pair)
- WRITE(CMD_MODE_WITHCUE, WithCue)
- WRITE(CMD_MODE_REPORT, Report)
- WRITE(CMD_MODE_APPEAR, Appear)
+ WRITE(CMD_MODE_PAIR, Pair)
+ WRITE(CMD_MODE_REPORT, Report)
+ WRITE(CMD_MODE_ASSOCIATE, Associate)
+ WRITE(CMD_MODE_MOTION, Motion)
#undef WRITE
return true;
}