Skip to content

[ScopeMimicry] Updates the dump in the examples #29

@luizvilla

Description

@luizvilla

Description

When working with the grid forming example, I have noticed a complex snippet necessary to dump the code.
This snippet has a far more simple and useful way of being done.

Action

Replace the download part of the application task by the following code:

if (!is_downloading) {
            printk("%d:", mode);
            printk("% 7.3f:", Vgrid_amplitude_ref);
            printk("% 7.3f:", I1_low_value);
            printk("% 7.3f:", I2_low_value);
            printk("% 7.3f:", V1_low_value);
            printk("\n");
        } else {
            scope.reset_dump();
            printk("begin record\n");
            while(scope.get_dump_state() != finished) {
                printk("%s", scope.dump_datas());
                task.suspendBackgroundUs(100);
            }
            printk("end record\n");
            is_downloading = false;
        }

This should provide the index of the end of dump. This information is used to reorganize the final plot and csv data structures.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions