Saturday, December 16th 2017, 7:44pm UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Thomas W.

Beginner

Date of registration: Jun 2nd 2015

Posts: 39

1

Tuesday, November 28th 2017, 1:26pm

GRAPH widget for MPP tracking application

Hi there,

I want to use the GRAPH widget in XY mode in order to display an MPPT curve in real time (like in the attached image). Therefore I want to indicate the maximum power point and the corresponding current value with a marker (cross or circle). I was already able to modify the example WIDGET_GraphXY.c in order to get the expected behavior with the aid of a owner draw callback function (see attached source file).
Unfortunately I am not completely satisfied with my solution and therefore I have the following questions:

1. Is it possible to update a single graph data object without calling GRAPH_DATA_XY_Clear() and GRAPH_DATA_XY_AddPoint()? I was looking for an invalidation function like WM_InvalidateWindow() but without success...

2. Is it possible to get the index of the currently drawn point in the user defined owner draw callback function? I would like to look for the "MPP" value in the data array before I draw the graph and then I want to draw the indicator at the corresponding point index in the user defined owner draw callback function.

3. Is there a WM message or notification which informs me if the graph data object is cleared, updated or if a point is added?


I also found this thread How to make marker on graph widget in the forum, but I think that my solution with the owner draw callback function would be more elegant.

Furthermore I noticed that there are some undocumented function declarations in GRAPH.h...

Hope you can help me.

regards Thomas
Thomas W. has attached the following image:
  • MPPT.jpg
Thomas W. has attached the following file:
  • WIDGET_GraphXY.txt (21.61 kB - 10 times downloaded - Last download: Dec 11th 2017, 8:02am)

This post has been edited 2 times, last edit by "Thomas W." (Nov 28th 2017, 1:33pm)