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.
[ ] regularly, but not frequently save positions if they changed
OR
[x] add interface to save positions manually. Warn users about impact.
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.
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.