Skip to content

bug: Off by one error in smith chart plot? #833

@thehans

Description

@thehans

Bug Report

**NanoVNA-Saver version: **

0.7.3

Current behavior:

I noticed on a smith chart with large changes (steep VSWR dip) at the stop frequency and by setting marker at the stop freq that the marker was beyond the end of the plotted lines.

Image

Expected behavior:

Lines extend to all data points

Steps to reproduce:

Set marker to maximum frequency on a reading that changes rapidly (steep dip near stop frequency) and it can be seen off the end of the lines.

Related code:

Looking at the source, I think I may have identified the source of this:

if d.freq > fstart and d.freq < fstop:

I don't know enough about the codebase to say whether this check is warranted at all, (why would data ever be outside of the frequency range?)
Anyways, I believe the solution would be to use <= and >= operators here to include those endpoints, if not removing the check altogether.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions