lancaster-university / codal-microbit-v2

CODAL target for the micro:bit v2.x series of devices
MIT License
44 stars 52 forks source link

datalog HTML: Visual Preview error for non-sequential time stamps might be confusing #195

Open microbit-carlos opened 2 years ago

microbit-carlos commented 2 years ago

It can be fairly common for a datalog to have non-sequential time stamps, for example when a programme is logging data from start up and the reset button is pressed, then the data continues being logged but time stamp has been reset.

In this cases, when opening the "Visual Preview" is are presented with this:

image

A few things about the error message:

The graph only includes rows down to row 4

1) I originally interpreted this as being "including row 4". I believe the wording here is tricky, as right now it is correct, and we want to keep the mention to the first erroneous row, since it actually has a link to it. So changes like using until row 3 are not valid. Is up to row 4 more clear? Not sure I have a better suggestion at the moment

2) Should this be row 4 or row 3? Maybe this will depend on the person, but I guess I would consider this to be a table with a header and 3 rows, instead of a 4 rows table. For example, if I were to ask somebody to tell me what's the first row, I'd expect them to say 1, 1 instead of Time, a.

The visual preview does not support repeated headers or non-numeric data. The first column must be a timestamp.

3) These are valid error conditions, but none of these apply in this use-case. We should also add non-sequential time stamps to this message.

microbit-carlos commented 2 years ago

Oh, and in case it's useful this MakeCode programme was used to generate the example:

datalogger.includeTimestamp(FlashLogTimeStampFormat.None)
datalogger.log(
datalogger.createCV("Time (seconds)", 1),
datalogger.createCV("a", "1")
)
datalogger.log(
datalogger.createCV("Time (seconds)", 2),
datalogger.createCV("a", "2")
)
datalogger.log(
datalogger.createCV("Time (seconds)", 1),
datalogger.createCV("a", "3")
)
martinwork commented 6 months ago

Reported in support ticket https://support.microbit.org/helpdesk/tickets/74936 (private)

martinwork commented 5 months ago

A comment was added to the above ticket that very often RESET gets pressed, on purpose or by accident, with an additional suggestion that it would e useful to read the last values from the logged data into variables.

I wonder if it would be possible to fall back to using row number for the horizontal axis.

martinwork commented 3 months ago

Reported in support ticket https://support.microbit.org/helpdesk/tickets/80176 (private)