MaslowCNC / Firmware

Maslow Firmware
GNU General Public License v3.0
263 stars 134 forks source link

Move directWrite outside the loop #498

Closed esspe2 closed 5 years ago

esspe2 commented 5 years ago

No need to repeat 1000 times the same actions, it seems sufficient to do the directWrite only once before the loop instead.

MaslowCommunityGardenRobot commented 5 years ago

Congratulations on the pull request @esspe2

Now we need to decide as a community if we want to integrate these changes. You should vote by giving this comment a thumbs up or a thumbs down. Votes are counted in 48 hours. Ties will not be merged.

I'm just a robot, but I love to see people contributing so I'm going vote thumbs up (but my vote won't count...)!

blurfl commented 5 years ago

Glad to see you combing through the code @esspe2! Keep up the good work! 💯👍

esspe2 commented 5 years ago

Thanks for your good words!

The call chain to the eeprom write is more like this:

 maslowDelay() 
 -> execSystemRealtime() 
 -> systemSaveAxesPosition() 
 -> settingsSaveStepstoEEprom() 
 -> EEPROM.put(310, sysSteps)

so this change doesn't really improve the eeprom issue, but I still feel it useful.

MaslowCommunityGardenRobot commented 5 years ago

Time is up and we're ready to merge this pull request. Great work!