Unexpected behavior when using TimePlot constructor

Support forum for MegunoLink
Post Reply
RBerliner
Posts: 7
Joined: Wed Apr 03, 2019 11:07 pm

Sat Apr 06, 2019 9:30 pm

In the Sinewave example in an Arduino Uno, if I enable channels and specify the output stream as:

TimePlot MyPlot("Waveforms", Serial);

I find that the remaining setup commands

MyPlot.SetXlabel("Time");
MyPlot.SetYlabel("Amplitude");

// Set the plotting parameters. "Sinewave" = series name, Plot::Blue = line colour
// 2 = line width, Plot::Square = marker style
MyPlot.SetSeriesProperties("Sinewave", Plot::Blue, Plot::Solid, 2, Plot::Square);
MyPlot.SetSeriesProperties("Cosinewave", Plot::Red, Plot::Solid, 2, Plot::Square);

have no effect.

Is this a bug or a feature or simply operator error?
philr
Posts: 446
Joined: Mon May 26, 2014 10:58 am

Sun Apr 07, 2019 8:12 am

Seems to work fine for me. Maybe you have accidentally selected no channels.
x2scrap.png
x2scrap.png (16.63 KiB) Viewed 12055 times
Make sure either of the highlighted bits in the picture are highlighted otherwise I dont think it will work.

Cheers
Phil
ceremona
Posts: 4
Joined: Sat Jun 15, 2019 12:33 am

Mon Jun 17, 2019 8:42 pm

I see this problem as well. The advice about selecting highlighted values doesn't seem to do anything.

Not sure if this is related but when I attempt to look at Series Properties, it asks me to select a series. Not sure what it expects me to do. The graph is showing up ok, it just ignores any values I set for shape and color in the arduino code if they aren't the default.

Is there a list of known bugs somewhere? I am evaluating this software and I need to know what is possible.
philr
Posts: 446
Joined: Mon May 26, 2014 10:58 am

Wed Jun 19, 2019 5:26 am

Hi Ceremona, did you have any luck with this?
philr
Posts: 446
Joined: Mon May 26, 2014 10:58 am

Wed Jun 19, 2019 5:43 am

I tested this myself and it seemed to work fine. The important thing to realise is that the message is only sent once when the system boots. You can also get it to send it with each SendData call. See below for example.
MyPlot.SendData(F("Sinewave"), dY, Plot::Yellow, Plot::Solid, 2, Plot::Square);

Try this and see if it works.

Cheers
Phil
ceremona
Posts: 4
Joined: Sat Jun 15, 2019 12:33 am

Tue Jun 25, 2019 7:35 pm

Hi.

Sorry for the late reply. I would rather just set these color shape aesthetic properties once via the SetSeriesProperties function. From reading the docs it's not clear to me what using SendData(F("temp"),...) does vs just SendData("temp",...). It looks like the same logic can be used in the SetSeriesProperties function as well, but I don't see it taking effect in the actual graph. The properties settings in the GUI seem to always override.

As an unrelated issue or feature request. It would be nice to be able to specifiy the date and time formats for the logging file name as well as delimeter between fields within the log. Right now my Windows 7 system barfs at files that use timestamps in the name due to the use of a colon. I can imagine a lot of people encounter that problem.
philr
Posts: 446
Joined: Mon May 26, 2014 10:58 am

Mon Jul 01, 2019 8:49 am

The F("") notation is a trick in Arduino to store strings in flash memory. This is useful as strings take up a lot of ram.

You can definitely use SetSeriesProperties but be careful that if your arduino boots up before MegunoLink is connected we will likely miss that message and so the properties wont be set. If you set the style in the individual messages it wont be missed.

Cheers
Phil
Post Reply