blinking/highlighted variable text (per character)

Posted on
Sat Jul 30, 2022 7:32 am
welchgregusa offline
Posts: 101
Joined: May 29, 2013
Location: Orlando, FL

blinking/highlighted variable text (per character)

This is somewhat related to the "Can control page text change color based on a value?" topic (https://forums.indigodomo.com/viewtopic.php?f=83&t=25245), and the "Hayward AquaConnect" topic (https://forums.indigodomo.com/viewtopic.php?f=132&t=18578), but specifically about control page variable text.

I have a control page variable that I use to display some dynamically generated text that is parsed from a Hayward pool controller—the text that is being shown on the physical display (outside). I currently do this by simply using a variable (shown on the control page) that contains the text which I update whenever new text is parsed/arrives—every two seconds (Hayward spec).

When you are changing a parameter of the system, the system will blink the text associated with the parameter you are changing, on a per-character basis. For example, the "9" and the "A" in the attached example (changing the hour of the time—currently 9 AM). In effect, it's something like a blinking cursor. I don't particular care if the indication is done by blinking, color, etc. but at the moment I'm pursuing blinking because that's what the Hayward system does.

I can make the characters blink by swapping in and out two variables/strings every second (one half of the two-second update cycle), one with all of the characters and one with hyphens in place of the "off" characters as shown in the attached, but the control page updates are somewhat sporadic, sometimes not happening when I can see that the variables are changing (from the Variable List window). I have tried changing the variable values from within the Python script, and tried using a Schedule in Indigo (using variable-into-variable actions), but nothing so far seems solid/reliable. I even tried putting a "blinking" script (that swaps variables) in a separate process, hoping it might be more reliable, but no luck. This is all on the same LAN at home (good/reliable/fast). The server is relatively new M1 mac mini (fast) running basically nothing but Indigo.

I have thought about things like individual images or variables per character, but there are two lines of text with 20 characters per line—a lot. Also I've had trouble getting text to align, even with the available mono-spaced fonts, so that doesn't seem like a great pathway.

Can anyone think of an alternate fast/efficient way to achieve the per-character blinking, or any other per-character highlight/indicator?

And/or suggest (perhaps Matt or Jay) what would be the fastest way to change the displayed variable contents (text)? For example, is there a way to simply update a pointer/address/handle for the display text, as opposed to copying all of the characters (which I presume is happening...)?
Attachments
welch_blinkingtext_example.jpg
welch_blinkingtext_example.jpg (75 KiB) Viewed 1066 times

Posted on
Sat Jul 30, 2022 10:05 am
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: blinking/highlighted variable text (per character)

I can't think of any hack to do this outside of just building your own web pages.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sun Jul 31, 2022 3:20 pm
welchgregusa offline
Posts: 101
Joined: May 29, 2013
Location: Orlando, FL

Re: blinking/highlighted variable text (per character)

Thanks Jay. I came up w/ something that seems to work quite well: when a display update blink cycle (every two seconds) starts that has any blinking characters, I immediately update the display line variables with the "blinked" versions (hyphens for chars that should be blinking), then I create and start a Timer object (Threading) with a one second interval (time delay) and a function that simply restores the display line variables to the "not blinked" versions (after one second). So instead of a repeating cycle it's a "one shot" swap and restore, which is also good because it is then synchronized with the "update display" command coming back from the controller over the serial line (every two seconds). So far so good.... Thanks again.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 5 guests