OK, found out that the RtTrend was blinking because I was setting the
resources Rt_ARG_TREND_COLOR_LIST and Rt_ARG_TREND_ATTRIBUTES repeatedly
e.g. within my 20 millisec timer callback, in addition to adding new points
with Rt_ARG_TREND_DATA.
I moved the setup code over to a window post-realized function and voila -
nice smoothe trends w/o blinking and w/o using the PtDBContainer. However,
the PtDBContainer is still a great find for updating PtText widgets w/o
blinking.
Thanks again Norbert…
Jay Marchetti
Pittsburgh Firmware
www.pittsburghfirmware.com
Jay Marchetti <marchetti@pittsburghfirmware.com> wrote in message
news:92vetq$4md$1@inn.qnx.com…
Andrew:
The application is a motion controller where the numbers are actually
changing at a very high (5KHz) rate. Sub-sampling at 50 Hz was rather
arbitrary, though I want it fast because for this application the
perceived
rate of change in the number’s magnitudes (which represent analog
real-world
quantities like position, velocity, etc.) with time is usually more
important than reading the exact value of each sub-sample.
Hence, 2 Hz (500 millisec) would be way too coarse, e.g. imagine a digital
speedometer readout in your car that updates once per 10 seconds - a
Nyquist
rate is hard-wired into our brain such that humans cannot intuitively
perceive this as an analog quantity that is changing continuously with
time.
For things like chemical process control systems, with time constants in
minutes or hours, this is not really a concern; but in motion control, it
definitely is.
Back to nuts & bolts: Thing is, the PtText update (at 50 Hz) works just
fine
as a PtDBContainer child - and does not blink. BTW: I see blinking on
PtText
updates ONLY if the horizontal allignment is Center or Right, e.g. not
Left,
which is blinkless at 50 Hz.
I’ll work with it some more to see if I can get the RtTrend widget to work
just as well.
-Jay
Andrew Thomas <> andrew-s-thomas@home.nospam.com> > wrote in message
news:92tut3$7ac$> 1@inn.qnx.com> …
“Norbert Black” <> nblack@qnx.com> > wrote in message
news:92thbg$1ec$> 1@nntp.qnx.com> …
Jay Marchetti <> marchetti@pittsburghfirmware.com> > wrote:
I’m looking for a way to reduce the flashing when I update either:
a) right-justified text to a PtText widget or
b) sample-points to an RtTrend widget.
I’m using a 20 millisec repeating PtTimer callback to update the
widgets
and
I see kind of a beat frequency (rolling) blink through these display
controls.
I know its not my hardware - it runs the QNX Trend demo app just
fine
with
no update flashing.
I have tried about everything I can think of. QNX tech folks had me
upgrade
from Photon 1.13 to 1.14 - but no joy there. Anyone seen this or
have
any
ideas???
Make the widgets that are flashing children of a PtDBContainer
widget – it draws all of its contents as one block, removing the
flicker effect.
At 50Hz, that might not work. PtDBContainer slows the update process a
fair bit. Out of curiosity, why do you need to update the display at
50Hz?
Humans cannot discern animation frequencies above 27Hz, and cannot
read numbers at even lower frequencies than that (5-10 Hz?). If your
data
rate
is 50Hz, you could de-couple the input data rate from the display rate,
and
put
your screen updates on a 500ms timer. Then the PtDBContainer would work
well.
Andrew
\