function3d / petalot

PET Bottle To 3D Filament
Other
550 stars 75 forks source link

Always false condition in hotend.hpp #2

Closed javiersanzsanchez closed 1 year ago

javiersanzsanchez commented 1 year ago

On strat method the condition "if (tempLastStart == 0)" will never be true do to "tempLastStart = millis();" on previous line.

Captura de pantalla 2022-10-27 a las 10 49 34

function3d commented 1 year ago

In the "stop" method there is a "tempLastStart=0" so after a manual or end filament "Stop" event, "if (tempLastStart == 0)" will be true

javiersanzsanchez commented 1 year ago

I think no... you set "tempLastStart = millis();" so it will never be zero after that, I mean the second if.

function3d commented 1 year ago

the code of the start method only needs to be executed once after a stop, the following times are redundant and have no effect

function3d commented 1 year ago

anyway, what issue is this condition causing you?

javiersanzsanchez commented 1 year ago

No, is not completed. This amateur programming practice is still present.

function3d commented 1 year ago

I'm not going to recode something that works no matter how amateurish you think it is