makerbot / ReplicatorG

An open-source gcode interpreter for driving RepRaps, Makerbots, and other similar CNC beasties
http://replicat.org
GNU General Public License v2.0
405 stars 226 forks source link

Refactor Drivers & Driver Factory to allow for roll your own CNC & plotters #8

Closed tatagatha closed 14 years ago

tatagatha commented 14 years ago

The current Driver Factory is hard coded with the 3 known drivers: sanguino3g, serial pass through, and null. To use replicatorG to control your own homemade CNC or Plotter this needs to be opened up. Ideally, the XML configuration could be dropped for Spring configuration.

I also think the packet handling could be factored out of the sanguino3g code so that roll your own drivers could take advantage of the packet building code. Futhermore the packet* classes are protected, so any new driver class has to be part of the replicatorg.drivers.gen3 package. Perhaps this could change.

makerbot commented 14 years ago

The packet* classes are actually public, so they should be fairly usable.

I'm adding code to the driver factory to allow you to specify any valid class that implements Driver as a driver. Just give the full class name as the driver name:

...