P3 Speller, change matrix during a run

Forum for software developers to discuss BCI2000 software development
Locked
OKI
Posts: 18
Joined: 23 Jul 2010, 05:53

P3 Speller, change matrix during a run

Post by OKI » 17 Mar 2011, 07:47

Hello,

I'm trying to implement a T9 System (writing with just nine buttons, and additional word proposals) to the P3 Speller. So that if the numer of menus is just one, the Matrix gets repainted after each SelectedTarget.

Therefore, i added some Code to P3SpellerTask::OnEnter() Function,

Created a new ChangeMat() Function that inserts my new Values (from Parameters and a additional Map). The ChangeMat() Function is implemented close to the P3SpellerTask::LoadMenu() Function. So the values are written to pTextStimulus->Settext and were added to ioStimuli, rowSet and colSet.

And of course i reuse the mDisplay.Show() and mDisplay.Update() funktion from the StimulusTask.-h / -cpp. This was possible after i set them to 'public'.

Unfortunately the matrix stays the same after the whole new implemented procedure. Does anyone know a relief?

Tanks for reading and answers...

mellinger
Posts: 1065
Joined: 12 Feb 2003, 11:06

Re: P3 Speller, change matrix during a run

Post by mellinger » 17 Mar 2011, 12:12

Created a new ChangeMat() Function that inserts my new Values (from Parameters and a additional Map). The ChangeMat() Function is implemented close to the P3SpellerTask::LoadMenu() Function. So the values are written to pTextStimulus->Settext and were added to ioStimuli, rowSet and colSet.
It appears you are creating new TextStimulus objects in addition to the existing ones. If you want the new ones to replace the existing ones, you need to delete the existing ones first.

Juergen

OKI
Posts: 18
Joined: 23 Jul 2010, 05:53

Re: P3 Speller, change matrix during a run

Post by OKI » 18 Mar 2011, 05:40

Dear Juergen,

thank you for your reply,

your advice saved my day! Everything works fine now.

Bye

Locked

Who is online

Users browsing this forum: No registered users and 1 guest