Lichtwerkstatt / XRTL_Hardware

Hardware Repository for XRTL Remote Lab
GNU Affero General Public License v3.0
1 stars 0 forks source link

Recover stepper positions after restart #19

Open doomke opened 1 year ago

doomke commented 1 year ago

Right now the position of the stepper motors is only written to flash memory after setup, which means changes to the position made during operation are lost if the power is cut or a restart happens.

However, writing the position to flash for every movement is probably not a good idea as it would wear out the flash memory rather quickly. We need to find a solution that ensures the position is saved at least every now and then or when instructed, without negatively impacting the life span of our microcontrollers.

doomke commented 1 year ago

stepper motors now react on a "manualSave":true command, writing their current position to the flash. This command can in theory be extended to other modules like servo, macro and output.