datalogger simulator erases most data when the log is full
Describe the bug A simple programme logging data rapidly will fill the datalog storage fairly quickly. Running the programme in the the simulator, when the "data full" event is raised, it seems to erase all previous data except the last row.
Downloading the CSV file also downloads only the last log, so all the previous simulated data is lost.
To Reproduce Load this programme, go into the datalog simulator and wait until the programme is full, should a bit less than 5 minutes, can be left in the background.
datalogger.onLogFull(function () {
basic.showIcon(IconNames.Skull)
})
datalogger.mirrorToSerial(true)
basic.showIcon(IconNames.Happy)
basic.forever(function () {
datalogger.log(
datalogger.createCV("y", input.acceleration(Dimension.Y)),
datalogger.createCV("x", input.acceleration(Dimension.X))
)
})
This shows the programme working as expected:
And the "datalog full" event has been configured to also show a skull on the display:
At this point only the last row is available.
Expected behavior Historial datalog data to be available
micro:bit version (please complete the following information): N/A
Desktop (please complete the following information):
Chrome 138 on macOS
Additional context
Tested on MakeCode Live and Beta:
makecode.microbit.org version: 7.1.56 Microsoft MakeCode version: 11.4.43 microbit runtime version: v2.2.0-rc6 codal-microbit-v2 runtime version: v0.3.0
@microbit-carlos is this is a regression from live?
No, it's the same in both.