add the possibility to return all the possible solutions using the from_sample_point static methods by danielhrisca · Pull Request #1671 · hardbyte/python-can
Both me and mypy do not like the different return types of the from_sample_point method. 😄
What do you think about adding another method which generates BitTiming instances:
@classmethod
def iterate_from_sample_point(
cls,
f_clock: int,
bitrate: int,
sample_point: float = 69.0,
) -> Iterator["BitTiming"]:
...
yield bt
...
The from_sample_point method could use the generator to create the possible_solutions list and return the "best"