@@ -34,81 +34,3 @@ LucidDreamScenario::LucidDreamScenario(const ncScenarioInitArgs *args)
3434 this ->addTriggersToRefreshList ({rem_detected_trigger});
3535
3636 }
37-
38-
39- // ncUpdateOutput LucidDreamScenario::update(const ncScenarioInput *updateArgs) {
40- // unsigned long long remDuration =
41- // updateArgs->scenarioSpecific.lucidDream.timestamp - m_remStartTimestamp;
42-
43- // if (m_remDetected)
44- // if (remDuration >= 180000 &&
45- // !m_remCounted) { // TODO: 180000 needs to be a parameter
46- // m_remCounter++;
47- // m_remCounted = true;
48- // }
49-
50- // if (updateArgs->scenarioSpecific.lucidDream.currentSleep_stage == REM) {
51- // if (!m_remDetected) {
52- // m_remStartTimestamp = updateArgs->scenarioSpecific.lucidDream.timestamp;
53- // remDuration = 0;
54- // m_remDetected = true;
55- // m_remCounted = false;
56- // } else {
57- // }
58- // } else {
59- // if (m_remDetected) {
60- // m_remDetected = false;
61- // m_remCounted = false;
62- // }
63- // m_lucidLoaded = false;
64- // }
65-
66- // switch (m_remCounter) {
67- // case 0:
68- // case 1:
69- // case 2:
70- // break;
71- // case 3:
72- // if (remDuration >= 300000) { // TODO: 300000 needs to ba a parameter
73- // if (!m_lucidLoaded) {
74- // lucidDreamSequence(240000, 5, 5000, 1000,
75- // updateArgs->scenarioSpecific.lucidDream.timestamp);
76- // m_lucidLoaded = true;
77- // return UPDATE_NEW_DATA;
78- // }
79- // }
80- // break;
81- // default:
82- // if (remDuration >= 600000) { // TODO: 600000 needs to ba a parameter
83- // if (!m_lucidLoaded) {
84- // lucidDreamSequence(240000, 5, 5000, 1000,
85- // updateArgs->scenarioSpecific.lucidDream.timestamp);
86- // m_lucidLoaded = true;
87- // return UPDATE_NEW_DATA;
88- // }
89- // }
90- // break;
91- // }
92-
93- // return UPDATE_OK;
94- // }
95-
96- // void LucidDreamScenario::lucidDreamSequence(unsigned long length,
97- // unsigned long numberOfActions,
98- // unsigned long actionDuration,
99- // unsigned long actionPeriod,
100- // unsigned long timestamp) {
101- // ncAtomicInstruction instruction;
102- // uint8_t intensities[7];
103- // std::memset(intensities, 63, sizeof(intensities));
104- // size_t len;
105- // for (unsigned long i = 0; i < numberOfActions; ++i) {
106- // device_set_func(instruction.data, &len,
107- // DEV_POWER_LED | DEV_RIGHT_RED_LED | DEV_LEFT_RED_LED,
108- // FUN_TYPE_BLINK, intensities, actionDuration / 100,
109- // actionPeriod / 100, 0);
110- // instruction.time = timestamp;
111- // pushInstruction(instruction);
112- // timestamp += numberOfActions > 1 ? length / (numberOfActions - 1) : 0;
113- // }
114- // }
0 commit comments