ArduinoMenu icon indicating copy to clipboard operation
ArduinoMenu copied to clipboard

CustomPrompt example not updating

Open danielkucera opened this issue 4 years ago • 3 comments

The example says:

//this prompt will count seconds and update himself on the screen.

but it is not updating, It still shows 0 Looks like the function changed is not called: https://github.com/neu-rah/ArduinoMenu/blob/master/examples/CustomPrompt/CustomPrompt/CustomPrompt.ino#L40

Am I missing something?

danielkucera avatar Jan 08 '22 02:01 danielkucera

I've changed it to this and it works:

  virtual void clearChanged(const navNode &nav,const menuOut& out,bool sub) {
    dirty = false;
    t=millis()/1000;
    if (last!=t) {
      dirty = true;
    }
  }

Is that a correct way?

danielkucera avatar Jan 08 '22 23:01 danielkucera

i have this problem

CustomPrompt:40:16: error: conflicting return type specified for 'virtual bool altPrompt::clearChanged(const Menu::navNode&, const Menu::menuOut&, bool)' virtual bool clearChanged(const navNode &nav,const menuOut& out,bool sub=true) {

sirias52 avatar Aug 08 '22 05:08 sirias52

a pull request would be very welcomed :D

neu-rah avatar Aug 09 '22 14:08 neu-rah