Author Topic: LIne Color Change  (Read 5671 times)

Offline Mike AA

  • PLUS+1 Guru
  • *****
  • Posts: 116
  • Karma: +0/-0
    • Dewind Dewatering
LIne Color Change
« on: August 10, 2020, 09:26:29 PM »
I am trying to make horizontal lines with black text in front of it to be a visual representation of water temperature. I want the line to start off green when the temperature is low, turn yellow when it is slightly warm and turn red when its in the danger zone. I tried to use a couple boolean controlled switches, a 3 position switch, and some value connect, but my program compiled with the following error.

*** ERROR 302 *** [SDCC] INTERNAL: UNEXPECTED EXCEPTION WITH MESSAGE: {Failed to compile file: "DM1200T.c", Compiler error: 1}

I can delete the switches or the value connect and the code compiles fine.

I made sure to change the type to COLOR.

Am I missing something when it comes to changing color of an object on the displays?

Mike

edit: I just deleted the second switch and the wire after the yellow/green switch and it compiles. I added a wire, just a length of wire the the output of the yellow/green switch and it wouldn't compile.
« Last Edit: August 10, 2020, 09:39:24 PM by mikeaa12 »

Offline Mike AA

  • PLUS+1 Guru
  • *****
  • Posts: 116
  • Karma: +0/-0
    • Dewind Dewatering
Re: LIne Color Change
« Reply #1 on: August 10, 2020, 09:40:59 PM »
change from no wire to short wire after switch gives error.


Offline Stefan

  • Administrator
  • PLUS+1 Expert
  • *
  • Posts: 73
  • Karma: +0/-0
Re: LIne Color Change
« Reply #2 on: August 11, 2020, 08:56:41 AM »
Hi,

It's not possible to define a color with a string. You have to use RGB codes.



Best regards
Stefan, PLUS+1 Helpdesk

Offline Mike AA

  • PLUS+1 Guru
  • *****
  • Posts: 116
  • Karma: +0/-0
    • Dewind Dewatering
Re: LIne Color Change
« Reply #3 on: August 11, 2020, 02:05:10 PM »
Thanks Stefan that worked perfectly!

Mike