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

vcocalc.py improvements #1773

Closed
wants to merge 1 commit into from
Closed

vcocalc.py improvements #1773

wants to merge 1 commit into from

Conversation

will-v-pi
Copy link
Contributor

Add extra check to match checks in check_sys_clock_khz, and add --lock-refdiv option to set fixed refdiv

Also add blurb to the output when a non-standard refdiv is required

Fixes #1665, and fixes #1451

Add extra check to match checks in check_sys_clock_khz, and add --lock-refdiv option to set fixed refdiv
@will-v-pi will-v-pi added this to the 1.6.0 milestone Jul 23, 2024
@will-v-pi will-v-pi requested a review from kilograham July 23, 2024 17:46
@will-v-pi will-v-pi modified the milestones: 1.6.0, 1.6.2 Jul 23, 2024
@lurch lurch linked an issue Jul 24, 2024 that may be closed by this pull request
refdiv_max = 63

def validRefdiv(string):
if ((int(string) < refdiv_min) or (int(string) > refdiv_max)):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only a minor nit, but I think personally I'd do the int(string) once, rather than three separate times?

if best[4] != 1:
print(
"""
As the requires a non-standard refdiv, this will
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"As the requires" -> "As this requires" ?

)\
""".format(best[4], int((args.input * 1_000_000) / best[4] * best[1]), best[2], best[3]))
else:
print("UNABLE TO COME UP WITH A SOLUTION....")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😂

@lurch lurch linked an issue Jul 24, 2024 that may be closed by this pull request
@kilograham kilograham modified the milestones: 1.6.2, 2.0.0 Aug 8, 2024
@will-v-pi will-v-pi closed this Aug 9, 2024
@will-v-pi will-v-pi deleted the vcocalc-fixes branch August 13, 2024 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants