Page 1 of 1

Change icon when ignition on

Posted: Wed Jan 17, 2018 9:58 am
by bertagnan
Hi all,
I created an event for "ignition on" and then during this event wanted to change the icon according to the ignition state.

I thus used Client script acquiring the ignition signal through the "Argument" as well explained in the blog.

Code: Select all

var quadro = Core.resolveInput('Quadro');



if (quadro) {



"Quadro" is the argument for [SIGNAL_IGNITION]

Where in the code you find "if (quadro)" I have tried every possible expression (boolean, text, integer) to try to make it work. The event is running always (start, pending, finish) as I expect the icon to be restored at the last step.

I should be making some big conceptual mistake.

Is anyone willing to help? Where I am terribly wrong? :roll:

Re: Change icon when ignition on

Posted: Fri Mar 23, 2018 5:36 am
by BSO
Hi bertagnan,

Ignition parameter is string format and the values are 'True' or 'False'
also, please update your core plugin to latest update

Please try this, it's working for me :D :

Code: Select all

var quadro= Core.resolveInput('Quadro');

if(quadro == 'True')
//if ignition On, marker change color to green
else if(quadro == 'False')
//if ignition Off, marker change color to black