Integer in between not working


#1

1) Give a description of the problem
If Variable between 1 & 5
Do this
The variable is 2 but it is evaluating false

2) What is the expected behaviour?
It should evaluate True

|+2ms |╔Received event [vEarlyStart].switch = on with a delay of 107ms|
|---|---|
|+44ms |║RunTime Analysis CS > 18ms > PS > 6ms > PE > 20ms > CE|
|+46ms |║Runtime (42390 bytes) successfully initialized in 6ms (v0.3.110.20191009) (44ms)|
|+47ms |║╔Execution stage started|
|+54ms |║║Comparison (enum) on changes_to (string) on = true (0ms)|
|+55ms |║║Cancelling condition #4's schedules...|
|+56ms |║║Condition #4 evaluated true (5ms)|
|+57ms |║║Cancelling condition #3's schedules...|
|+58ms |║║Condition group #3 evaluated true (state changed) (6ms)|
|+64ms |║║Calculating (integer) 2 + (integer) 1 >> (integer) 3|
|+69ms |║║Comparison (integer) 3 is_between (integer) 1 .. (integer) 5 = false (2ms)|
|+70ms |║║Condition #6 evaluated false (10ms)|
|+76ms |║║Comparison (integer) 2 is_between (integer) 1 .. (integer) 5 = false (2ms)|
|+78ms |║║Condition #25 evaluated false (6ms)|
|+79ms |║║Condition group #5 evaluated false (state did not change) (19ms)|
|+85ms |║║Calculating (integer) 2 + (integer) 1 >> (integer) 3|
|+90ms |║║Comparison (integer) 3 is_between (integer) 6 .. (integer) 8 = false (3ms)|
|+91ms |║║Condition #10 evaluated false (10ms)|
|+92ms |║║Condition group #7 evaluated false (state did not change) (12ms)|
|+100ms |║║Calculating (integer) 2 + (integer) 1 >> (integer) 3|
|+103ms |║║Comparison (integer) 3 is_equal_to (integer) 0 = false (1ms)|
|+104ms |║║Condition #15 evaluated false (8ms)|
|+108ms |║║Comparison (integer) 0 is_equal_to (integer) 1 = false (2ms)|
|+109ms |║║Condition #20 evaluated false (4ms)|
|+110ms |║║Condition group #19 evaluated false (state did not change) (15ms)|
|+111ms |║║Condition group #14 evaluated false (state did not change) (16ms)|
|+113ms |║╚Execution stage complete. (65ms)|
|+114ms |╚Event processed successfully (113ms)|

#2

Not sure where you got “is between”. I used “is inside of range” and it worked.


#3

I loaded your piston hf8d. I see how you got “is between”. Interesting. Is this a bug?


#4

I believe ‘is between’ is specific to time ranges. I haven’t tried too hard but I couldn’t find a way of recreating your conditions from scratch.


#5

If he did not select a comparison in the above and clicked “save”, I think that created the “is between”. But the comparison did not work. At least that is what I have gleaned from his piston.


#6

Yeah I had is between in the comparison.
I found out that it’s only used for time and dates.
Inside of range is the correct one to use. Thanks.
Range is for numbers. Between is for other then numbers.


#7

I can’t click on ‘Add’ without a comparison being selected and if I have ‘is between’ selected it is removed when I switch to an integer variable.

I could replicate those conditions by starting off with Date and Time variables to add the ‘in between’, adding, changing the variables to integers, editing the conditions again, changing to values in the range, and saving again. It allowed this even though no comparison was now indicated. So there is a bug there and I guess there might be a quicker way to get to it.