derekenos / iome

A Physical Platform for Web Appplication Development
https://derekenos.com/project-iome
GNU General Public License v3.0
8 stars 1 forks source link

Restore last known coordinate on power up #6

Open derekenos opened 4 years ago

derekenos commented 4 years ago

Currently when Sketchy powers up, it resets its internal x_pos and y_pos variables to 0 without regard for where the plotter mechanism is actually positioned.

In order for Sketchy to know where it was last positioned on power up, each time move_to_point(), maybe step()?, is called, you should write the indicated coordinate as the string <x>,<y> to a file called /data/last_position and set x_pos and y_pos based on the value of this file on power up.