Seytonic / malduino

All the Malduinos!
MIT License
208 stars 50 forks source link

DELAY not working #17

Closed daktar1 closed 6 years ago

daktar1 commented 6 years ago

hi,

it seems that in my case DELAY is not working. When I do a DELAY 2000 it should wait for 2 seconds or not?

Malduino elite, german keyboard. Ino file I used attached.

elite.zip

Nibot1 commented 6 years ago

@daktar1 Please look at the closed Issue #14

daktar1 commented 6 years ago

@Nibot1 ty. I will try that tomorrow. If it is not working can I write my own DELAYS here until it is fixed? else if(equalsBuffer(0,space,"DELAY")) delay(getInt(buf,space)); else if(equalsBuffer(0,space,"STRING")){ for(int i=space+1;i<bufSize;i++) KeyboardWrite(buf[i]);}

For instance: else if(equalsBuffer(0,space,"DELAY")) delay(getInt(buf,space)); else if(equalsBuffer(0,space,"STRING")){ for(int i=space+1;i<bufSize;i++) KeyboardWrite(buf[i]);} else if(equalsBuffer(0,space,"DELAYA")) delay(150); else if(equalsBuffer(0,space,"DELAYB")) delay(1000); etc...

Nibot1 commented 6 years ago

@daktar1 this Should Work. A hint for the Solution of #14 please check that the lines with the STRING Argument only contains Max. 128 Chars else the last Chars wouldn't be Typed.

daktar1 commented 6 years ago

ty. I edited the the DELAY section similar to the STRING section. DELAY seems to work now. Attached my ino file: elite.zip

int space = getSpace(0,bufSize); String j=""; if(space == -1) runCommand(0,bufSize); else{ if(equalsBuffer(0,space,"DEFAULTDELAY") || equalsBuffer(0,space,"DEFAULT_DELAY")) defaultDelay = getInt(buf,space); else if(equalsBuffer(0,space,"DEFAULTCHARDELAY") || equalsBuffer(0,space,"DEFAULT_CHAR_DELAY")) defaultCharDelay = getInt(buf,space); else if(equalsBuffer(0,space,"DELAY")) {for(int i=space+1;i<bufSize;i++) j+=buf[i]; delay(j.toInt());} else if(equalsBuffer(0,space,"STRING")){ for(int i=space+1;i<bufSize;i++) KeyboardWrite(buf[i])

Nibot1 commented 6 years ago

@daktar1 Is this issue solved ? If yes please close the issue.

daktar1 commented 6 years ago

@Nibot1 for me yes.