Remove 'unused-parameter' and 'empty-body' warinings
This commit is contained in:
parent
32ee171a49
commit
7bd9655fd4
|
|
@ -3,7 +3,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include "Arduino.h"
|
#include "Marlin.h"
|
||||||
|
|
||||||
// When the display powers up, it is configured as follows:
|
// When the display powers up, it is configured as follows:
|
||||||
//
|
//
|
||||||
|
|
@ -83,6 +83,8 @@ void LiquidCrystal::init(uint8_t fourbitmode, uint8_t rs, uint8_t rw, uint8_t en
|
||||||
}
|
}
|
||||||
|
|
||||||
void LiquidCrystal::begin(uint8_t cols, uint8_t lines, uint8_t dotsize) {
|
void LiquidCrystal::begin(uint8_t cols, uint8_t lines, uint8_t dotsize) {
|
||||||
|
UNUSED(cols);
|
||||||
|
|
||||||
if (lines > 1) {
|
if (lines > 1) {
|
||||||
_displayfunction |= LCD_2LINE;
|
_displayfunction |= LCD_2LINE;
|
||||||
}
|
}
|
||||||
|
|
@ -161,6 +163,8 @@ void LiquidCrystal::begin(uint8_t cols, uint8_t lines, uint8_t dotsize) {
|
||||||
|
|
||||||
|
|
||||||
void LiquidCrystal::begin_noclear(uint8_t cols, uint8_t lines, uint8_t dotsize) {
|
void LiquidCrystal::begin_noclear(uint8_t cols, uint8_t lines, uint8_t dotsize) {
|
||||||
|
UNUSED(cols);
|
||||||
|
|
||||||
if (lines > 1) {
|
if (lines > 1) {
|
||||||
_displayfunction |= LCD_2LINE;
|
_displayfunction |= LCD_2LINE;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -122,8 +122,8 @@ void manage_inactivity(bool ignore_stepper_queue=false);
|
||||||
#define enable_x() WRITE(X_ENABLE_PIN, X_ENABLE_ON)
|
#define enable_x() WRITE(X_ENABLE_PIN, X_ENABLE_ON)
|
||||||
#define disable_x() { WRITE(X_ENABLE_PIN,!X_ENABLE_ON); axis_known_position[X_AXIS] = false; }
|
#define disable_x() { WRITE(X_ENABLE_PIN,!X_ENABLE_ON); axis_known_position[X_AXIS] = false; }
|
||||||
#else
|
#else
|
||||||
#define enable_x() ;
|
#define enable_x() {}
|
||||||
#define disable_x() ;
|
#define disable_x() {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(Y_ENABLE_PIN) && Y_ENABLE_PIN > -1
|
#if defined(Y_ENABLE_PIN) && Y_ENABLE_PIN > -1
|
||||||
|
|
@ -135,8 +135,8 @@ void manage_inactivity(bool ignore_stepper_queue=false);
|
||||||
#define disable_y() { WRITE(Y_ENABLE_PIN,!Y_ENABLE_ON); axis_known_position[Y_AXIS] = false; }
|
#define disable_y() { WRITE(Y_ENABLE_PIN,!Y_ENABLE_ON); axis_known_position[Y_AXIS] = false; }
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#define enable_y() ;
|
#define enable_y() {}
|
||||||
#define disable_y() ;
|
#define disable_y() {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(Z_ENABLE_PIN) && Z_ENABLE_PIN > -1
|
#if defined(Z_ENABLE_PIN) && Z_ENABLE_PIN > -1
|
||||||
|
|
@ -146,7 +146,7 @@ void manage_inactivity(bool ignore_stepper_queue=false);
|
||||||
#define disable_z() { WRITE(Z_ENABLE_PIN,!Z_ENABLE_ON); WRITE(Z2_ENABLE_PIN,!Z_ENABLE_ON); axis_known_position[Z_AXIS] = false; }
|
#define disable_z() { WRITE(Z_ENABLE_PIN,!Z_ENABLE_ON); WRITE(Z2_ENABLE_PIN,!Z_ENABLE_ON); axis_known_position[Z_AXIS] = false; }
|
||||||
#else
|
#else
|
||||||
#define enable_z() WRITE(Z_ENABLE_PIN, Z_ENABLE_ON)
|
#define enable_z() WRITE(Z_ENABLE_PIN, Z_ENABLE_ON)
|
||||||
#define disable_z() ;
|
#define disable_z() {}
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#ifdef Z_DUAL_STEPPER_DRIVERS
|
#ifdef Z_DUAL_STEPPER_DRIVERS
|
||||||
|
|
@ -158,8 +158,8 @@ void manage_inactivity(bool ignore_stepper_queue=false);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#define enable_z() ;
|
#define enable_z() {}
|
||||||
#define disable_z() ;
|
#define disable_z() {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -183,24 +183,24 @@ void manage_inactivity(bool ignore_stepper_queue=false);
|
||||||
#define enable_e0() WRITE(E0_ENABLE_PIN, E_ENABLE_ON)
|
#define enable_e0() WRITE(E0_ENABLE_PIN, E_ENABLE_ON)
|
||||||
#define disable_e0() WRITE(E0_ENABLE_PIN,!E_ENABLE_ON)
|
#define disable_e0() WRITE(E0_ENABLE_PIN,!E_ENABLE_ON)
|
||||||
#else
|
#else
|
||||||
#define enable_e0() /* nothing */
|
#define enable_e0() {/* nothing */}
|
||||||
#define disable_e0() /* nothing */
|
#define disable_e0() {/* nothing */}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (EXTRUDERS > 1) && defined(E1_ENABLE_PIN) && (E1_ENABLE_PIN > -1)
|
#if (EXTRUDERS > 1) && defined(E1_ENABLE_PIN) && (E1_ENABLE_PIN > -1)
|
||||||
#define enable_e1() WRITE(E1_ENABLE_PIN, E_ENABLE_ON)
|
#define enable_e1() WRITE(E1_ENABLE_PIN, E_ENABLE_ON)
|
||||||
#define disable_e1() WRITE(E1_ENABLE_PIN,!E_ENABLE_ON)
|
#define disable_e1() WRITE(E1_ENABLE_PIN,!E_ENABLE_ON)
|
||||||
#else
|
#else
|
||||||
#define enable_e1() /* nothing */
|
#define enable_e1() {/* nothing */}
|
||||||
#define disable_e1() /* nothing */
|
#define disable_e1() {/* nothing */}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (EXTRUDERS > 2) && defined(E2_ENABLE_PIN) && (E2_ENABLE_PIN > -1)
|
#if (EXTRUDERS > 2) && defined(E2_ENABLE_PIN) && (E2_ENABLE_PIN > -1)
|
||||||
#define enable_e2() WRITE(E2_ENABLE_PIN, E_ENABLE_ON)
|
#define enable_e2() WRITE(E2_ENABLE_PIN, E_ENABLE_ON)
|
||||||
#define disable_e2() WRITE(E2_ENABLE_PIN,!E_ENABLE_ON)
|
#define disable_e2() WRITE(E2_ENABLE_PIN,!E_ENABLE_ON)
|
||||||
#else
|
#else
|
||||||
#define enable_e2() /* nothing */
|
#define enable_e2() {/* nothing */}
|
||||||
#define disable_e2() /* nothing */
|
#define disable_e2() {/* nothing */}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -385,6 +385,7 @@ extern MarlinBusyState busy_state;
|
||||||
bool gcode_M45(bool onlyZ);
|
bool gcode_M45(bool onlyZ);
|
||||||
void gcode_M701();
|
void gcode_M701();
|
||||||
|
|
||||||
|
#define UNUSED(x) (void)(x)
|
||||||
|
|
||||||
#endif //ifndef marlin.h
|
#endif //ifndef marlin.h
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -931,6 +931,8 @@ void servo_init()
|
||||||
int er_progress = 0;
|
int er_progress = 0;
|
||||||
void factory_reset(char level, bool quiet)
|
void factory_reset(char level, bool quiet)
|
||||||
{
|
{
|
||||||
|
UNUSED(quiet);
|
||||||
|
|
||||||
lcd_implementation_clear();
|
lcd_implementation_clear();
|
||||||
switch (level) {
|
switch (level) {
|
||||||
|
|
||||||
|
|
@ -3370,7 +3372,7 @@ void process_commands()
|
||||||
clamped ? SERIAL_PROTOCOLPGM("First calibration point clamped.\n") : SERIAL_PROTOCOLPGM("No clamping for first calibration point.\n");
|
clamped ? SERIAL_PROTOCOLPGM("First calibration point clamped.\n") : SERIAL_PROTOCOLPGM("No clamping for first calibration point.\n");
|
||||||
}
|
}
|
||||||
#endif // SUPPORT_VERBOSITY
|
#endif // SUPPORT_VERBOSITY
|
||||||
// mbl.get_meas_xy(0, 0, current_position[X_AXIS], current_position[Y_AXIS], false);
|
|
||||||
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], homing_feedrate[X_AXIS] / 30, active_extruder);
|
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], homing_feedrate[X_AXIS] / 30, active_extruder);
|
||||||
// Wait until the move is finished.
|
// Wait until the move is finished.
|
||||||
st_synchronize();
|
st_synchronize();
|
||||||
|
|
|
||||||
|
|
@ -2436,6 +2436,8 @@ bool sample_mesh_and_store_reference()
|
||||||
|
|
||||||
bool scan_bed_induction_points(int8_t verbosity_level)
|
bool scan_bed_induction_points(int8_t verbosity_level)
|
||||||
{
|
{
|
||||||
|
UNUSED(verbosity_level);
|
||||||
|
|
||||||
// Don't let the manage_inactivity() function remove power from the motors.
|
// Don't let the manage_inactivity() function remove power from the motors.
|
||||||
refresh_cmd_timeout();
|
refresh_cmd_timeout();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,78 +21,6 @@ static inline bool vec_undef(const float v[2])
|
||||||
return vx[0] == 0x0FFFFFFFF || vx[1] == 0x0FFFFFFFF;
|
return vx[0] == 0x0FFFFFFFF || vx[1] == 0x0FFFFFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
void mesh_bed_leveling::get_meas_xy(int ix, int iy, float &x, float &y, bool use_default)
|
|
||||||
{
|
|
||||||
#if 0
|
|
||||||
float cntr[2] = {
|
|
||||||
eeprom_read_float((float*)(EEPROM_BED_CALIBRATION_CENTER+0)),
|
|
||||||
eeprom_read_float((float*)(EEPROM_BED_CALIBRATION_CENTER+4))
|
|
||||||
};
|
|
||||||
float vec_x[2] = {
|
|
||||||
eeprom_read_float((float*)(EEPROM_BED_CALIBRATION_VEC_X +0)),
|
|
||||||
eeprom_read_float((float*)(EEPROM_BED_CALIBRATION_VEC_X +4))
|
|
||||||
};
|
|
||||||
float vec_y[2] = {
|
|
||||||
eeprom_read_float((float*)(EEPROM_BED_CALIBRATION_VEC_Y +0)),
|
|
||||||
eeprom_read_float((float*)(EEPROM_BED_CALIBRATION_VEC_Y +4))
|
|
||||||
};
|
|
||||||
|
|
||||||
if (use_default || vec_undef(cntr) || vec_undef(vec_x) || vec_undef(vec_y)) {
|
|
||||||
// Default, uncorrected positions of the calibration points. Works well for correctly built printers.
|
|
||||||
x = float(MESH_MIN_X) + float(MEAS_NUM_X_DIST) * float(ix) - X_PROBE_OFFSET_FROM_EXTRUDER;
|
|
||||||
//FIXME
|
|
||||||
//x -= 5.f;
|
|
||||||
y = float(MESH_MIN_Y) + float(MEAS_NUM_Y_DIST) * float(iy) - Y_PROBE_OFFSET_FROM_EXTRUDER;
|
|
||||||
} else {
|
|
||||||
#if 0
|
|
||||||
SERIAL_ECHO("Running bed leveling. Calibration data: ");
|
|
||||||
SERIAL_ECHO(cntr[0]);
|
|
||||||
SERIAL_ECHO(",");
|
|
||||||
SERIAL_ECHO(cntr[1]);
|
|
||||||
SERIAL_ECHO(", x: ");
|
|
||||||
SERIAL_ECHO(vec_x[0]);
|
|
||||||
SERIAL_ECHO(",");
|
|
||||||
SERIAL_ECHO(vec_x[1]);
|
|
||||||
SERIAL_ECHO(", y: ");
|
|
||||||
SERIAL_ECHO(vec_y[0]);
|
|
||||||
SERIAL_ECHO(",");
|
|
||||||
SERIAL_ECHO(vec_y[1]);
|
|
||||||
SERIAL_ECHOLN("");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
x = cntr[0];
|
|
||||||
y = cntr[1];
|
|
||||||
if (ix < 1) {
|
|
||||||
x -= vec_x[0];
|
|
||||||
y -= vec_x[1];
|
|
||||||
} else if (ix > 1) {
|
|
||||||
x += vec_x[0];
|
|
||||||
y += vec_x[1];
|
|
||||||
}
|
|
||||||
if (iy < 1) {
|
|
||||||
x -= vec_y[0];
|
|
||||||
y -= vec_y[1];
|
|
||||||
} else if (iy > 1) {
|
|
||||||
x += vec_y[0];
|
|
||||||
y += vec_y[1];
|
|
||||||
}
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
SERIAL_ECHO("Calibration point position: ");
|
|
||||||
SERIAL_ECHO(x);
|
|
||||||
SERIAL_ECHO(",");
|
|
||||||
SERIAL_ECHO(y);
|
|
||||||
SERIAL_ECHOLN("");
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
// Default, uncorrected positions of the calibration points.
|
|
||||||
// This coordinate will be corrected by the planner.
|
|
||||||
x = pgm_read_float(bed_ref_points + 2 * (iy * 3 + ix));
|
|
||||||
y = pgm_read_float(bed_ref_points + 2 * (iy * 3 + ix) + 1);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
#if MESH_NUM_X_POINTS>=5 && MESH_NUM_Y_POINTS>=5 && (MESH_NUM_X_POINTS&1)==1 && (MESH_NUM_Y_POINTS&1)==1
|
#if MESH_NUM_X_POINTS>=5 && MESH_NUM_Y_POINTS>=5 && (MESH_NUM_X_POINTS&1)==1 && (MESH_NUM_Y_POINTS&1)==1
|
||||||
// Works for an odd number of MESH_NUM_X_POINTS and MESH_NUM_Y_POINTS
|
// Works for an odd number of MESH_NUM_X_POINTS and MESH_NUM_Y_POINTS
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,11 +24,6 @@ public:
|
||||||
static float get_x(int i) { return float(MESH_MIN_X) + float(MESH_X_DIST) * float(i); }
|
static float get_x(int i) { return float(MESH_MIN_X) + float(MESH_X_DIST) * float(i); }
|
||||||
static float get_y(int i) { return float(MESH_MIN_Y) + float(MESH_Y_DIST) * float(i); }
|
static float get_y(int i) { return float(MESH_MIN_Y) + float(MESH_Y_DIST) * float(i); }
|
||||||
|
|
||||||
// Measurement point for the Z probe.
|
|
||||||
// If use_default=true, then the default positions for a correctly built printer are used.
|
|
||||||
// Otherwise a correction matrix is pulled from the EEPROM if available.
|
|
||||||
static void get_meas_xy(int ix, int iy, float &x, float &y, bool use_default);
|
|
||||||
|
|
||||||
void set_z(int ix, int iy, float z) { z_values[iy][ix] = z; }
|
void set_z(int ix, int iy, float z) { z_values[iy][ix] = z; }
|
||||||
|
|
||||||
int select_x_index(float x) {
|
int select_x_index(float x) {
|
||||||
|
|
|
||||||
|
|
@ -1146,6 +1146,8 @@ void digitalPotWrite(int address, int value) // From Arduino DigitalPotControl e
|
||||||
SPI.transfer(value);
|
SPI.transfer(value);
|
||||||
digitalWrite(DIGIPOTSS_PIN,HIGH); // take the SS pin high to de-select the chip:
|
digitalWrite(DIGIPOTSS_PIN,HIGH); // take the SS pin high to de-select the chip:
|
||||||
//delay(10);
|
//delay(10);
|
||||||
|
#else
|
||||||
|
UNUSED(address); UNUSED(value);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5787,6 +5787,8 @@ static bool check_file(const char* filename) {
|
||||||
|
|
||||||
static void menu_action_sdfile(const char* filename, char* longFilename)
|
static void menu_action_sdfile(const char* filename, char* longFilename)
|
||||||
{
|
{
|
||||||
|
UNUSED(longFilename);
|
||||||
|
|
||||||
loading_flag = false;
|
loading_flag = false;
|
||||||
char cmd[30];
|
char cmd[30];
|
||||||
char* c;
|
char* c;
|
||||||
|
|
@ -5806,6 +5808,8 @@ static void menu_action_sdfile(const char* filename, char* longFilename)
|
||||||
}
|
}
|
||||||
static void menu_action_sddirectory(const char* filename, char* longFilename)
|
static void menu_action_sddirectory(const char* filename, char* longFilename)
|
||||||
{
|
{
|
||||||
|
UNUSED(longFilename);
|
||||||
|
|
||||||
card.chdir(filename);
|
card.chdir(filename);
|
||||||
encoderPosition = 0;
|
encoderPosition = 0;
|
||||||
}
|
}
|
||||||
|
|
@ -6301,12 +6305,12 @@ bool lcd_detected(void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef LCD_USE_I2C_BUZZER
|
||||||
void lcd_buzz(long duration, uint16_t freq)
|
void lcd_buzz(long duration, uint16_t freq)
|
||||||
{
|
{
|
||||||
#ifdef LCD_USE_I2C_BUZZER
|
|
||||||
lcd.buzz(duration, freq);
|
lcd.buzz(duration, freq);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
bool lcd_clicked()
|
bool lcd_clicked()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1189,6 +1189,8 @@ void lcd_implementation_drawedit_2(const char* pstr, char* value)
|
||||||
|
|
||||||
static void lcd_implementation_drawmenu_sdfile_selected(uint8_t row, const char* pstr, const char* filename, char* longFilename)
|
static void lcd_implementation_drawmenu_sdfile_selected(uint8_t row, const char* pstr, const char* filename, char* longFilename)
|
||||||
{
|
{
|
||||||
|
UNUSED(pstr); UNUSED(filename);
|
||||||
|
|
||||||
char c;
|
char c;
|
||||||
int enc_dif = encoderDiff;
|
int enc_dif = encoderDiff;
|
||||||
uint8_t n = LCD_WIDTH - 1;
|
uint8_t n = LCD_WIDTH - 1;
|
||||||
|
|
@ -1242,6 +1244,8 @@ static void lcd_implementation_drawmenu_sdfile_selected(uint8_t row, const char*
|
||||||
}
|
}
|
||||||
static void lcd_implementation_drawmenu_sdfile(uint8_t row, const char* pstr, const char* filename, char* longFilename)
|
static void lcd_implementation_drawmenu_sdfile(uint8_t row, const char* pstr, const char* filename, char* longFilename)
|
||||||
{
|
{
|
||||||
|
UNUSED(pstr);
|
||||||
|
|
||||||
char c;
|
char c;
|
||||||
uint8_t n = LCD_WIDTH - 1;
|
uint8_t n = LCD_WIDTH - 1;
|
||||||
lcd.setCursor(0, row);
|
lcd.setCursor(0, row);
|
||||||
|
|
@ -1262,6 +1266,8 @@ static void lcd_implementation_drawmenu_sdfile(uint8_t row, const char* pstr, co
|
||||||
}
|
}
|
||||||
static void lcd_implementation_drawmenu_sddirectory_selected(uint8_t row, const char* pstr, const char* filename, char* longFilename)
|
static void lcd_implementation_drawmenu_sddirectory_selected(uint8_t row, const char* pstr, const char* filename, char* longFilename)
|
||||||
{
|
{
|
||||||
|
UNUSED(pstr);
|
||||||
|
|
||||||
char c;
|
char c;
|
||||||
uint8_t n = LCD_WIDTH - 2;
|
uint8_t n = LCD_WIDTH - 2;
|
||||||
lcd.setCursor(0, row);
|
lcd.setCursor(0, row);
|
||||||
|
|
@ -1283,6 +1289,8 @@ static void lcd_implementation_drawmenu_sddirectory_selected(uint8_t row, const
|
||||||
}
|
}
|
||||||
static void lcd_implementation_drawmenu_sddirectory(uint8_t row, const char* pstr, const char* filename, char* longFilename)
|
static void lcd_implementation_drawmenu_sddirectory(uint8_t row, const char* pstr, const char* filename, char* longFilename)
|
||||||
{
|
{
|
||||||
|
UNUSED(pstr);
|
||||||
|
|
||||||
char c;
|
char c;
|
||||||
uint8_t n = LCD_WIDTH - 2;
|
uint8_t n = LCD_WIDTH - 2;
|
||||||
lcd.setCursor(0, row);
|
lcd.setCursor(0, row);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue