Commit 0a201721 authored by MagoKimbra's avatar MagoKimbra

Same Fix

parent 48e1664e
......@@ -4,6 +4,10 @@
*/
#ifndef CONDITIONALS_H
#ifndef M_PI
#define M_PI 3.1415926536
#endif
#ifndef CONFIGURATION_LCD // Get the LCD defines which are needed first
#define CONFIGURATION_LCD
......@@ -286,7 +290,7 @@
* Advance calculated values
*/
#ifdef ADVANCE
#define EXTRUSION_AREA (0.25 * D_FILAMENT * D_FILAMENT * 3.14159)
#define EXTRUSION_AREA (0.25 * D_FILAMENT * D_FILAMENT * M_PI)
#define STEPS_PER_CUBIC_MM_E (axis_steps_per_unit[E_AXIS] / EXTRUSION_AREA)
#endif
......@@ -398,8 +402,6 @@
#define HAS_TEMP_2 (defined(TEMP_2_PIN) && (TEMP_2_PIN >= 0) && TEMP_SENSOR_2)
#define HAS_TEMP_3 (defined(TEMP_3_PIN) && (TEMP_3_PIN >= 0) && TEMP_SENSOR_3)
#define HAS_TEMP_BED (defined(TEMP_BED_PIN) && (TEMP_BED_PIN >= 0) && TEMP_SENSOR_BED)
#define HAS_FILAMENT_SENSOR (defined(FILAMENT_SENSOR) && defined(FILWIDTH_PIN) && FILWIDTH_PIN >= 0)
#define HAS_POWER_CONSUMPTION_SENSOR (defined(POWER_CONSUMPTION) && defined(POWER_CONSUMPTION_PIN) && POWER_CONSUMPTION_PIN >= 0)
#define HAS_HEATER_0 (defined(HEATER_0_PIN) && HEATER_0_PIN >= 0)
#define HAS_HEATER_1 (defined(HEATER_1_PIN) && HEATER_1_PIN >= 0)
#define HAS_HEATER_2 (defined(HEATER_2_PIN) && HEATER_2_PIN >= 0)
......@@ -438,8 +440,10 @@
#endif
/**
* Shorthand for sensor test for ultralcd.cpp, dogm_lcd_implementation.h, ultralcd_implementation_hitachi_HD44780.h
* Shorthand for filament sensor and power sensor for ultralcd.cpp, dogm_lcd_implementation.h, ultralcd_implementation_hitachi_HD44780.h
*/
#define HAS_FILAMENT_SENSOR (defined(FILAMENT_SENSOR) && defined(FILWIDTH_PIN) && FILWIDTH_PIN >= 0)
#define HAS_POWER_CONSUMPTION_SENSOR (defined(POWER_CONSUMPTION) && defined(POWER_CONSUMPTION_PIN) && POWER_CONSUMPTION_PIN >= 0)
#define HAS_LCD_FILAMENT_SENSOR (HAS_FILAMENT_SENSOR && defined(FILAMENT_LCD_DISPLAY))
#define HAS_LCD_POWER_SENSOR (HAS_POWER_CONSUMPTION_SENSOR && defined(POWER_CONSUMPTION_LCD_DISPLAY))
......
......@@ -649,5 +649,12 @@ void Config_PrintSettings()
SERIAL_ECHOLNPGM("Filament settings: Disabled");
}
#endif //FWRETRACT
#if defined(POWER_CONSUMPTION) && defined(STORE_CONSUMPTION)
SERIAL_ECHO_START;
SERIAL_ECHOLNPGM("Power consumation:");
SERIAL_ECHO_START;
SERIAL_ECHOPAIR(" W/h:", power_consumption_hour);
#endif
}
#endif //!DISABLE_M503
......@@ -30,6 +30,8 @@
#define BIT(b) (1<<(b))
#define TEST(n,b) (((n)&BIT(b))!=0)
#define RADIANS(d) ((d)*M_PI/180.0)
#define DEGREES(r) ((d)*180.0/M_PI)
// Arduino < 1.0.0 does not define this, so we need to do it ourselves
#ifndef analogInputToDigitalPin
......
This diff is collapsed.
......@@ -199,11 +199,11 @@ static void lcd_implementation_init()
// digitalWrite(17, HIGH);
#ifdef LCD_SCREEN_ROT_90
u8g.setRot90(); // Rotate screen by 90°
u8g.setRot90(); // Rotate screen by 90
#elif defined(LCD_SCREEN_ROT_180)
u8g.setRot180(); // Rotate screen by 180°
u8g.setRot180(); // Rotate screen by 180
#elif defined(LCD_SCREEN_ROT_270)
u8g.setRot270(); // Rotate screen by 270°
u8g.setRot270(); // Rotate screen by 270
#endif
// Show splashscreen
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment