Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about infinite frame #297

Open
zhusihan-python opened this issue Jan 24, 2025 · 1 comment
Open

Question about infinite frame #297

zhusihan-python opened this issue Jan 24, 2025 · 1 comment

Comments

@zhusihan-python
Copy link

Halo:

I have frame data comes from a serial port, like every 200ms it received a heartbeat

// Heartbeat frame parsed to device property
public class Device : ObservableObject
{
    public ReactiveProperty<DeviceResetType> DeviceResetState { get; set; } = new(DeviceResetType.NotRest);

    public ReactiveProperty<SealMotorResetType> SealMotorResetState { get; set; } = new(SealMotorResetType.NotRest);

    public ReactiveProperty<ushort> ScanTargetIndex { get; set; } = new(0);

    public ReactiveProperty<ushort> ActionPackNumber { get; set; } = new(0);
    ...
}

i want to expose the data to the UI layer(views),but the FrameProvider seems like a fixed size collections of data replay, how can I use a FrameProvider that can get new serial port data continuously, and push the data to views?

    void RunLoop()
    {
        var span = list.AsSpan();
        for (int i = 0; i < span.Length; i++)
@neuecc
Copy link
Member

neuecc commented Jan 27, 2025

What do you mean by "fixed size collections"?
Is the source code cut off in the middle?
I don't understand where this is intended to be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants