Browse Source

Use some macros in M48

Scott Lahteine 8 years ago
parent
commit
e4d2662d81
1 changed files with 2 additions and 3 deletions
  1. 2
    3
      Marlin/Marlin_main.cpp

+ 2
- 3
Marlin/Marlin_main.cpp View File

4899
       for (uint8_t j = 0; j <= n; j++) sum += sample_set[j];
4899
       for (uint8_t j = 0; j <= n; j++) sum += sample_set[j];
4900
       mean = sum / (n + 1);
4900
       mean = sum / (n + 1);
4901
 
4901
 
4902
-      if(sample_set[n] < min) min = sample_set[n];
4903
-      if(sample_set[n] > max) max = sample_set[n];
4902
+      NOMORE(min, sample_set[n]);
4903
+      NOLESS(max, sample_set[n]);
4904
 
4904
 
4905
       /**
4905
       /**
4906
        * Now, use that mean to calculate the standard deviation for the
4906
        * Now, use that mean to calculate the standard deviation for the
4956
     SERIAL_PROTOCOLPGM("Standard Deviation: ");
4956
     SERIAL_PROTOCOLPGM("Standard Deviation: ");
4957
     SERIAL_PROTOCOL_F(sigma, 6);
4957
     SERIAL_PROTOCOL_F(sigma, 6);
4958
     SERIAL_EOL;
4958
     SERIAL_EOL;
4959
-
4960
     SERIAL_EOL;
4959
     SERIAL_EOL;
4961
 
4960
 
4962
     clean_up_after_endstop_or_probe_move();
4961
     clean_up_after_endstop_or_probe_move();

Loading…
Cancel
Save