void Function::unFlash(MasterTimer* timer) { Q_UNUSED(timer); if (m_flashing == true) emit flashing(m_id, false); m_flashing = false; }
void BCIDataSet::loadFlashing() { std::ifstream file(fileName("Flashing").c_str()); OPENANN_CHECK(file.is_open()); for(int t = 0; t < maxT; t++) { for(int e = 0; e < epochs; e++) { file >> flashing(t, e); } } debugLogger << "Loaded flashing.\n"; }
void BCIDataSet::setupInterface() { N = 0; std::vector<int> lastFlashing(readEpochs, 0); instanceStart.resize(readEpochs); instanceLabel.resize(readEpochs); Eigen::VectorXd label(1); for(int t = 0; t < maxT; t++) { for(int e = 0; e < readEpochs; e++) { if(flashing(t, e) > 0.0 && lastFlashing[e] == 0) { N++; instanceStart[e].push_back(t); label(0, 0) = ((int) stimulusType(t, e)) * 2 - 1; instanceLabel[e].push_back(label); } lastFlashing[e] = (int) flashing(t, e); } } clear(); }
int Function::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QObject::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: changed((*reinterpret_cast< t_function_id(*)>(_a[1]))); break; case 1: flashing((*reinterpret_cast< t_function_id(*)>(_a[1])),(*reinterpret_cast< bool(*)>(_a[2]))); break; case 2: running((*reinterpret_cast< t_function_id(*)>(_a[1]))); break; case 3: stopped((*reinterpret_cast< t_function_id(*)>(_a[1]))); break; case 4: slotFixtureRemoved((*reinterpret_cast< t_fixture_id(*)>(_a[1]))); break; default: ; } _id -= 5; } return _id; }
void AP_Gimbal_Parameters::handle_param_value(DataFlash_Class *dataflash, mavlink_message_t *msg) { mavlink_param_value_t packet; mavlink_msg_param_value_decode(msg, &packet); if (flashing() && packet.param_value == 1 && !strcmp(packet.param_id, "GMB_FLASH")) { mavlink_msg_command_long_send(_chan, 0, MAV_COMP_ID_GIMBAL, 42501, 0, 0, 0, 0, 0, 0, 0, 0); reset(); return; } dataflash->Log_Write_Parameter(packet.param_id, packet.param_value); for(uint8_t i=0; i<MAVLINK_GIMBAL_NUM_TRACKED_PARAMS; i++) { if (!strcmp(packet.param_id, get_param_name((gmb_param_t)i))) { _params[i].seen = true; switch(_params[i].state) { case GMB_PARAMSTATE_NONEXISTANT: case GMB_PARAMSTATE_NOT_YET_READ: case GMB_PARAMSTATE_FETCH_AGAIN: _params[i].value = packet.param_value; _params[i].state = GMB_PARAMSTATE_CONSISTENT; break; case GMB_PARAMSTATE_CONSISTENT: _params[i].value = packet.param_value; break; case GMB_PARAMSTATE_ATTEMPTING_TO_SET: if (i == GMB_PARAM_GMB_FLASH || packet.param_value == _params[i].value) { _params[i].state = GMB_PARAMSTATE_CONSISTENT; } break; } break; } } }
void PlaybackSlider::slotFlashReleased() { emit flashing(false); }
void PlaybackSlider::slotFlashPressed() { emit flashing(true); }