浏览代码

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 年前
父节点
当前提交
14d4419e16
共有 1 个文件被更改,包括 7 次插入7 次删除
  1. 7
    7
      Marlin/Marlin_main.cpp

+ 7
- 7
Marlin/Marlin_main.cpp 查看文件

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

正在加载...
取消
保存