Sfoglia il codice sorgente

Replaced SERIAL_PROTOCOLPGM(MSG_BED) with SERIAL_PROTOCOLPGM("Bed")

Resolved some warnings in Marlin_main.cpp regarding compares of signed and unsigned integers by replacing 'int' or 'uint16_t' with 'uint8_t'.
AnHardt 10 anni fa
parent
commit
14d4419e16
1 ha cambiato i file con 7 aggiunte e 7 eliminazioni
  1. 7
    7
      Marlin/Marlin_main.cpp

+ 7
- 7
Marlin/Marlin_main.cpp Vedi File

@@ -2514,7 +2514,7 @@ inline void gcode_G28() {
2514 2514
       feedrate = homing_feedrate[Z_AXIS];
2515 2515
 
2516 2516
       run_z_probe();
2517
-      SERIAL_PROTOCOLPGM(MSG_BED);
2517
+      SERIAL_PROTOCOLPGM("Bed");
2518 2518
       SERIAL_PROTOCOLPGM(" X: ");
2519 2519
       SERIAL_PROTOCOL(current_position[X_AXIS] + 0.0001);
2520 2520
       SERIAL_PROTOCOLPGM(" Y: ");
@@ -2852,8 +2852,8 @@ inline void gcode_M42() {
2852 2852
   inline void gcode_M48() {
2853 2853
 
2854 2854
     double sum = 0.0, mean = 0.0, sigma = 0.0, sample_set[50];
2855
-    int verbose_level = 1, n_samples = 10, n_legs = 0;
2856
-    
2855
+    uint8_t verbose_level = 1, n_samples = 10, n_legs = 0;
2856
+
2857 2857
     if (code_seen('V') || code_seen('v')) {
2858 2858
       verbose_level = code_value_short();
2859 2859
       if (verbose_level < 0 || verbose_level > 4 ) {
@@ -2960,7 +2960,7 @@ inline void gcode_M42() {
2960 2960
 
2961 2961
     if (deploy_probe_for_each_reading) stow_z_probe();
2962 2962
 
2963
-    for (uint16_t n=0; n < n_samples; n++) {
2963
+    for (uint8_t n=0; n < n_samples; n++) {
2964 2964
 
2965 2965
       do_blocking_move_to(X_probe_location, Y_probe_location, Z_start_location); // Make sure we are at the probe location
2966 2966
 
@@ -2975,7 +2975,7 @@ inline void gcode_M42() {
2975 2975
         //SERIAL_ECHOPAIR("   direction: ",dir);
2976 2976
         //SERIAL_EOL;
2977 2977
 
2978
-        for (int l = 0; l < n_legs - 1; l++) {
2978
+        for (uint8_t l = 0; l < n_legs - 1; l++) {
2979 2979
           ms = millis();
2980 2980
           theta += RADIANS(dir * (ms % 20L));
2981 2981
           radius += (ms % 10L) - 5L;
@@ -3014,7 +3014,7 @@ inline void gcode_M42() {
3014 3014
       // Get the current mean for the data points we have so far
3015 3015
       //
3016 3016
       sum = 0.0;
3017
-      for (int j = 0; j <= n; j++) sum += sample_set[j];
3017
+      for (uint8_t j = 0; j <= n; j++) sum += sample_set[j];
3018 3018
       mean = sum / (n + 1);
3019 3019
 
3020 3020
       //
@@ -3022,7 +3022,7 @@ inline void gcode_M42() {
3022 3022
       // data points we have so far
3023 3023
       //
3024 3024
       sum = 0.0;
3025
-      for (int j = 0; j <= n; j++) {
3025
+      for (uint8_t j = 0; j <= n; j++) {
3026 3026
         float ss = sample_set[j] - mean;
3027 3027
         sum += ss * ss;
3028 3028
       }

Loading…
Annulla
Salva