neu-rah / ArduinoMenu

Arduino generic menu/interactivity system
GNU Lesser General Public License v2.1
929 stars 189 forks source link

Disable SerialOut #422

Closed schwos closed 10 months ago

schwos commented 10 months ago

I have disable SerialIn but want to disable SerialOut and anytime I remove SERIAL_OUT(Serial) from the MENU_OUTPUTS but I end up with compiler errors as below. If I put the Serial_OUT back the error disappear and it compiles. What am I missing?

error: expected constructor, destructor, or type conversion before '(' token

define CALL(a,b,...) a##_##b(__VA_ARGS<

------------------------------------Snippet of Code Below---------------------------------

`#define MAX_DEPTH 2

//serialIn serial(Serial); chainStream<0> in(NULL); //MENU_INPUTS(in,&serial); //MENU_INPUTS(in, NULL);

// MENU_INPUTS(in,&encStream,&encButton);//,&serial);

MENU_OUTPUTS(out,MAX_DEPTH ,U8G2_OUT(u8g2,colors,fontX,fontY,offsetX,offsetY,{0,0,U8_Width/fontX,U8_Height/fontY}) //,SERIAL_OUT(Serial) );

NAVROOT(nav,mainMenu,MAX_DEPTH,in,out);`

schwos commented 10 months ago

Nevermind, I figured it out needed to read the Wiki in a bit more detail..

MENU_OUTPUTS(out,MAX_DEPTH ,U8G2_OUT(u8g2,colors,fontX,fontY,offsetX,offsetY,{0,0,U8_Width/fontX,U8_Height/fontY}) //, SERIAL_OUT(Serial) , NONE //<- Must has two items in the Macro but to have one output use NONE );