1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-27 13:56:24 +00:00

Fixes somes compiler warnings

This commit is contained in:
João Brázio 2016-06-23 02:22:17 +01:00
parent f30df89ee1
commit 664232140d
No known key found for this signature in database
GPG Key ID: F62CFD37DFFDB540
5 changed files with 12 additions and 8 deletions

View File

@ -474,6 +474,9 @@ static void lcd_implementation_mark_as_selected(uint8_t row, bool isSelected) {
} }
static void lcd_implementation_drawmenu_generic(bool isSelected, uint8_t row, const char* pstr, char pre_char, char post_char) { static void lcd_implementation_drawmenu_generic(bool isSelected, uint8_t row, const char* pstr, char pre_char, char post_char) {
UNUSED(pstr);
UNUSED(pre_char);
char c; char c;
uint8_t n = LCD_WIDTH - 2; uint8_t n = LCD_WIDTH - 2;
@ -564,6 +567,7 @@ void lcd_implementation_drawedit(const char* pstr, const char* value=NULL) {
#if ENABLED(SDSUPPORT) #if ENABLED(SDSUPPORT)
static void _drawmenu_sd(bool isSelected, uint8_t row, const char* pstr, const char* filename, char* const longFilename, bool isDir) { static void _drawmenu_sd(bool isSelected, uint8_t row, const char* pstr, const char* filename, char* const longFilename, bool isDir) {
UNUSED(pstr);
char c; char c;
uint8_t n = LCD_WIDTH - 1; uint8_t n = LCD_WIDTH - 1;

View File

@ -386,7 +386,7 @@ void Planner::recalculate() {
#endif //AUTOTEMP #endif //AUTOTEMP
/** /**
* Maintain fans, paste extruder pressure, * Maintain fans, paste extruder pressure,
*/ */
void Planner::check_axes_activity() { void Planner::check_axes_activity() {
unsigned char axis_active[NUM_AXIS] = { 0 }, unsigned char axis_active[NUM_AXIS] = { 0 },
@ -539,7 +539,7 @@ void Planner::check_axes_activity() {
while (block_buffer_tail == next_buffer_head) idle(); while (block_buffer_tail == next_buffer_head) idle();
#if ENABLED(MESH_BED_LEVELING) #if ENABLED(MESH_BED_LEVELING)
if (mbl.active()) if (mbl.active())
z += mbl.get_z(x - home_offset[X_AXIS], y - home_offset[Y_AXIS]); z += mbl.get_z(x - home_offset[X_AXIS], y - home_offset[Y_AXIS]);
#elif ENABLED(AUTO_BED_LEVELING_FEATURE) #elif ENABLED(AUTO_BED_LEVELING_FEATURE)
apply_rotation_xyz(bed_level_matrix, x, y, z); apply_rotation_xyz(bed_level_matrix, x, y, z);
@ -1057,7 +1057,7 @@ void Planner::check_axes_activity() {
// This leads to an enormous number of advance steps due to a huge e_acceleration. // This leads to an enormous number of advance steps due to a huge e_acceleration.
// The math is correct, but you don't want a retract move done with advance! // The math is correct, but you don't want a retract move done with advance!
// So this situation is filtered out here. // So this situation is filtered out here.
if (!bse || (!bsx && !bsy && !bsz) || stepper.get_advance_k() == 0 || bse == allsteps) { if (!bse || (!bsx && !bsy && !bsz) || stepper.get_advance_k() == 0 || (uint32_t) bse == allsteps) {
block->use_advance_lead = false; block->use_advance_lead = false;
} }
else { else {

View File

@ -380,7 +380,7 @@ void Stepper::isr() {
} }
#endif // ADVANCE or LIN_ADVANCE #endif // ADVANCE or LIN_ADVANCE
#define _COUNTER(AXIS) counter_## AXIS #define _COUNTER(AXIS) counter_## AXIS
#define _APPLY_STEP(AXIS) AXIS ##_APPLY_STEP #define _APPLY_STEP(AXIS) AXIS ##_APPLY_STEP
#define _INVERT_STEP_PIN(AXIS) INVERT_## AXIS ##_STEP_PIN #define _INVERT_STEP_PIN(AXIS) INVERT_## AXIS ##_STEP_PIN
@ -468,7 +468,7 @@ void Stepper::isr() {
timer = calc_timer(step_rate); timer = calc_timer(step_rate);
OCR1A = timer; OCR1A = timer;
deceleration_time += timer; deceleration_time += timer;
#if ENABLED(LIN_ADVANCE) #if ENABLED(LIN_ADVANCE)
if (current_block->use_advance_lead) if (current_block->use_advance_lead)
@ -998,7 +998,7 @@ void Stepper::digipot_init() {
SPI.begin(); SPI.begin();
pinMode(DIGIPOTSS_PIN, OUTPUT); pinMode(DIGIPOTSS_PIN, OUTPUT);
for (int i = 0; i < COUNT(digipot_motor_current); i++) { for (uint8_t i = 0; i < COUNT(digipot_motor_current); i++) {
//digitalPotWrite(digipot_ch[i], digipot_motor_current[i]); //digitalPotWrite(digipot_ch[i], digipot_motor_current[i]);
digipot_current(i, digipot_motor_current[i]); digipot_current(i, digipot_motor_current[i]);
} }

View File

@ -462,7 +462,7 @@ int Temperature::getHeaterPower(int heater) {
EXTRUDER_3_AUTO_FAN_PIN == EXTRUDER_2_AUTO_FAN_PIN ? 2 : 3 EXTRUDER_3_AUTO_FAN_PIN == EXTRUDER_2_AUTO_FAN_PIN ? 2 : 3
}; };
uint8_t fanState = 0; uint8_t fanState = 0;
for (int f = 0; f <= HOTENDS; f++) { for (int f = 0; f < HOTENDS; f++) {
if (current_temperature[f] > EXTRUDER_AUTO_FAN_TEMPERATURE) if (current_temperature[f] > EXTRUDER_AUTO_FAN_TEMPERATURE)
SBI(fanState, fanBit[f]); SBI(fanState, fanBit[f]);
} }

View File

@ -135,7 +135,7 @@ u8g_dev_t u8g_dev_st7920_128x64_rrd_sw_spi = {u8g_dev_rrd_st7920_128x64_fn, &u8g
class U8GLIB_ST7920_128X64_RRD : public U8GLIB { class U8GLIB_ST7920_128X64_RRD : public U8GLIB {
public: public:
U8GLIB_ST7920_128X64_RRD(uint8_t dummy) : U8GLIB(&u8g_dev_st7920_128x64_rrd_sw_spi) {} U8GLIB_ST7920_128X64_RRD(uint8_t dummy) : U8GLIB(&u8g_dev_st7920_128x64_rrd_sw_spi) { UNUSED(dummy); }
}; };