Hello All,
I am designing a data log system for an engine control system.
summarised, you can draw a graph (injection and ignition timing in function of rpm and tps) containing up to 12 curves.
depending on the position of a sensor, the control system will choose one of these curves.
as feedback, the control system will continously (every rotation) send data.
With an UI you can open the the curves that are programmed in the control box.
A crosshair will show which curve is active and at what rpm we are running.
each rotation the screen needs to be updated, without delay, since it has to be a real-time logger.
I now use
parent->RedrawWindow(graph_rect,NULL);
the graph is shown in the parent dialog, the child dialog will enable the user to select some visual options.
graph_rect is the CRect in the main dialog containing the graph
This works, but since the rect is continuously updating, you get a flicker effect.
As not only the crosshair is updated, but the entire graph (curves, axes, legends, title, grid,...)
if I use
parent->invalidate();
it goes smooth, without flicker, but there is a delay, since everything will be updated.
And the crosshair will run far behind the real timing
how can I avoid this?
Thanks in advance