Closed BrianGilbert closed 8 years ago
Hi @BrianGilbert
Unfortunately I don't have on of those one my desk, but you do (:
Do you feel up for playing a little coding tag team?
Adding support should be really easy:
and also in the frontend: between https://github.com/openhardwarecoza/LaserWeb/blob/master/i/main.js#L1901 and https://github.com/openhardwarecoza/LaserWeb/blob/master/i/main.js#L2163 - you should see how we crunch the serial feedback for each firmware's position and temperature data
The firmware value is then sent to the UI on websocket firstload
Once main.js receives the firmware at https://github.com/openhardwarecoza/LaserWeb/blob/master/i/main.js#L2167 you'll need to add jquery (use the examples down from line 2167 to 2228 to customise which buttons show up in the UI and which doesnt (in accordance with what this firmware supports. Feel free to add more divs/buttons as needed)
Then all over there are some if/else going on, for example https://github.com/openhardwarecoza/LaserWeb/blob/master/i/main.js#L1151 to handle slight differences between what each firmware expects (The linked example here is home commands. Reprap type firmwares want G28, Lasaurgrbl wanted ~\nG30 and Grbl wants a $H - so any case where there differences in commands that Duet specifically want you can add if/else like this
Then in the gcode writers, we do the same:
For example Smoothieware wants the Sxxx parameter between S0 and S1 (for example 50% laser power is S0.5) but LasaurGrbl wants S0-255 (So 50% power is S128)
To accomodate this, you can look at:
https://github.com/openhardwarecoza/LaserWeb/blob/master/i/svg/js/svg2gcode.js#L182
https://github.com/openhardwarecoza/LaserWeb/blob/master/i/raster/laserraster.js#L115
https://github.com/openhardwarecoza/LaserWeb/blob/master/i/millcrum/mc.js#L759
https://github.com/openhardwarecoza/LaserWeb/blob/master/i/gcode-viewer/gcode-parser.js#L372 (Why in the viewer too?, otherwise we render lines darker or lighter than they should be. If we have a gcode file for smoothie, max intensity is S1. On a scale of 0-255 it wouldnt show up so we need to constrain/map the values the viewer expects too so 100% power is a 100% opacity in three.js, and 0% power = transparent in three.js
My suggestion is fork, create a development branch and start working on it. No one is more capable of adding it than you, since you hold the key piece of hardware in hand to do rapid testing and debugging (: Once we have it working we do a pull request (: (Or I can give you push access - always happy for more contributors)
Lets keep this thread running, I'm on here maybe 5-6 times per day, and if its really urgent, tag me into a post on Google Plus https://plus.google.com/+PetervanderWalt
Sorry if the post is dumbed down - but I think I can use this going forward as a good template to post when the next person wants to add an extra firmware
Something else worth mentioning, I want to move these firmware specific gcodes our of the if/else way of doing it. See #7 - the idea is that we can set these (I need a M3 to start, and you dont. I need S0-1, and you need S0-255, and you need S0-10000, etc etc) as variables in the config of your "machine profile" - should make adding more firmware (or version differences) easier - since you can configure it from the frontend instead of having to change code in 5 different spots...
Oh, and remember once you have some code merged,you are welcome to add your paypal link / bio to https://github.com/openhardwarecoza/LaserWeb/wiki/SPONSORS - we actually let the community support the contributors! Without good contributors, there would not be a project
Closing this one. See github.com/openhardwarecoza/LaserWeb2 instead
Just wondering what would be involved in getting support for the Duet 0.8.5 board which runs on RepRapFirmware?