vintagepc / MK404

A functional Simulator for Prusa (Mini/Einsy) Rambo based printers
https://vintagepc.github.io/MK404/
GNU General Public License v3.0
69 stars 9 forks source link

Implement commandline option to enable/disable softPWM #345 #346

Closed GilesBathgate closed 2 years ago

GilesBathgate commented 2 years ago

Description

When testing 3.10.x firmware on MK2 simulated hardware, I'd like the option to enable software PWM.

Behaviour/ Breaking changes

Adds the ability to use SoftPWM with the MK2 simulation. e.g

./MK404 Prusa_MK2_mR13 --softPWM enabled -f ...

If not specified, and for other printer types, this will default to how its set to currently.

Have you tested the changes?

Works with the patched MK2 firmware, that relies on SoftPWM.

Other

Only implemented for MK2, but if for example, someone wants to disable SoftPWM for MK3 this could be added.

Linked issues:

345

codecov[bot] commented 2 years ago

Codecov Report

Merging #346 (f9b9065) into master (5bc62ae) will decrease coverage by 0.06%. The diff coverage is 71.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #346      +/-   ##
==========================================
- Coverage   91.15%   91.09%   -0.07%     
==========================================
  Files         166      167       +1     
  Lines        7692     7713      +21     
==========================================
+ Hits         7012     7026      +14     
- Misses        680      687       +7     
Impacted Files Coverage Δ
parts/printers/Prusa_MK2_13.cpp 94.73% <33.33%> (-3.87%) :arrow_down:
MK404.cpp 86.53% <100.00%> (+0.21%) :arrow_up:
utility/Config.h 100.00% <100.00%> (ø)
utility/EnabledType.h 100.00% <100.00%> (ø)
parts/components/uart_pty.cpp 80.50% <0.00%> (-0.63%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 5bc62ae...f9b9065. Read the comment docs.