Start a new topic

@Pete’s test and feedback.Tks.

Hi,this is the topic of @Pete's tickets,we paste them here for discussion.Thank you,@Pete.


1.variable called va0, progress bar called j0.


 I put a progress bar (J0) up - and a button who's click property was:


 va0.val=va0.val+1

 j0.val=va0.val


Nothing - the progress bar was empty. Also trying to display the value of the variable in a text box produced an error - how do we do that?


Support Team:

You need to edit the code like this: 


page0.va0.val=page0.va0.val+1

j0.val=page0.va0.val



2.How do you set minimum and maximum values for J0 ?? So in my case I need minimum to be 0 and maximum to be 360… ???



3.Any chance of optional autorepeat on buttons???



4.If I set the display to dim…. And on the page itself set it to brighten up on touch – and on each button ALSO set to bright on touch.

 

So here’s the PAGE user code

 

dim=100

page0.tm0.en=1

 

That works – The timer is 5 seconds and dims the display when finished…

 

But on a button – where I fire out some serial..

 

print {rgb:0,188,255,188,10,1}

printh 0d

com_star

dim=100

page0.tm0.en=1

 

That timer operation is NOT working.. So I touch part of the empty screen and the screen lights up – after 5 seconds it dims… hit the screen again it lights up, 5 seconds later it dims. But then hit a button – and it DOESN’T light up…

 

Any ideas?


Ok I figured it out – there are TWO problems here.

 

Sometimes when you make a change and send it to the board it does NOT get sent. Moving a button around helps…so there is something wrong – in the issue below – I moved a button – sent the code again – and this time it worked.. but ONE of the buttons (no spelling error) has not updated.



5.The OTHER problem is your timer.

When you enable the timer it does NOT reset

 

So for example…. If I have a load of buttons, where each one sets the display back to full brilliance for 5 seconds, you would expect, if you press one button then another then another, that it would be 5 seconds after the LAST button press that the timer times out and the display dims – but it is NOT. If you keep pressing buttons, say once a second… after 5 seconds you will see the screen briefly dim… so repeated enabling does NOT reset the timer. It yould be more logical if it did, otherwise you have no way to have a dimming power saver when no-one is pressing buttons..



6.This does not appear to work on a button – the value continues beyond 100 on pressing.

 

if (page0.va0.val<=90)

{

page0.va0.val=page0.va0.val+10

}

j0.val=page0.va0.val



7.We have done some more tests..

 

This code FAILS in the timer..

 

 

dimtimer.val=dimtimer.val+1

if (dimtimer.val==5)

{

dim=100

page0.t1.txt="Hello"

}

if (dimtimer.val==10)

{

dim=30

page0.t1.txt="There"

dimtimer.val=0

}

 

Merely changing the variable from dimtimer to domtimer – it WORKS

Hence you parsing has a problem - it means you can’t have variables starting in “dim”



8.We’ve just realised you cannot have a variable that starts with the name of an internal variable…… so you have the variable DIM for the display dimming. Variables such as DIMSUM and DIMMER will fail.

2. Secondly, there seems to be something very, very wrong with the IF logic. If A>10 for example – seems to respond to negative numbers – i.e. it passes them.

 

Look at this code that WORKS – this is in a timer, to dim the display when a variable gets below a certain level. The timer is set to run 10 times a second…

 

if(dtimer.val==0)

{

dim=20

}

if(dtimer.val>10)

{

dim=100

}

if(dtimer.val==2)

{

dim=20

dtimer.val=0

}

if(dtimer.val==3)

{

dim=30

}

if(dtimer.val==4)

{

dim=40

}

if(dtimer.val==5)

{

dim=50

}

if(dtimer.val==6)

{

dim=60

}

if(dtimer.val==7)

{

dim=70

}

if(dtimer.val==8)

{

dim=80

}

if(dtimer.val==9)

{

dim=90

}

 

if(dtimer.val>0)

{

dtimer.val=dtimer.val-1

}

 

 

Ok, so the above WORKS..

 

Yet the simpler code below DOES NOT work…..

 

if (dtimer.val<0)

{

dtimer.val=2

}

if(dtimer.val>=10)

{

dim=100

}

if(dtimer.val==9)

{

dim=dtimer.val*10

}

if(dtimer.val==8)

{

dim=dtimer.val*10

}

if(dtimer.val==7)

{

dim=dtimer.val*10

}

if(dtimer.val==6)

{

dim=dtimer.val*10

}

if(dtimer.val==5)

{

dim=dtimer.val*10

}

if(dtimer.val==4)

{

dim=dtimer.val*10

}

if(dtimer.val==3)

{

dim=dtimer.val*10

}

if(dtimer.val==2)

{

dim=dtimer.val*10

}

if (dtimer.val!=0)

{

dtimer.val=dtimer.val-1

}

 

 

We must’ve looked at this for HOURS – there is nothing wrong with it – but it won’t work. The decrement seems to continue to work ignoring the check for zero.

 

Finally…. An ELSE statement would be REALLY good.



9.When you swap from p0 to p1, the timer stops working – which means repeating screen timeout code for every page??




1 person likes this idea

ITEAD Support Team will check these problem ASAP.


Welcome to post your suggestion here,guys.

You never did resolve most of the problems and this was a month ago.


Have you implemented an ELSE command?


The IF command fails on some comparisons (if (dtimer.val<0) simply does not work.


You cannot have 2 similarly names variables for example FRED and FRED1 -  are you going to fix this?


You cannot seem to concatenate variables and strings... so PRINT "HELLO" + FRED.VAL  does not work. This is important for sending back information on variables. Do you plan to fix this?



1 person likes this
Pete, You can manage the last item by using multiple print commands. So. PRINT "Hello" PRINT FRED.val When replying on a phone the message loses al new lines. So the two print commands need to be on separate lines.
Pete, also it seems all variables are unsigned long (32 bits) therefore the value cannot be less than zero. Test equal to zero?
Login or Signup to post a comment