Keisuke Sehara
/
STM32_Whisking
fast-feedback virtual target task code on STM Nucleo
Diff: states.cpp
- Revision:
- 5:849446d19406
- Parent:
- 4:fcf597f82632
- Child:
- 7:6744ec9ccc25
--- a/states.cpp Wed May 23 15:15:03 2018 +0000 +++ b/states.cpp Thu May 24 14:47:48 2018 +0000 @@ -85,7 +85,7 @@ // remains to be logged // sets the timeout for the next state - stateTimeout.attach_us(&automaton::jump<Cued,NoResp>, ms_to_us(task.cue_dur_ms)); // for Pair + stateTimeout.attach_us(&automaton::jump<Cued,NoResp>, ms_to_us(task.cue_dur_ms.value)); // for Pair // update the timestamp trial.cuestarting = timer.read_ms(); @@ -104,7 +104,7 @@ // TODO: open/close the valve - stateTimeout.attach_us(&automaton::done<WithResp>, ms_to_us(task.post_dur_ms)); + stateTimeout.attach_us(&automaton::done<WithResp>, ms_to_us(task.post_dur_ms.value)); } void WithResp::teardown() { @@ -116,7 +116,7 @@ trial.response &= ~TrialFlags::Responded; - stateTimeout.attach_us(&automaton::done<NoResp>, ms_to_us(task.post_dur_ms)); + stateTimeout.attach_us(&automaton::done<NoResp>, ms_to_us(task.post_dur_ms.value)); } void NoResp::teardown() { finalize();