-
Understanding GitHub
Posted by
bostonman
on 30 Apr, 2021 03:49
-
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 (?).
-
#1 Reply
Posted by
ledtester
on 30 Apr, 2021 04:08
-
If the latest version is 2.0.7.2, then why is the date older than 2.0.x?
"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.
-
#2 Reply
Posted by
bostonman
on 30 Apr, 2021 04:28
-
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?
-
#3 Reply
Posted by
ledtester
on 30 Apr, 2021 05:09
-
What does the commits ahead/behind mean?
This message about the "bugfix-2.0.x" branch:
This branch is 1262 commits ahead, 207 commits behind 2.0.x.
means 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.
-
-
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.
-
#5 Reply
Posted by
bostonman
on 30 Apr, 2021 14:19
-
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?
-
-
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.
-
#7 Reply
Posted by
newbrain
on 30 Apr, 2021 17:41
-
But what is "commit"?
Some questions on branches, and tags have been answered in
this 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 the
book to 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.
-
#8 Reply
Posted by
bostonman
on 04 Jul, 2021 15:58
-
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.
-
-
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 assets at the bottom.
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.
A 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).
-
#10 Reply
Posted by
bostonman
on 05 Jul, 2021 13:59
-
The assets at the bottom.
I 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.
-
-
The file contains a snapshot of the whole repository.
-
#12 Reply
Posted by
bostonman
on 06 Jul, 2021 02:57
-
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?
-
#13 Reply
Posted by
sleemanj
on 06 Jul, 2021 03:06
-
Marlin is written in C C++
You will find the code for Marlin in the Marlin/src subdirectory of the repository.
-
#14 Reply
Posted by
bostonman
on 06 Jul, 2021 03:17
-
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.
-
#15 Reply
Posted by
sleemanj
on 06 Jul, 2021 03:21
-
Youa re talking about Thermal Runaway
A quick grep of my Marlin installation reveals these relevant files
src/gcode/host/M115.cpp
src/inc/Conditionals_adv.h
src/inc/Conditionals_post.h
src/inc/SanityCheck.h
src/module/temperature.h
src/module/temperature.cpp
Search them for THERMAL_PROTECTION
Particularly in temperature.cpp
-
#16 Reply
Posted by
bostonman
on 09 Jul, 2021 03:02
-
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.
-
#17 Reply
Posted by
Siwastaja
on 09 Jul, 2021 13:02
-
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 someone really experienced 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.
-
#18 Reply
Posted by
bostonman
on 09 Jul, 2021 13:19
-
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.
-
#19 Reply
Posted by
Siwastaja
on 09 Jul, 2021 14:29
-
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 on classically uses 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.
-
#20 Reply
Posted by
bostonman
on 09 Jul, 2021 14:41
-
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.
-
#21 Reply
Posted by
bostonman
on 16 Aug, 2021 03:42
-
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.
-
#22 Reply
Posted by
bostonman
on 23 Aug, 2021 03:18
-
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 marlin
Unless 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?
-
#23 Reply
Posted by
sleemanj
on 23 Aug, 2021 05:17
-