Asked — Edited

Updated Needed For Script Help

Small fix/correction suggested for the "Script Help". The Script Help states:

IsConnected( boardIndex ) Returns TRUE or FALSE if the specified EZ-B board index is connected Example: $status = IsConnected(0)

It does not appear to actually return a value of TRUE/FALSE it returns a value of 1/0, where 1 means connected and 0 represents disconnected.

This leads me to a question on how to use "Print". In my code below the value for $status is printed (either a 1 or a 0 for connected for disconnected).


$status = IsConnected(0)
Print($status)

If I run this from the options (or edit) of a script and then select the console tab and run it, I see the printed output. Is there any other place I can see the printed output, or not so much? This makes me want a virtual LCD screen to print things too. :)


ARC Pro

Upgrade to ARC Pro

Get access to the latest features and updates before they're released. You'll have everything that's needed to unleash your robot's potential!

United Kingdom
#1  
IF(IsConnected(0) = 1)
  $Status = "True"
Else
  $Status = "False"
EndIf

Pop that in a script in script manager somewhere and call it with ControlCommand each time you want to check status to save typing it each time.

Not sure if you wanted a work around or not but there it is anyway :)

P.S. Virtual LCD sounds awesome however since different LCD displays are controlled differently it may not be as useful as first thought. What I have done is resized the script control so it displays the correct number of characters and rows which works for the most part :)

PRO
Synthiam
#3  

In programming, this is the same for TRUE...


if ($x = true)

and


if ($x >= 1)

And this is also the same for FALSE...


if ($x = false)

and


if ($x = 0)

Remember, that TRUE and "TRUE" are no the same thing