Open schwos opened 10 months ago
I was successful in getting the MENU_OUTPUTS to generate the initialize:
Menu::idx_t outTops73[2]; panel _panels_outPanels73[] ={{0, 0, 128 / 6, 64 / 10}}; Menu::navNode* _nodes_outPanels73[sizeof(_panels_outPanels73)/sizeof(panel)]; Menu::panelsList outPanels73(_panels_outPanels73,_nodes_outPanels73,sizeof(_panels_outPanels73)/sizeof(panel));; Menu::NanoEngine1Out out73(engine,colors,outTops73,outPanels73,6,10,0,3); Menu::menuOut* out_outPtrs[] ={ &out73, }; Menu::outputsList out(out_outPtrs,sizeof(out_outPtrs)/sizeof(Menu::menuOut*));
Though at moment I have LCDGFX complaining..
We are leveraging small Arduino for a project which have limited memory. We have been successful in using LCDGFX to fit everything within the available memory we have. At the moment we are running about 85% prior to full optimization. We would like to leverage ArduinoMenu vs the LCDGFX built in menu as it provides a bit more flexibility.
Challenge we are having is LCDGFX leverages two class objects together Display and Nanoengine. Which are initialized in the following manner:
DisplaySSD1306_128x64_I2C display(-1); NanoEngine1<DisplaySSD1306_128x64_I2C> engine(display);
Using the Macro MENU_OUTPUTS we can't figure out how to pass the two class objects.
I am attempting to figure out how I can pass the nanengine and display objects to ArduinoMenu without throwing a compiler error.
I have tried:
The above give me -> This declaration has no storage class or type specifier
I have attempted without the Macro:
const Menu::panel panels[] MEMMODE={{0,0,40,2}}; Menu::navNode* nodes[sizeof(panels)/sizeof(Menu::panel)];//navNodes to store navigation status Menu::panelsList pList(panels,nodes,1);//a list of panels and nodes Menu::idx_t lcdTops[MAX_DEPTH]; //Menu::liquidCrystalOut outLCD(lcd,lcdTops,pList); Menu::menuOut* const outputs[] MEMMODE={&engine}; //list of output devices Menu::outputsList out(outputs,1);
This states ->
if I try Menu::menuOut* const outputs[] MEMMODE={&engine(display)};
Compiler states:
Below is the draft lcdgfxOut.h library to be inserted into ArduinoMenu..
`#ifndef RSITE_ARDUINOP_MENU_LCDGFX
define RSITE_ARDUINOP_MENU_LCDGFX
//#include
include "lcdgfx.h"
include "lcdgfx_gui.h"
//DisplaySSD1306_128x64_I2C display(-1); // or (-1,{busId, addr, scl, sda, frequency}). This line is suitable for most platforms by default //NanoEngine1 engine(display);
include "menuDefs.h"
namespace Menu {
}
endif //RSITE_ARDUINOP_MENU_U8G2
`