Browse Source

Drop FORCE_INLINE from temperature.h

`FORCE_INLINE` seems to have no effect on code generation with standard
optimization.
pull/1/head
Scott Lahteine 8 years ago
parent
commit
85512e9372
  1. 32
      Marlin/temperature.h

32
Marlin/temperature.h

@ -112,9 +112,9 @@ class Temperature {
#if ENABLED(PREVENT_DANGEROUS_EXTRUDE) #if ENABLED(PREVENT_DANGEROUS_EXTRUDE)
static float extrude_min_temp; static float extrude_min_temp;
static FORCE_INLINE bool tooColdToExtrude(uint8_t e) { return degHotend(e) < extrude_min_temp; } static bool tooColdToExtrude(uint8_t e) { return degHotend(e) < extrude_min_temp; }
#else #else
static FORCE_INLINE bool tooColdToExtrude(uint8_t e) { UNUSED(e); return false; } static bool tooColdToExtrude(uint8_t e) { UNUSED(e); return false; }
#endif #endif
private: private:
@ -230,16 +230,16 @@ class Temperature {
//inline so that there is no performance decrease. //inline so that there is no performance decrease.
//deg=degreeCelsius //deg=degreeCelsius
static FORCE_INLINE float degHotend(uint8_t extruder) { return current_temperature[extruder]; } static float degHotend(uint8_t extruder) { return current_temperature[extruder]; }
static FORCE_INLINE float degBed() { return current_temperature_bed; } static float degBed() { return current_temperature_bed; }
#if ENABLED(SHOW_TEMP_ADC_VALUES) #if ENABLED(SHOW_TEMP_ADC_VALUES)
static FORCE_INLINE float rawHotendTemp(uint8_t extruder) { return current_temperature_raw[extruder]; } static float rawHotendTemp(uint8_t extruder) { return current_temperature_raw[extruder]; }
static FORCE_INLINE float rawBedTemp() { return current_temperature_bed_raw; } static float rawBedTemp() { return current_temperature_bed_raw; }
#endif #endif
static FORCE_INLINE float degTargetHotend(uint8_t extruder) { return target_temperature[extruder]; } static float degTargetHotend(uint8_t extruder) { return target_temperature[extruder]; }
static FORCE_INLINE float degTargetBed() { return target_temperature_bed; } static float degTargetBed() { return target_temperature_bed; }
#if ENABLED(THERMAL_PROTECTION_HOTENDS) && WATCH_TEMP_PERIOD > 0 #if ENABLED(THERMAL_PROTECTION_HOTENDS) && WATCH_TEMP_PERIOD > 0
static void start_watching_heater(int e = 0); static void start_watching_heater(int e = 0);
@ -249,25 +249,25 @@ class Temperature {
static void start_watching_bed(); static void start_watching_bed();
#endif #endif
static FORCE_INLINE void setTargetHotend(const float& celsius, uint8_t extruder) { static void setTargetHotend(const float& celsius, uint8_t extruder) {
target_temperature[extruder] = celsius; target_temperature[extruder] = celsius;
#if ENABLED(THERMAL_PROTECTION_HOTENDS) && WATCH_TEMP_PERIOD > 0 #if ENABLED(THERMAL_PROTECTION_HOTENDS) && WATCH_TEMP_PERIOD > 0
start_watching_heater(extruder); start_watching_heater(extruder);
#endif #endif
} }
static FORCE_INLINE void setTargetBed(const float& celsius) { static void setTargetBed(const float& celsius) {
target_temperature_bed = celsius; target_temperature_bed = celsius;
#if ENABLED(THERMAL_PROTECTION_BED) && WATCH_BED_TEMP_PERIOD > 0 #if ENABLED(THERMAL_PROTECTION_BED) && WATCH_BED_TEMP_PERIOD > 0
start_watching_bed(); start_watching_bed();
#endif #endif
} }
static FORCE_INLINE bool isHeatingHotend(uint8_t extruder) { return target_temperature[extruder] > current_temperature[extruder]; } static bool isHeatingHotend(uint8_t extruder) { return target_temperature[extruder] > current_temperature[extruder]; }
static FORCE_INLINE bool isHeatingBed() { return target_temperature_bed > current_temperature_bed; } static bool isHeatingBed() { return target_temperature_bed > current_temperature_bed; }
static FORCE_INLINE bool isCoolingHotend(uint8_t extruder) { return target_temperature[extruder] < current_temperature[extruder]; } static bool isCoolingHotend(uint8_t extruder) { return target_temperature[extruder] < current_temperature[extruder]; }
static FORCE_INLINE bool isCoolingBed() { return target_temperature_bed < current_temperature_bed; } static bool isCoolingBed() { return target_temperature_bed < current_temperature_bed; }
/** /**
* The software PWM power for a heater * The software PWM power for a heater
@ -291,7 +291,7 @@ class Temperature {
*/ */
static void updatePID(); static void updatePID();
static FORCE_INLINE void autotempShutdown() { static void autotempShutdown() {
#if ENABLED(AUTOTEMP) #if ENABLED(AUTOTEMP)
if (planner.autotemp_enabled) { if (planner.autotemp_enabled) {
planner.autotemp_enabled = false; planner.autotemp_enabled = false;
@ -303,7 +303,7 @@ class Temperature {
#if ENABLED(BABYSTEPPING) #if ENABLED(BABYSTEPPING)
static FORCE_INLINE void babystep_axis(AxisEnum axis, int distance) { static void babystep_axis(AxisEnum axis, int distance) {
#if ENABLED(COREXY) || ENABLED(COREXZ) || ENABLED(COREYZ) #if ENABLED(COREXY) || ENABLED(COREXZ) || ENABLED(COREYZ)
#if ENABLED(BABYSTEP_XY) #if ENABLED(BABYSTEP_XY)
switch (axis) { switch (axis) {

Loading…
Cancel
Save