|
|
|
|
|
|
|
|
m_Menu[0].set_LabelText(3, "Hilfe");
|
|
|
m_Menu[0].set_LabelText(3, "Hilfe");
|
|
|
m_Menu[0].set_LabelText(4, "Geräte");
|
|
|
m_Menu[0].set_LabelText(4, "Geräte");
|
|
|
m_Menu[0].set_LabelText(5, "Funktionen");
|
|
|
m_Menu[0].set_LabelText(5, "Funktionen");
|
|
|
m_Menu[0].set_SubMenu(2, &m_Menu[1]);
|
|
|
|
|
|
m_Menu[0].set_SubMenu(3, &m_Menu[2]);
|
|
|
|
|
|
m_Menu[0].set_SubMenu(4, &m_Menu[3]);
|
|
|
|
|
|
|
|
|
|
|
|
m_Menu.push_back(TactileMenu(6));
|
|
|
m_Menu.push_back(TactileMenu(6));
|
|
|
m_Menu[1].set_LabelText(0, "Ja");
|
|
|
m_Menu[1].set_LabelText(0, "Ja");
|
|
|
|
|
|
|
|
|
m_Menu[1].set_LabelText(3, "Lage");
|
|
|
m_Menu[1].set_LabelText(3, "Lage");
|
|
|
m_Menu[1].set_LabelText(4, "Müdigkeit");
|
|
|
m_Menu[1].set_LabelText(4, "Müdigkeit");
|
|
|
m_Menu[1].set_LabelText(5, "Hauptmenü");
|
|
|
m_Menu[1].set_LabelText(5, "Hauptmenü");
|
|
|
m_Menu[0].set_SubMenu(5, &m_Menu[0]);
|
|
|
|
|
|
|
|
|
|
|
|
m_Menu.push_back(TactileMenu(6));
|
|
|
m_Menu.push_back(TactileMenu(6));
|
|
|
m_Menu[2].set_LabelText(0, "Ja");
|
|
|
m_Menu[2].set_LabelText(0, "Ja");
|
|
|
|
|
|
|
|
|
m_Menu[2].set_LabelText(3, "Atemnot");
|
|
|
m_Menu[2].set_LabelText(3, "Atemnot");
|
|
|
m_Menu[2].set_LabelText(4, "Anderes");
|
|
|
m_Menu[2].set_LabelText(4, "Anderes");
|
|
|
m_Menu[2].set_LabelText(5, "Hauptmenü");
|
|
|
m_Menu[2].set_LabelText(5, "Hauptmenü");
|
|
|
m_Menu[0].set_SubMenu(5, &m_Menu[0]);
|
|
|
|
|
|
|
|
|
|
|
|
m_Menu.push_back(TactileMenu(6));
|
|
|
m_Menu.push_back(TactileMenu(6));
|
|
|
m_Menu[3].set_LabelText(0, "Ja");
|
|
|
m_Menu[3].set_LabelText(0, "Ja");
|
|
|
|
|
|
|
|
|
m_Menu[3].set_LabelText(3, "Rollstuhl");
|
|
|
m_Menu[3].set_LabelText(3, "Rollstuhl");
|
|
|
m_Menu[3].set_LabelText(4, "Computer");
|
|
|
m_Menu[3].set_LabelText(4, "Computer");
|
|
|
m_Menu[3].set_LabelText(5, "Hauptmenü");
|
|
|
m_Menu[3].set_LabelText(5, "Hauptmenü");
|
|
|
m_Menu[0].set_SubMenu(5, &m_Menu[0]);
|
|
|
|
|
|
|
|
|
|
|
|
//Set Pointer to Mainmenu
|
|
|
|
|
|
|
|
|
//Set SubMenu ptr
|
|
|
|
|
|
m_Menu[0].set_SubMenu(2, &m_Menu[1]);
|
|
|
|
|
|
m_Menu[0].set_SubMenu(3, &m_Menu[2]);
|
|
|
|
|
|
m_Menu[0].set_SubMenu(4, &m_Menu[3]);
|
|
|
|
|
|
m_Menu[1].set_SubMenu(5, &m_Menu[0]);
|
|
|
|
|
|
m_Menu[2].set_SubMenu(5, &m_Menu[0]);
|
|
|
|
|
|
m_Menu[3].set_SubMenu(5, &m_Menu[0]);
|
|
|
|
|
|
|
|
|
|
|
|
//Set current menu ptr to Mainmenu
|
|
|
m_currMenu = &m_Menu[0];
|
|
|
m_currMenu = &m_Menu[0];
|
|
|
}
|
|
|
}
|
|
|
else //Create default menu for m_nTactilos != 6
|
|
|
else //Create default menu for m_nTactilos != 6
|
|
|
|
|
|
|
|
|
m_targetFlaggingStimulationEncoder->uninitialize();
|
|
|
m_targetFlaggingStimulationEncoder->uninitialize();
|
|
|
this->getAlgorithmManager().releaseAlgorithm(*m_targetFlaggingStimulationEncoder);
|
|
|
this->getAlgorithmManager().releaseAlgorithm(*m_targetFlaggingStimulationEncoder);
|
|
|
m_targetFlaggingStimulationEncoder = nullptr;
|
|
|
m_targetFlaggingStimulationEncoder = nullptr;
|
|
|
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
if (m_targetStimulationDecoder)
|
|
|
if (m_targetStimulationDecoder)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (m_sequenceStimulationDecoder->isOutputTriggerActive(OVP_GD_Algorithm_StimulationDecoder_OutputTriggerId_ReceivedBuffer))
|
|
|
if (m_sequenceStimulationDecoder->isOutputTriggerActive(OVP_GD_Algorithm_StimulationDecoder_OutputTriggerId_ReceivedBuffer))
|
|
|
{
|
|
|
{
|
|
|
IStimulationSet* stimulationSet = m_sequenceStimulationSet;
|
|
|
|
|
|
for (size_t j = 0; j < stimulationSet->getStimulationCount(); ++j)
|
|
|
|
|
|
|
|
|
CStimulationSet* stimulationSet = m_sequenceStimulationSet;
|
|
|
|
|
|
for (size_t j = 0; j < stimulationSet->size(); ++j)
|
|
|
{
|
|
|
{
|
|
|
uint64_t id = stimulationSet->getStimulationIdentifier(j);
|
|
|
|
|
|
|
|
|
uint64_t id = stimulationSet->getId(j);
|
|
|
bool flash = false;
|
|
|
bool flash = false;
|
|
|
int row = -1;
|
|
|
int row = -1;
|
|
|
int col = -1;
|
|
|
int col = -1;
|
|
|
|
|
|
|
|
|
if (isTarget)
|
|
|
if (isTarget)
|
|
|
{
|
|
|
{
|
|
|
m_stimuliQueue.push_back(OVTK_StimulationId_Target);
|
|
|
m_stimuliQueue.push_back(OVTK_StimulationId_Target);
|
|
|
flaggingStimulationSet.appendStimulation(OVTK_StimulationId_Target, stimulationSet->getStimulationDate(j), 0);
|
|
|
|
|
|
|
|
|
flaggingStimulationSet.push_back(OVTK_StimulationId_Target, stimulationSet->getDate(j), 0);
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
else
|
|
|
{
|
|
|
{
|
|
|
m_stimuliQueue.push_back(OVTK_StimulationId_NonTarget);
|
|
|
m_stimuliQueue.push_back(OVTK_StimulationId_NonTarget);
|
|
|
flaggingStimulationSet.appendStimulation(OVTK_StimulationId_NonTarget, stimulationSet->getStimulationDate(j), 0);
|
|
|
|
|
|
|
|
|
flaggingStimulationSet.push_back(OVTK_StimulationId_NonTarget, stimulationSet->getDate(j), 0);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (m_targetStimulationDecoder->isOutputTriggerActive(OVP_GD_Algorithm_StimulationDecoder_OutputTriggerId_ReceivedBuffer))
|
|
|
if (m_targetStimulationDecoder->isOutputTriggerActive(OVP_GD_Algorithm_StimulationDecoder_OutputTriggerId_ReceivedBuffer))
|
|
|
{
|
|
|
{
|
|
|
IStimulationSet* stimulationSet = m_targetStimulationSet;
|
|
|
|
|
|
for (size_t j = 0; j < stimulationSet->getStimulationCount(); ++j)
|
|
|
|
|
|
|
|
|
CStimulationSet* stimulationSet = m_targetStimulationSet;
|
|
|
|
|
|
for (size_t j = 0; j < stimulationSet->size(); ++j)
|
|
|
{
|
|
|
{
|
|
|
uint64_t id = stimulationSet->getStimulationIdentifier(j);
|
|
|
|
|
|
|
|
|
uint64_t id = stimulationSet->getId(j);
|
|
|
bool target = false;
|
|
|
bool target = false;
|
|
|
if (id >= m_rowStimulationBase && id < m_rowStimulationBase + m_nRow)
|
|
|
if (id >= m_rowStimulationBase && id < m_rowStimulationBase + m_nRow)
|
|
|
{
|
|
|
{
|
|
|
|
|
|
|
|
|
Kernel::IAlgorithmProxy* decoder = (k == 2 ? m_rowSelectionStimulationDecoder : m_columnSelectionStimulationDecoder);
|
|
|
Kernel::IAlgorithmProxy* decoder = (k == 2 ? m_rowSelectionStimulationDecoder : m_columnSelectionStimulationDecoder);
|
|
|
Kernel::TParameterHandler<const IMemoryBuffer*> selectionMemoryBuffer(
|
|
|
Kernel::TParameterHandler<const IMemoryBuffer*> selectionMemoryBuffer(
|
|
|
decoder->getInputParameter(OVP_GD_Algorithm_StimulationDecoder_InputParameterId_MemoryBufferToDecode));
|
|
|
decoder->getInputParameter(OVP_GD_Algorithm_StimulationDecoder_InputParameterId_MemoryBufferToDecode));
|
|
|
Kernel::TParameterHandler<IStimulationSet*> selectionStimulationSet(
|
|
|
|
|
|
|
|
|
Kernel::TParameterHandler<CStimulationSet*> selectionStimulationSet(
|
|
|
decoder->getOutputParameter(OVP_GD_Algorithm_StimulationDecoder_OutputParameterId_StimulationSet));
|
|
|
decoder->getOutputParameter(OVP_GD_Algorithm_StimulationDecoder_OutputParameterId_StimulationSet));
|
|
|
|
|
|
|
|
|
for (size_t i = 0; i < boxContext.getInputChunkCount(k); ++i)
|
|
|
for (size_t i = 0; i < boxContext.getInputChunkCount(k); ++i)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (decoder->isOutputTriggerActive(OVP_GD_Algorithm_StimulationDecoder_OutputTriggerId_ReceivedBuffer))
|
|
|
if (decoder->isOutputTriggerActive(OVP_GD_Algorithm_StimulationDecoder_OutputTriggerId_ReceivedBuffer))
|
|
|
{
|
|
|
{
|
|
|
IStimulationSet* stimulationSet = selectionStimulationSet;
|
|
|
|
|
|
for (size_t j = 0; j < stimulationSet->getStimulationCount(); ++j)
|
|
|
|
|
|
|
|
|
CStimulationSet* stimulationSet = selectionStimulationSet;
|
|
|
|
|
|
for (size_t j = 0; j < stimulationSet->size(); ++j)
|
|
|
{
|
|
|
{
|
|
|
uint64_t id = stimulationSet->getStimulationIdentifier(j);
|
|
|
|
|
|
|
|
|
uint64_t id = stimulationSet->getId(j);
|
|
|
bool selected = false;
|
|
|
bool selected = false;
|
|
|
if (id >= m_rowStimulationBase && id < m_rowStimulationBase + m_nRow)
|
|
|
if (id >= m_rowStimulationBase && id < m_rowStimulationBase + m_nRow)
|
|
|
{
|
|
|
{
|
|
|
|
|
|
|
|
|
" column : " << size_t(m_selectedCol) << "\n";
|
|
|
" column : " << size_t(m_selectedCol) << "\n";
|
|
|
}
|
|
|
}
|
|
|
//Switch Menu
|
|
|
//Switch Menu
|
|
|
m_currMenu = m_currMenu->get_SubMenu(m_selectedRow);
|
|
|
|
|
|
for(int i = 0; i < 6; i++)
|
|
|
|
|
|
|
|
|
if(m_currMenu->get_SubMenu(m_selectedRow) != nullptr)
|
|
|
{
|
|
|
{
|
|
|
std::string label_text = m_currMenu->get_LabelText(i);
|
|
|
|
|
|
|
|
|
|
|
|
gtk_label_set_text(m_Label[i], label_text.c_str());
|
|
|
|
|
|
|
|
|
m_currMenu = m_currMenu->get_SubMenu(m_selectedRow);
|
|
|
|
|
|
for(uint64_t i = 0; i < m_nTactilos; i++)
|
|
|
|
|
|
{
|
|
|
|
|
|
std::string label_text = m_currMenu->get_LabelText(i);
|
|
|
|
|
|
|
|
|
|
|
|
gtk_label_set_text(m_Label[i], label_text.c_str());
|
|
|
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
else
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
// _________________________________________________________________________________________________________________________________________________________
|
|
|
// _________________________________________________________________________________________________________________________________________________________
|
|
|
//
|
|
|
//
|
|
|
|
|
|
|