Start a new topic

VISability of an item

Hello, I have a problem:


I need to know visability of one item in Nextion code -


I change visability by Arduino through Serial2.print("vis t18,0").

It works.

But then I need to know it in Nextion's timer code smt like:

if(t18.vis<=1)
{
t6.pco=63488
}else
{
t6.pco=0
}

and I didn't found how to do it.

Is it possible? If Yes, then how?


best regards, Alexander


Program purposefully, and you know the state of vis.


You can not do it that way, where is .vis attribute in t6 ???

Hello!

It's very pity that I can't see this attribute.

My idea was:

because arduino is heavy loaded by working with sensors/servos/sim800, I wanted just give the information to nextion display, and "color" it by Nextion code.

And it works well: if(t18.val<=1)....t18.pco=0

But I have some negative values, where "under zero" means a dot (visible/unvisible) depends on vlaue.

So i wanted to know by nextion code - is this dot visible or nt, and then color the information....



When there is a .vis attribute then you can perhaps do in that manner.

There has never been a vis attribute, and most likely will not be.

Nextion is never a MCU replacement.


However, there is bitwise arithmetic and Variable components on Nextion

and it is not hard to use a uint32_t as 32 binary flags.


Needing vis was perhaps neat for layering effects in the early days

 - but perhaps less useful in an HMI design flow.


Consider if you are overcomplicating your design.

If it has already to be handled in Nextion code, I'd use a variable and bit mask combination for handling that task.