1. Got a question or need help troubleshooting? Post to the troubleshooting forum or Search the forums!
  2. Please message Harry if you experience any technical difficulties while using the forum. Thank you.

Discussion: Marlin based web configuration tool

Discussion in 'Projects' started by Sean Carson, Jun 7, 2017.

  1. WheresWaldo

    WheresWaldo Moderator
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    3,447
    Likes Received:
    2,126
    @bamhm182 Good luck, even I am taking a break from all the mess that is now Marlin 1.1.3. The branch I use is always bugfix-1.1.x or whatever the current bugfix branch is. Right now it is too much to keep up with, so I have stopped or a month.
     
    bamhm182 and Geof like this.
  2. bamhm182

    bamhm182 Active Member

    Joined:
    Mar 17, 2014
    Messages:
    160
    Likes Received:
    83
    I was able to put in a pretty good amount of work this morning and got the Firmware/Version/Template selectors working. You can check it out at my Firmware Customizer. Next up, I have to populate the template files with variables and set up tables to read them and configure themselves. Should be pretty straight forward.

    @WheresWaldo, I added your firmwares. The way I'm planning on getting this to work is that I'll have the unmodified version of the firmware in firmwares/Marlin/Version, and then files in firmwares/Marlin/Version_templates will contain the variables needed to set up the firmware. With that, it would be helpful if you still had the original/unmodified version of the marlin firmware you pulled on 20170515 that I could use for the base. Do you still have that by chance? I understand I could go back through any of your firmwares and look for BH, which I am fully willing to do, but I just figured it would be a little easier if you still had it. Thank you in advance.
     
    mark tomlinson likes this.
  3. WheresWaldo

    WheresWaldo Moderator
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    3,447
    Likes Received:
    2,126
    @bamhm182 I would love to help make this easier for you but when I download the files from GITHUB, since I have no interest in adding these configurations back to the main Marlin GITHUB, nor are they interested, I just download the zip file. The problem is that the zip file has the same name no matter what day I download them, that is a function of GITHUB. I do not use GIT Desktop as I don't maintain a repository of these files nor my own fork.

    So basically I download the current files as a zip. Unzip and name the directory with the date I unzip them. Start modifying the files in that directory and then use a file compare utility to make sure I catch all the lines I need to change. Once a single version is complete I test compilation. If it compiles I zip them into the file sets you see here, then start with the next variation. When I am done, I have the self-created zip files and a modified version of the firmware on my PC. At that point there isn't a single unmodified version. There also are no previous version of the unmodified files.

    You cannot go by the date I used either, since I generally download the files the day before I upload them here. Typically files listed as May 4th may really be files from GITHUB on May 3rd and there may or may not be significant code changes on May 4th. Those of course won't be reflected in my file set.

    That is not the way a programmer would do it, but that was how I started in the very beginning and just kept doing it that way. It also is very different than the way I handle Marlin 1.0.2 that I have forked and use for the KLD-LCD1260 Resin Printer. I keep a repository of that fork and keep it updated as I would if I was the originator of the code.
     
    bamhm182 likes this.
  4. mark tomlinson

    mark tomlinson Volunteer Admin
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    15,524
    Likes Received:
    4,927
    THERE IS A DESKTOP VERSION????

    :)

    I am stuck with the command line for mine. Old fart that I am...
     
    bamhm182 likes this.
  5. WheresWaldo

    WheresWaldo Moderator
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    3,447
    Likes Received:
    2,126
  6. bamhm182

    bamhm182 Active Member

    Joined:
    Mar 17, 2014
    Messages:
    160
    Likes Received:
    83
    @WheresWaldo, it is no problem at all. Would honestly only save me a couple minutes. One of those doesn't hurt to ask, but in no way a game-changer type deals. I didn't expect you to have anything serious set up for this, just thought if your download folder looks anything like mine, the original zip might be there. As for the dates, it's completely irrelevant if it's off by a day or so IMO. If I add a version, I'll probably try to keep it accurate to the day, but the day is really just for history tracking (this version came before this one which came before this one and so on). It sounds to me like there is no real tracking of anything with Marlin, so I seriously doubt a time will arise when someone goes "You said you pulled the firmware on this date, but there were significant pushes on that date that aren't part of your firmware!" and if there are, I'll just point them to the next date down or add a new version if there isn't a newer one already.
     
    mark tomlinson likes this.
  7. bamhm182

    bamhm182 Active Member

    Joined:
    Mar 17, 2014
    Messages:
    160
    Likes Received:
    83
    I'm thinking that I'd like to have the firmware pages be created dynamically, so I'm thinking that to do that I'm going to have two separate files. One will contain the list of all the fields and will look something like this:
    Code:
    #Category            | Friendly Name              | Variable Name                   | HTML Field Type
    #----------------------------------------------------------------------------------------------------
    Printer_Setup        | Motherboard_Type           | gctMotherboard                  | number
    Printer_Setup        | Printer_Name               | gctPrinterName                  | text
    Printer_Setup        | Printer_UUID               | gctPrinterUUID                  | text
    Printer_Setup        | Number_of_Extruders        | gctExtrduerCount                | number
    Printer_Setup        | Type_of_Power_Supply       | gctPowerSupply                  | number
    
    Temperature_Control  | Thermistor_0_Type          | gctTempSensor0                  | number
    Temperature_Control  | Thermistor_1_Type          | gctTempSensor1                  | number
    Temperature_Control  | Thermistor_2_Type          | gctTempSensor2                  | number
    Temperature_Control  | Bed_Thermistor_Type        | gctTempSensorBed                | number
    The other will contain a list of the variables that are set up for each template and have a few extra fields for information. It will look something like this:
    Code:
    #Creator: bamhm182
    #Description: This is an example template file to demonstrate an idea.
    #Variable Name                   | Value
    #----------------------------------------------------------------------------------------------------
    gctMotherboard                   | 33
    gctPrinterName                   | "ROBOR1PLUSV1"
    gctPrinterUUID                   | "00000000-0000-0000-0000-000000000000"
    gctExtrduerCount                 | 1
    gctPowerSupply                   | 1
    
    gctTempSensor0                   | 1
    gctTempSensor1                   | 0
    gctTempSensor2                   | 0
    gctTempSensorBed                 | 1
    Although the two files aren't yet implemented in my website, those two files would generate the screen you currently see when you select any firmware, version, and template combination on the Firmware Customizer.

    Thoughts?

    EDIT: I'm planning on using the pipe as the delimiter because I can't think of any other time I would need to use a pipe in these files.
     
    #27 bamhm182, Jun 17, 2017
    Last edited: Jun 17, 2017
    mark tomlinson likes this.

Share This Page