Skip to content

Commit

Permalink
Merge pull request MarlinFirmware#1735 from AnHardt/compilerCandy
Browse files Browse the repository at this point in the history
Remove some further warnings
  • Loading branch information
thinkyhead committed Mar 30, 2015
2 parents 85b67e5 + 7b2550a commit b47fa8c
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 23 deletions.
5 changes: 1 addition & 4 deletions Marlin/dogm_lcd_implementation.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,6 @@ static void _draw_heater_status(int x, int heater) {
}

static void lcd_implementation_status_screen() {

static unsigned char fan_rot = 0;

u8g.setColorIndex(1); // black on white

// Symbols menu graphics, animated fan
Expand Down Expand Up @@ -485,7 +482,7 @@ static void _drawmenu_sd(bool isSelected, uint8_t row, const char* pstr, const c
lcd_implementation_mark_as_selected(row, isSelected);

if (isDir) lcd_print(LCD_STR_FOLDER[0]);
while (c = *filename) {
while ((c = *filename)) {
n -= lcd_print(c);
filename++;
}
Expand Down
8 changes: 6 additions & 2 deletions Marlin/stepper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ ISR(TIMER1_COMPA_vect) {
#ifdef COREXY
// Head direction in -X axis for CoreXY bots.
// If DeltaX == -DeltaY, the movement is only in Y axis
if (current_block->steps[A_AXIS] != current_block->steps[B_AXIS] || (TEST(out_bits, A_AXIS) == TEST(out_bits, B_AXIS)))
if ((current_block->steps[A_AXIS] != current_block->steps[B_AXIS]) || (TEST(out_bits, A_AXIS) == TEST(out_bits, B_AXIS))) {
if (TEST(out_bits, X_HEAD))
#else
if (TEST(out_bits, X_AXIS)) // stepping along -X axis (regular cartesians bot)
Expand Down Expand Up @@ -487,9 +487,10 @@ ISR(TIMER1_COMPA_vect) {
}
}
#ifdef COREXY
}
// Head direction in -Y axis for CoreXY bots.
// If DeltaX == DeltaY, the movement is only in X axis
if (current_block->steps[A_AXIS] != current_block->steps[B_AXIS] || (TEST(out_bits, A_AXIS) != TEST(out_bits, B_AXIS)))
if ((current_block->steps[A_AXIS] != current_block->steps[B_AXIS]) || (TEST(out_bits, A_AXIS) != TEST(out_bits, B_AXIS))) {
if (TEST(out_bits, Y_HEAD))
#else
if (TEST(out_bits, Y_AXIS)) // -direction
Expand All @@ -504,6 +505,9 @@ ISR(TIMER1_COMPA_vect) {
UPDATE_ENDSTOP(y, Y, max, MAX);
#endif
}
#ifdef COREXY
}
#endif
}

if (TEST(out_bits, Z_AXIS)) { // -direction
Expand Down
15 changes: 13 additions & 2 deletions Marlin/temperature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,17 @@ unsigned char soft_pwm_bed;
#ifdef FILAMENT_SENSOR
int current_raw_filwidth = 0; //Holds measured filament diameter - one extruder only
#endif
#if defined (THERMAL_RUNAWAY_PROTECTION_PERIOD) && THERMAL_RUNAWAY_PROTECTION_PERIOD > 0
void thermal_runaway_protection(int *state, unsigned long *timer, float temperature, float target_temperature, int heater_id, int period_seconds, int hysteresis_degc);
static int thermal_runaway_state_machine[4]; // = {0,0,0,0};
static unsigned long thermal_runaway_timer[4]; // = {0,0,0,0};
static bool thermal_runaway = false;
#if TEMP_SENSOR_BED != 0
static int thermal_runaway_bed_state_machine;
static unsigned long thermal_runaway_bed_timer;
#endif
#endif

//===========================================================================
//=============================private variables============================
//===========================================================================
Expand Down Expand Up @@ -1100,8 +1111,8 @@ void disable_heater() {
}

#ifdef HEATER_0_USES_MAX6675
#define MAX6675_HEAT_INTERVAL 250
long max6675_previous_millis = MAX6675_HEAT_INTERVAL;
#define MAX6675_HEAT_INTERVAL 250u
unsigned long max6675_previous_millis = MAX6675_HEAT_INTERVAL;
int max6675_temp = 2000;

static int read_max6675() {
Expand Down
18 changes: 4 additions & 14 deletions Marlin/temperature.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,16 +146,10 @@ void disable_heater();
void setWatch();
void updatePID();

#if defined (THERMAL_RUNAWAY_PROTECTION_PERIOD) && THERMAL_RUNAWAY_PROTECTION_PERIOD > 0
void thermal_runaway_protection(int *state, unsigned long *timer, float temperature, float target_temperature, int heater_id, int period_seconds, int hysteresis_degc);
static int thermal_runaway_state_machine[4]; // = {0,0,0,0};
static unsigned long thermal_runaway_timer[4]; // = {0,0,0,0};
static bool thermal_runaway = false;
#if TEMP_SENSOR_BED != 0
static int thermal_runaway_bed_state_machine;
static unsigned long thermal_runaway_bed_timer;
#endif
#endif
void PID_autotune(float temp, int extruder, int ncycles);

void setExtruderAutoFanState(int pin, bool state);
void checkExtruderAutoFans();

FORCE_INLINE void autotempShutdown() {
#ifdef AUTOTEMP
Expand All @@ -167,9 +161,5 @@ FORCE_INLINE void autotempShutdown() {
#endif
}

void PID_autotune(float temp, int extruder, int ncycles);

void setExtruderAutoFanState(int pin, bool state);
void checkExtruderAutoFans();

#endif
2 changes: 1 addition & 1 deletion Marlin/ultralcd_st7920_u8glib_rrd.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ static void ST7920_SWSPI_SND_8BIT(uint8_t val)
#define ST7920_NCS() {WRITE(ST7920_CS_PIN,0);}
#define ST7920_SET_CMD() {ST7920_SWSPI_SND_8BIT(0xf8);u8g_10MicroDelay();}
#define ST7920_SET_DAT() {ST7920_SWSPI_SND_8BIT(0xfa);u8g_10MicroDelay();}
#define ST7920_WRITE_BYTE(a) {ST7920_SWSPI_SND_8BIT((a)&0xf0);ST7920_SWSPI_SND_8BIT((a)<<4);u8g_10MicroDelay();}
#define ST7920_WRITE_BYTE(a) {ST7920_SWSPI_SND_8BIT((uint8_t)((a)&0xf0u));ST7920_SWSPI_SND_8BIT((uint8_t)((a)<<4u));u8g_10MicroDelay();}
#define ST7920_WRITE_BYTES(p,l) {uint8_t i;for(i=0;i<l;i++){ST7920_SWSPI_SND_8BIT(*p&0xf0);ST7920_SWSPI_SND_8BIT(*p<<4);p++;}u8g_10MicroDelay();}

uint8_t u8g_dev_rrd_st7920_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void *arg)
Expand Down

0 comments on commit b47fa8c

Please sign in to comment.