Understanding GitHub - Page 1
Forum section: electronics / general

author: bostonman
author_rank: Super Contributor
timestamp: April 30, 2021, 03:49:07 am
content: I'm uncertain if GitHub is normally confusing, or if it's related to the Marlin firmware for the Anet A8 printer.Pertaining to this section:https://github.com/MarlinFirmware/MarlinThe right side shows the 'latest' version is Marlin 2.0.7.2 as of Oct. 30, 2020.If I click on 'all branches' I see 2.0.x that's dated March 24, 2021 and it's listed as default. Underneath is another file named bugfix-2.0.x dated April 28, 2021. To the right is commits ahead, commits behind.If the latest version is 2.0.7.2, then why is the date older than 2.0.x? I expected to see a list of versions with the latest being on top, however, this seems extremely confusing as to what is the latest and released (?).

author: ledtester
author_rank: Super Contributor
timestamp: April 30, 2021, 04:08:23 am
content: Quote"2.0.x" refers to a branch which is a line of development -- not a specific version. Commits are continually being added to the "2.0.x" branch. At some point in time a snapshot of the branch is given a tag -- like "2.0.7.2".You can view all of the tags by clicking on the "tags" tab in this menu:The current state of the "2.0.x" branch may not be ready for public consumption. The developers will tag a branch and make a release when they feel it is safe for others to use that version of the code.

author: bostonman
author_rank: Super Contributor
timestamp: April 30, 2021, 04:28:36 am
content: This somewhat helps as I have some experience with released versus unreleased revision control stuff.Am I correct in saying that the 'branch' list that shows 2.0.x Updated Mar 24, 2021 by ldursw under the 'all branch' tab is an unreleased version even though it's newer than the 2.0.7.2?If I understand correctly, if I didn't know any better, the ONLY way to tell that 2.0.7.2 is the most recent released version is by looking on the right side where it shows 2.0.7.2 is the latest as of Oct. 30, 2020 and under it (as of the time I'm tying this) 42 releases (which I can click on and see previous releases)?What does the commits ahead/behind mean?

author: ledtester
author_rank: Super Contributor
timestamp: April 30, 2021, 05:09:20 am
content: QuoteThis message about the "bugfix-2.0.x" branch:Quotemeans that there are 1262 commits which were applied to the "bugfix-2.0.x" branch but not the "2.0.x" branch and 207 commits applied to the "2.0.x" branch but not the "bugfix-2.0.x" branch.At some point in the past there was only one branch (probably named "2.0.x") and the "bugfix-2.0.x" was created starting at where the "2.0.x" branch was. These numbers give you stats on what has transpired since that split.

author: golden_labels
author_rank: Super Contributor
timestamp: April 30, 2021, 10:13:48 am
content: I guess the confusion comes from seeing two separate things, which GitHub mixed together: git and their own services.“Branches” refer to git and they describe organization of the repository, as used by developers. “Releases” are GH’s feature, which is nothing more than a downloadable archive of files someone has published, not necessarily directly related to the git repository itself.

author: bostonman
author_rank: Super Contributor
timestamp: April 30, 2021, 02:19:05 pm
content: But what is "commit"?Looks like a new version is out (2.0.. From this recent change, I can see that "tags" is showing me (what I believe to be) the actual released versions.I'm guessing branch will be what has branched off (in this case) 2.0., but not released?

author: golden_labels
author_rank: Super Contributor
timestamp: April 30, 2021, 03:26:26 pm
content: As written above: “release” is a GitHub-specific feature, a downloadable archive uploaded to GitHub by the maintainers of the project. Its metadata is whatever the uploader chooses and is not related, in purely technical means, to what is in the git repository. It may refer to commits and tags in the repository, but it’s uploader’s choice. git itself has no concept of releases.A commit, in version control, is a single snapshot of the complete development tree (directories and files).A tag, in git, is an arbitrary label that may be applied to a commit to make management of stuff easier.

author: newbrain
author_rank: Super Contributor
timestamp: April 30, 2021, 05:41:10 pm
content: Quote from: bostonman on April 30, 2021, 02:19:05 pmSome questions on branches, and tags have been answered inthis thread.I agree with golden_labels, mixing up GitHub (and their process/services) with git is quite common - and understandable in a way.Just remember that GitHub is not the only service based on git, Gitlab and bitbucket are examples of other offerings for similar services.I recommend to read thebookto get acquainted with git, or if you prefer a lighter approach,Oh my git!: a gamified tutorial, but using the real thing under the hood, with the option of solving the puzzles using an actual command line.

author: bostonman
author_rank: Super Contributor
timestamp: July 04, 2021, 03:58:52 pm
content: I'm uncertain whether to post my new question in this thread or start new. Since it's related to my original question, I'll begin here.Looking through the latest firmware version (https://github.com/MarlinFirmware/Marlin/releases/tag/2.0.9.1) and the same with past versions, I'm uncertain which are the actual firmware code.The reason I ask this: it's "open source" code, and some safety factors have been put into place. I'd like to review the code to see what types of protection is incorporated and how it's being protected. Since I'm not familiar with code, nor do I know what language it was created in, I'm uncertain which files do what job and which is the actual code.

author: golden_labels
author_rank: Super Contributor
timestamp: July 05, 2021, 07:16:14 am
content: Quote from: bostonman on July 04, 2021, 03:58:52 pmThe assets at the bottom.Quote from: bostonman on July 04, 2021, 03:58:52 pmA summary is in the release notes page itself. The exact list of all commits to a selected tag can be seen by using “Compare” (top-left on wide displays, top-right on narrow displays).

author: bostonman
author_rank: Super Contributor
timestamp: July 05, 2021, 01:59:26 pm
content: QuoteI saw and downloaded that before posting, however, several files are in that zip. I'm uncertain which files are actual code and which ones are other stuff.

author: golden_labels
author_rank: Super Contributor
timestamp: July 06, 2021, 01:34:35 am
content: The file contains a snapshot of the whole repository.

author: bostonman
author_rank: Super Contributor
timestamp: July 06, 2021, 02:57:05 am
content: By snapshot, do you mean all the files?I downloaded the zip, and see 2,344 files, but which file (or files) is the actual code and what is the need for all the other files?Also, is this Python?

author: sleemanj
author_rank: Super Contributor
timestamp: July 06, 2021, 03:06:30 am
content: Marlin is written inCC++You will find the code for Marlin in the Marlin/src subdirectory of the repository.

author: bostonman
author_rank: Super Contributor
timestamp: July 06, 2021, 03:17:00 am
content: Okay, thanks.I don't know C++ (just some basic C), nor do I know how to deal with the many header files.The scr directory has many sub-directories that also contain source and header files. I was hoping to see the line(s) that tells the system to turn off both the bed and extruder header should an issue occur with the thermistor.

author: sleemanj
author_rank: Super Contributor
timestamp: July 06, 2021, 03:21:58 am
content: Youa re talking about Thermal RunawayA quick grep of my Marlin installation reveals these relevant filesCode:src/gcode/host/M115.cppsrc/inc/Conditionals_adv.hsrc/inc/Conditionals_post.hsrc/inc/SanityCheck.hsrc/module/temperature.hsrc/module/temperature.cppSearch them for THERMAL_PROTECTIONParticularly in temperature.cpp

author: bostonman
author_rank: Super Contributor
timestamp: July 09, 2021, 03:02:14 am
content: Thanks for the help.Unfortunately I know such little C (and nothing of C++) that I can't follow the code.I'm limited to the first few chapters of C.

author: Siwastaja
author_rank: Super Contributor
timestamp: July 09, 2021, 01:02:58 pm
content: You can't do even a remotely serious safety assessment of the code if you don't know even the basics of the language used.Such safety analysis is a massive task, anyway. Get someonereallyexperienced to do it, and it will still take so much time and effort the cost will be in $ tens of thousands absolute minimum.Seriously, I would consider saying "no I can't" if somebody asked me to prove it safe to use. Looking for obvious unsafe aspects would be already easier.

author: bostonman
author_rank: Super Contributor
timestamp: July 09, 2021, 01:19:32 pm
content: I believe it's "safe" to use.I was more interested in knowing how the heaters are handled.If you're unaware, the printer has a hot bed (approximately 60 degrees C) and an extruder (approximately 200 degrees C). If the thermistor in either circuit opens due to a broken wire, the (original) firmware turns on the heater and you have thermal runaway until it catches fire.I was curious whether it monitors both a shorted and open thermistor, how long before it shuts down the heaters should one thermistor open, and/or any other safety protocols that are put into place.Edit: you're correct though, if I don't know the code, I'm wasting my time, however, I wanted to attempt understanding the code rather than just post a message asking people to read it for me.

author: Siwastaja
author_rank: Super Contributor
timestamp: July 09, 2021, 02:29:24 pm
content: Yes I'm aware of the original issue, the fires were such commonplace that one occurred at the university where I worked as well.I'm sure they have patched the most obvious issues but the devil is in the details and at some point, the key is not to try to make the code perfect; the cheap microcontroller itself can crash and stop executing code leaving the heater on, anyway, or a voltage transient kills the MOSFET short-circuit; instead, true redundant safety systems are needed. Which is a ridiculous omission; almost any heating system capable of producing dangerous temperatures if stuck onclassicallyuses a simple thermal fuse in series with the heater, or controlling a relay/contactor. The key is to verify this protection works reliably even if the code turns the heater full on all the time, and put most of the effort in proving that since it's orders of magnitude easier problem than proving a computer system (including HW and SW!) never does anything wrong.

author: bostonman
author_rank: Super Contributor
timestamp: July 09, 2021, 02:41:44 pm
content: You're correct, I'd like to see more hard wired safety features rather than just firmware.I've considered installing a thermal fuse, but the printer is so tight and upgrades are a pain.I also considered a box with a smoke detector, but I don't use the printer often. No matter what printer this is, I'd still never leave printing unattended. It's similar to people who let homemade pasta sauce simmer on their stove for house while they leave the house. Absolutely crazy in my opinion.Even worse: the more you know about electronics and tinker with stuff, the more you realize how easy something can fail causing catastrophic damage.

author: bostonman
author_rank: Super Contributor
timestamp: August 16, 2021, 03:42:57 am
content: I don't know if this is a Github question, a printer question, or firmware upgrade question.I've watched several YouTube videos and done lots of reading. Using Aurduino and reading online, I managed to install a bootloader (Anet 1.0 optiboot).At this stage my Anet A8 board is just showing stars on the screen; I assume because the firmware has been overwritten by the bootloader.Moving forward, I downloaded Marlin Marlin-2.0.9.1 and Configurations-2.0.8.2. According to the tutorial, I need to copy _Statusscreen, Configuration, Configuration_adv in the Configurations folder (after unzipping it) and paste it in the Marlin folder (also after upzipping it) and overwrite any of the three files that are older.Using Visual Studio Code, I installed the necessary add-ons, opened the Marlin folder, attempted to build it, and got the option to build Sanguino1284P or Sanguino1284P_optimized.First baffling thing is what is the difference (I can't find anything about this online).Second and bigger issue: the build is failing. I'm getting a Configuration.h file is an old version and needs to be upgraded or downgrade Marlin.Marlin and the Configurations file are the most recent versions on GitHub (at least from how I interpret it).I'm uncertain what I'm doing wrong or need to do as I can't find anything online.On a side note, if anyone has experience with the Anet A8, maybe this question can also be answered (if not, I'll dig deeper if possible) I'm assuming Marlin, by default, has all the normal settings for the printer with some safety upgrades. From reading, it almost seems like I'm suppose to set things like endstops. I'm a bit scared to tinker with anything because I don't understand C++ code. As for features such as enabling auto bed leveling, I assume after some deeper research, I'll know which lines to edit for enabling.

author: bostonman
author_rank: Super Contributor
timestamp: August 23, 2021, 03:18:24 am
content: I am very confused.I believe the 3D Printer topic isn't very active or nobody uses Marlin.Anyway, I've downloaded the current versions of Marlin and the Configurations, yet, when I try building, I get: configuration.h file is for an old version of marlinUnless I'm reading Github wrong, the latest versions are: Marlin-2.0.9.1 and Configurations-2.0.8.2.Should I be downloading Marlin 2.0.8.2? If so, why would someone not also create a Configurations-2.0.9.2 since that's the Marlin version?

author: sleemanj
author_rank: Super Contributor
timestamp: August 23, 2021, 05:17:34 am
content: https://github.com/MarlinFirmware/Configurations/tree/release-2.0.9.1click green code buttonClick download zip