alchemyEngine / measure_thermal_behavior

Scripts for measuring and displaying thermal behavior on Voron 3D printers
78 stars 12 forks source link

address issue with gear ratio calculation #2

Closed jeremy-asher closed 1 year ago

jeremy-asher commented 1 year ago

Apologies if I'm missing something here, but on my system, the gear ratio config contains a list of lists of two numbers and the divisor gets lost in the calculation. For example, my config returns:

[[80.0, 16.0]]

The existing calculation would use 80 then iterate through the following ratios (none in this case) and lose the 16. If I configure two ratios, I get a crash:

Traceback (most recent call last):
  File "./measure_thermal_behavior.py", line 531, in <module>
    main()
  File "./measure_thermal_behavior.py", line 413, in main
    metadata = gather_metadata()
  File "./measure_thermal_behavior.py", line 94, in gather_metadata
    gear_ratio = gear_ratio/float(reduction)
TypeError: float() argument must be a string or a number, not 'list'

Hope this is helpful!

alchemyEngine commented 1 year ago

Thanks!

Have you tested this with the comma-separated list option, e.g. 57:11, 2:1, as in the stepper config reference?

jeremy-asher commented 1 year ago

I gave that a try as well and it seemed to be working fine with two ratios in that format.