I'm getting an "expected identifier before '&' token"
But looking at the class constructor and header the syntax looks right to me.
Full sketch attached. I modified the LcdGraph to LcdGraphAda class because it will take in an Adafruit_RGBLCDShield not a LiquidCrystal type as it was intended to. I broke something along the way.
#include <Arduino.h>
#include <Adafruit_MCP23017.h>
#include "Adafruit_RGBLCDShield.h"
#include "LcdBarGraphAda.h"
void Init();
class PMan
{
public:
void setup();
void loop();
private:
Adafruit_RGBLCDShield lcd; // = Adafruit_RGBLCDShield();
// temp
void InitBargraph(void);
void DrawBargraph(float value, float maxValue);
LcdBarGraphAda bg(&lcd, 16); //<-- Error: expected identifier before '&' token
};
PMan pman;
void PMan::loop(void)
{
}
// arduino sketch entrypoints vectors
void setup(void)
{
// pman.setup();
}
void loop(void)
{
pman.loop();
}
// -- constructor
LcdBarGraphAda::LcdBarGraphAda(LiquidCrystal* lcd, byte numCols, byte startX, byte startY)
{
}
PasteurizeMan3.zip (40.4 KB)