Merge pull request #2004 from mkbel/save_flash

Document
This commit is contained in:
DRracer 2019-07-16 08:41:19 +02:00 committed by GitHub
commit 2d47bf06c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -122,6 +122,7 @@ inline void babystepsTodoZsubtract(int n)
//inline so that there is no performance decrease.
//deg=degreeCelsius
// Doesn't save FLASH when FORCE_INLINE removed.
FORCE_INLINE float degHotend(uint8_t extruder) {
return current_temperature[extruder];
};
@ -140,6 +141,7 @@ FORCE_INLINE float degBed() {
return current_temperature_bed;
};
// Doesn't save FLASH when FORCE_INLINE removed.
FORCE_INLINE float degTargetHotend(uint8_t extruder) {
return target_temperature[extruder];
};
@ -148,11 +150,13 @@ FORCE_INLINE float degTargetBed() {
return target_temperature_bed;
};
// Doesn't save FLASH when FORCE_INLINE removed.
FORCE_INLINE void setTargetHotend(const float &celsius, uint8_t extruder) {
target_temperature[extruder] = celsius;
resetPID(extruder);
};
// Doesn't save FLASH when not inlined.
static inline void setTargetHotendSafe(const float &celsius, uint8_t extruder)
{
if (extruder<EXTRUDERS) {
@ -161,6 +165,7 @@ static inline void setTargetHotendSafe(const float &celsius, uint8_t extruder)
}
}
// Doesn't save FLASH when not inlined.
static inline void setAllTargetHotends(const float &celsius)
{
for(int i=0;i<EXTRUDERS;i++) setTargetHotend(celsius,i);