Qrome / printer-monitor

OctoPrint 3D Printer Monitor using Wemos D1 Mini ESP8266
MIT License
474 stars 164 forks source link

This commit adds support for Moonraker. #160

Open vKnmnn opened 2 years ago

vKnmnn commented 2 years ago

I copied the OctoPrint.cpp and .h and changed the API calls and getters and renamed all occurences of OctoPrintClient to MoonrakerClient. I then added two more API-call that were needed. (line 210 to 241) This one of them requires the filename property to be set first. As we’re then making a request to Moonraker with said filename as a parameter and that filename is just a file on a unix host, i needed to add urlencoding. This is a method of the MoonrakerClient class. (line 445++)

I also removed trailing whitespaces and fixed indentation to two spaces in the new files.

Settings.h a new comment, telling us how to enable Moonraker support.

printermonitor.ino uses the new define from settings.h to enable moonraker. I also fixed the creation of Timestamps here.

Ga1j1n commented 1 year ago

I don't suppose there are compiled binary's for the mainsail version so I can do a simple upgrade?