You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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 ->
cannot convert 'NanoEngine1<DisplaySSD1306_128x64_I2C>' {aka 'NanoEngine<NanoCanvas<16, 16, 1>, DisplaySSD1306_128x64_I2C>'} to 'Menu::menuOut* const' in initialization
if I try Menu::menuOut* const outputs[] MEMMODE={&engine(display)};
Compiler states:
call of an object of a class type without appropriate operator() or conversion functions to pointer-to-function type
Below is the draft lcdgfxOut.h library to be inserted into ArduinoMenu..
`#ifndef RSITE_ARDUINOP_MENU_LCDGFX
#define RSITE_ARDUINOP_MENU_LCDGFX
//#include <U8g2lib.h>
#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<DisplaySSD1306_128x64_I2C> engine(display);
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 <U8g2lib.h>
#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<DisplaySSD1306_128x64_I2C> engine(display);
#include "menuDefs.h"
namespace Menu {
}
#endif //RSITE_ARDUINOP_MENU_U8G2
`
The text was updated successfully, but these errors were encountered: