Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes some minor GCC warnings #4349

Merged
merged 2 commits into from
Jul 19, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions Marlin/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4427,7 +4427,7 @@ inline void gcode_M76() { print_job_timer.pause(); }
inline void gcode_M77() { print_job_timer.stop(); }

#if ENABLED(PRINTCOUNTER)
/*+
/**
* M78: Show print statistics
*/
inline void gcode_M78() {
Expand Down Expand Up @@ -5325,7 +5325,7 @@ inline void gcode_M200() {
if (volumetric_enabled) {
filament_size[target_extruder] = code_value_linear_units();
// make sure all extruders have some sane value for the filament size
for (int i = 0; i < COUNT(filament_size); i++)
for (uint8_t i = 0; i < COUNT(filament_size); i++)
if (! filament_size[i]) filament_size[i] = DEFAULT_NOMINAL_FILAMENT_DIA;
}
}
Expand Down Expand Up @@ -6825,7 +6825,7 @@ inline void gcode_T(uint8_t tmp_extruder) {
// <0 if the new nozzle is higher, >0 if lower. A bigger raise when lower.
float z_diff = hotend_offset[Z_AXIS][active_extruder] - hotend_offset[Z_AXIS][tmp_extruder],
z_raise = 0.3 + (z_diff > 0.0 ? z_diff : 0.0);

// Always raise by some amount
planner.buffer_line(
current_position[X_AXIS],
Expand All @@ -6836,10 +6836,10 @@ inline void gcode_T(uint8_t tmp_extruder) {
active_extruder
);
stepper.synchronize();

move_extruder_servo(active_extruder);
delay(500);

// Move back down, if needed
if (z_raise != z_diff) {
planner.buffer_line(
Expand All @@ -6853,7 +6853,7 @@ inline void gcode_T(uint8_t tmp_extruder) {
stepper.synchronize();
}
#endif

/**
* Set current_position to the position of the new nozzle.
* Offsets are based on linear distance, so we need to get
Expand Down Expand Up @@ -6906,7 +6906,7 @@ inline void gcode_T(uint8_t tmp_extruder) {
current_position[Z_AXIS] += offset_vec.z;

#else // !AUTO_BED_LEVELING_FEATURE

float xydiff[2] = {
hotend_offset[X_AXIS][tmp_extruder] - hotend_offset[X_AXIS][active_extruder],
hotend_offset[Y_AXIS][tmp_extruder] - hotend_offset[Y_AXIS][active_extruder]
Expand All @@ -6930,7 +6930,7 @@ inline void gcode_T(uint8_t tmp_extruder) {
}

#endif // MESH_BED_LEVELING

#endif // !AUTO_BED_LEVELING_FEATURE

#if ENABLED(DEBUG_LEVELING_FEATURE)
Expand Down Expand Up @@ -6993,7 +6993,7 @@ inline void gcode_T(uint8_t tmp_extruder) {
SERIAL_ECHOLNPGM("<<< gcode_T");
}
#endif

SERIAL_ECHO_START;
SERIAL_ECHOPGM(MSG_ACTIVE_EXTRUDER);
SERIAL_PROTOCOLLN((int)active_extruder);
Expand Down Expand Up @@ -8695,6 +8695,6 @@ float calculate_volumetric_multiplier(float diameter) {
}

void calculate_volumetric_multipliers() {
for (int i = 0; i < COUNT(filament_size); i++)
for (uint8_t i = 0; i < COUNT(filament_size); i++)
volumetric_multiplier[i] = calculate_volumetric_multiplier(filament_size[i]);
}