Skip to content

FIXED unable to change picture #112

Description

@RDickens

I was unable to change the picture on a picture object.

A little bit of poking about shows the command sent to the nextion is p0.p0.pic=66 p0 is the name of the picture object. It appears that the object name is used twice.

Fix

In NexObject.cpp

change the if conditions

void NexObject::getObjGlobalPageName(String &gName)
{
    if(_page)
    {
        gName += _page->getObjName();
        gName += ".";
    }
    gName +=_name;
}

to

void NexObject::getObjGlobalPageName(String &gName)
{
    if(_page==nullptr)
    {
        gName += _page->getObjName();
        gName += ".";
    }
    gName +=_name;
}

Hope this helps

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions