Dat was mij niet bekend, weer wat geleerd. Je spreekt beter C dan ik, met Nederlands is het kennelijk net andersom... ;-p
Serial.print();
#define terminalCommand(x) break; case x: if(x##F())extern byte menuF() { // called from main switch(subCommand){ default: { nextCommand(getType); } terminalCommand(getType) { nextCommand(getID); } terminalCommand(getID) { nextCommand(getIO); } terminalCommand(getIO) { if (type == turnout) nextCommand(getSwitchType); else if (type == decouplerObject) nextCommand(getDecouplerIO); else nextCommand(hasLed); } terminalCommand(curvedOrStraight) { nextCommand(storeObject); } terminalCommand(hasLed) { if(hasLedIO == YES) nextCommand(getLedIO); else nextCommand(storeObject); } terminalCommand(getLedIO) { nextCommand(storeObject); } terminalCommand(getSwitchType) { if(switchType == COILS || switchType == RELAY) nextCommand(curvedOrStraight); else nextCommand(adjustCurvedPosition); } terminalCommand(adjustCurvedPosition) { nextCommand(adjustStraightPosition); } terminalCommand(adjustStraightPosition) { nextCommand(storeObject); } terminalCommand(storeObject) { nextCommand(0); return 1; } break; } return 0; }#undef terminalCommand
terminalCommand(getIO) { if(firstEntry) { firstEntry = 0; Serial.println("select IO 0-63, press ENTER when ready"); } if(serialByte && makeNumber(&IO,serialByte,0,63,'\n')) { return 1; } return 0;}