Skip to content

Commit

Permalink
Apply some fixes from Andreas
Browse files Browse the repository at this point in the history
Derived from
AnHardt@6e8ede8
7f8d8e0dd
  • Loading branch information
thinkyhead committed Jun 23, 2016
1 parent bd01592 commit 7b2fadd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions Marlin/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4286,7 +4286,7 @@ inline void gcode_M42() {

randomSeed(millis());

double mean, sigma, sample_set[n_samples];
double mean = 0, sigma = 0, sample_set[n_samples];
for (uint8_t n = 0; n < n_samples; n++) {
if (n_legs) {
int dir = (random(0, 10) > 5.0) ? -1 : 1; // clockwise or counter clockwise
Expand Down Expand Up @@ -4410,8 +4410,10 @@ inline void gcode_M42() {

// Raise before the next loop for the legs,
// or do the final raise after the last probe
if (n_legs || last_probe) {
do_probe_raise(last_probe ? Z_RAISE_AFTER_PROBING : z_between);
if (last_probe)
do_probe_raise(Z_RAISE_AFTER_PROBING);
else if (n_legs) {
do_probe_raise(z_between);
if (!last_probe) delay(500);
}

Expand Down
2 changes: 1 addition & 1 deletion Marlin/temperature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ int Temperature::getHeaterPower(int heater) {
EXTRUDER_3_AUTO_FAN_PIN == EXTRUDER_2_AUTO_FAN_PIN ? 2 : 3
};
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)
SBI(fanState, fanBit[f]);
}
Expand Down

0 comments on commit 7b2fadd

Please sign in to comment.