Doodle3D / doodle3d-firmware

The API of the Doodle3D WiFi box. This can for example talk to print3d, save settings, update the firmware etc.
www.doodle3d.com
GNU General Public License v2.0
13 stars 9 forks source link

Replace start- and endcode variables in API #18

Closed peteruithoven closed 10 years ago

peteruithoven commented 10 years ago

The api printer/stop sends the endcode to for example home the printer and make it return to preheat temperature. Because the endcode can contain variables like {preheatTemperature} it needs to be processed, like also happens when generating the gcode for a print on the client side. Now this code is duplicated in the api. I think we do all the variable replacement in the API, this also takes away this responsibility for anyone who wants to use the API without the Doodle3D webinterface.

To support multiple printers the right endcode needs to be selected, according to the selected printer type. This would also need to be duplicated.

peteruithoven commented 10 years ago

No, to prevent duplicating the firmware type check code I think i'm going to move it all to the client side and send the processed endcode with the stop api request.

peteruithoven commented 10 years ago

Done, we now send the endcode with the API:printer/stop request.