-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
5,135 additions
and
594 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
<!-- | ||
## [Unreleased] | ||
### Added | ||
### Removed | ||
- tbd | ||
- something from [@someone](https://github.com/someone). | ||
--> | ||
|
||
## [0.5.0] - 2022-11-27 | ||
|
||
### Added | ||
|
||
- Added [PID Tuner](https://pidtuner.com) output | ||
- Added average temperatures for more stable temperature display/handling | ||
- Added "Max. Temp" setting (which is required for PID Tuner steps) | ||
- Added Changelog | ||
|
||
### Changed | ||
|
||
- Enlarged PID constant length from 3 to 4 int digits | ||
- Improved some internal var names | ||
- Optimized Thermocouple class and implemented average temperature | ||
- Moved profile handling into a separate class | ||
- Resturctured handling of objects via globals (instead of space wasting pointer/reference parameter) | ||
- Changed initial PID-Tuner wait time and saved some resources | ||
|
||
### Fixed | ||
|
||
- Fixed possibliy wrong PID derivate calculation as discussed [here](https://github.com/r-downing/AutoPID/issues/4) | ||
|
||
|
||
## [0.4.0] - 2022-11-08 | ||
|
||
### Added | ||
|
||
- "Manual" or (open-end) "Reflow-Profile" Mode | ||
- Reflow profiles for (low temp.) "Sn42/Bi57.6/Ag0.4" as well as (high temp.) "Sn96.5/Ag3.0/Cu0" | ||
|
||
### Changed | ||
|
||
- Moved most code into separate classes for higher flexibility and safer var/pointers | ||
- Stripped down fonts, to get some more flash space | ||
|
||
## 0.3.0 - 2022-10-26 | ||
|
||
### Added | ||
|
||
- Built-in Setup | ||
- Adjustabled PID constants | ||
- BangON and BangOFF values | ||
- Config storage into EEPROM | ||
|
||
[unreleased]: https://github.com/Apehaenger/Another-HotPlate-Firmware/compare/v0.5.0...develop | ||
[0.5.0]: https://github.com/Apehaenger/Another-HotPlate-Firmware/compare/v0.4.0...v0.5.0 | ||
[0.4.0]: https://github.com/Apehaenger/Another-HotPlate-Firmware/releases/v0.4.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Internal C/C++ remarks | ||
|
||
## When to pass by value, by pointer or by reference | ||
|
||
http://www.cplusplus.com/articles/z6vU7k9E/ says: | ||
|
||
1. Pass by value when the function does not want to modify the parameter and the value is easy to copy (ints, doubles, char, bool, etc... simple types. std::string, std::vector, and all other STL containers are NOT simple types.) | ||
|
||
2. Pass by const pointer when the value is expensive to copy AND the function does not want to modify the value pointed to AND NULL is a valid, expected value that the function handles. | ||
|
||
3. Pass by non-const pointer when the value is expensive to copy AND the function wants to modify the value pointed to AND NULL is a valid, expected value that the function handles. | ||
|
||
4. Pass by const reference when the value is expensive to copy AND the function does not want to modify the value referred to AND NULL would not be a valid value if a pointer was used instead. | ||
|
||
5. Pass by non-cont reference when the value is expensive to copy AND the function wants to modify the value referred to AND NULL would not be a valid value if a pointer was used instead. | ||
|
||
6. When writing template functions, there isn't a clear-cut answer because there are a few tradeoffs to consider that are beyond the scope of this discussion, but suffice it to say that most template functions take their parameters by value or (const) reference, however because iterator syntax is similar to that of pointers (asterisk to "dereference"), any template function that expects iterators as arguments will also by default accept pointers as well (and not check for NULL since the NULL iterator concept has a different syntax). | ||
|
||
Whereas https://www.geeksforgeeks.org/passing-by-pointer-vs-passing-by-reference-in-c/ states: | ||
|
||
- References are usually preferred over pointers whenever we don’t need “reseating”. | ||
- Overall, Use references when you can, and pointers when you have to. But if we want to write C code that compiles with both C and a C++ compiler, you’ll have to restrict yourself to using pointers. | ||
|
||
Also: Allen Holub's "Enough Rope to Shoot Yourself in the Foot" lists the following 2 rules: | ||
``` | ||
120. Reference arguments should always be `const` | ||
121. Never use references as outputs, use pointers | ||
``` |
Oops, something went wrong.