Scott Lahteine 3 роки тому
джерело
коміт
13ce5aa1ed

+ 1
- 1
Marlin/src/HAL/DUE/MarlinSerialUSB.cpp Переглянути файл

@@ -41,7 +41,7 @@ extern "C" {
41 41
   int udi_cdc_getc();
42 42
   bool udi_cdc_is_tx_ready();
43 43
   int udi_cdc_putc(int value);
44
-};
44
+}
45 45
 
46 46
 // Pending character
47 47
 static int pending_char = -1;

+ 1
- 1
Marlin/src/HAL/DUE/usb/sd_mmc_spi_mem.cpp Переглянути файл

@@ -10,7 +10,7 @@
10 10
 
11 11
 #include "../../../sd/cardreader.h"
12 12
 extern "C" {
13
-#include "sd_mmc_spi_mem.h"
13
+  #include "sd_mmc_spi_mem.h"
14 14
 }
15 15
 
16 16
 #define SD_MMC_BLOCK_SIZE 512

+ 4
- 4
Marlin/src/feature/encoder_i2c.cpp Переглянути файл

@@ -756,7 +756,7 @@ int8_t I2CPositionEncodersMgr::parse() {
756 756
     if (!parser.has_value()) {
757 757
       SERIAL_ECHOLNPGM("?A seen, but no address specified! [30-200]");
758 758
       return I2CPE_PARSE_ERR;
759
-    };
759
+    }
760 760
 
761 761
     I2CPE_addr = parser.value_byte();
762 762
     if (!WITHIN(I2CPE_addr, 30, 200)) { // reserve the first 30 and last 55
@@ -775,7 +775,7 @@ int8_t I2CPositionEncodersMgr::parse() {
775 775
     if (!parser.has_value()) {
776 776
       SERIAL_ECHOLNPGM("?I seen, but no index specified! [0-", I2CPE_ENCODER_CNT - 1, "]");
777 777
       return I2CPE_PARSE_ERR;
778
-    };
778
+    }
779 779
 
780 780
     I2CPE_idx = parser.value_byte();
781 781
     if (I2CPE_idx >= I2CPE_ENCODER_CNT) {
@@ -791,7 +791,7 @@ int8_t I2CPositionEncodersMgr::parse() {
791 791
   I2CPE_anyaxis = parser.seen_axis();
792 792
 
793 793
   return I2CPE_PARSE_OK;
794
-};
794
+}
795 795
 
796 796
 /**
797 797
  * M860:  Report the position(s) of position encoder module(s).
@@ -934,7 +934,7 @@ void I2CPositionEncodersMgr::M864() {
934 934
     if (!parser.has_value()) {
935 935
       SERIAL_ECHOLNPGM("?S seen, but no address specified! [30-200]");
936 936
       return;
937
-    };
937
+    }
938 938
 
939 939
     newAddress = parser.value_byte();
940 940
     if (!WITHIN(newAddress, 30, 200)) {

+ 2
- 6
Marlin/src/feature/tmc_util.cpp Переглянути файл

@@ -472,12 +472,8 @@
472 472
     void tmc_set_report_interval(const uint16_t update_interval) {
473 473
       if ((report_tmc_status_interval = update_interval))
474 474
         SERIAL_ECHOLNPGM("axis:pwm_scale"
475
-          #if HAS_STEALTHCHOP
476
-            "/curr_scale"
477
-          #endif
478
-          #if HAS_STALLGUARD
479
-            "/mech_load"
480
-          #endif
475
+          TERN_(HAS_STEALTHCHOP, "/curr_scale")
476
+          TERN_(HAS_STALLGUARD, "/mech_load")
481 477
           "|flags|warncount"
482 478
         );
483 479
     }

+ 1
- 1
Marlin/src/gcode/calibrate/G425.cpp Переглянути файл

@@ -666,7 +666,7 @@ inline void calibrate_all_toolheads(measurements_t &m, const float uncertainty)
666 666
  *   1) For each nozzle, touch top and sides of object to determine object position and
667 667
  *      nozzle offsets. Do a fast but rough search over a wider area.
668 668
  *   2) With the first nozzle, touch top and sides of object to determine backlash values
669
- *      for all axis (if BACKLASH_GCODE is enabled)
669
+ *      for all axes (if BACKLASH_GCODE is enabled)
670 670
  *   3) For each nozzle, touch top and sides of object slowly to determine precise
671 671
  *      position of object. Adjust coordinate system and nozzle offsets so probed object
672 672
  *      location corresponds to known object location with a high degree of precision.

+ 3
- 3
Marlin/src/gcode/feature/pause/M600.cpp Переглянути файл

@@ -67,13 +67,13 @@
67 67
 void GcodeSuite::M600() {
68 68
 
69 69
   #if ENABLED(MIXING_EXTRUDER)
70
-    const int8_t target_e_stepper = get_target_e_stepper_from_command();
71
-    if (target_e_stepper < 0) return;
70
+    const int8_t eindex = get_target_e_stepper_from_command();
71
+    if (eindex < 0) return;
72 72
 
73 73
     const uint8_t old_mixing_tool = mixer.get_current_vtool();
74 74
     mixer.T(MIXER_DIRECT_SET_TOOL);
75 75
 
76
-    MIXER_STEPPER_LOOP(i) mixer.set_collector(i, i == uint8_t(target_e_stepper) ? 1.0 : 0.0);
76
+    MIXER_STEPPER_LOOP(i) mixer.set_collector(i, i == uint8_t(eindex) ? 1.0 : 0.0);
77 77
     mixer.normalize();
78 78
 
79 79
     const int8_t target_extruder = active_extruder;

+ 6
- 6
Marlin/src/gcode/feature/pause/M701_M702.cpp Переглянути файл

@@ -60,13 +60,13 @@ void GcodeSuite::M701() {
60 60
   if (TERN0(NO_MOTION_BEFORE_HOMING, axes_should_home())) park_point.z = 0;
61 61
 
62 62
   #if ENABLED(MIXING_EXTRUDER)
63
-    const int8_t target_e_stepper = get_target_e_stepper_from_command();
64
-    if (target_e_stepper < 0) return;
63
+    const int8_t eindex = get_target_e_stepper_from_command();
64
+    if (eindex < 0) return;
65 65
 
66 66
     const uint8_t old_mixing_tool = mixer.get_current_vtool();
67 67
     mixer.T(MIXER_DIRECT_SET_TOOL);
68 68
 
69
-    MIXER_STEPPER_LOOP(i) mixer.set_collector(i, (i == (uint8_t)target_e_stepper) ? 1.0 : 0.0);
69
+    MIXER_STEPPER_LOOP(i) mixer.set_collector(i, i == uint8_t(eindex) ? 1.0 : 0.0);
70 70
     mixer.normalize();
71 71
 
72 72
     const int8_t target_extruder = active_extruder;
@@ -165,10 +165,10 @@ void GcodeSuite::M702() {
165 165
     #endif
166 166
 
167 167
     if (seenT) {
168
-      const int8_t target_e_stepper = get_target_e_stepper_from_command();
169
-      if (target_e_stepper < 0) return;
168
+      const int8_t eindex = get_target_e_stepper_from_command();
169
+      if (eindex < 0) return;
170 170
       mixer.T(MIXER_DIRECT_SET_TOOL);
171
-      MIXER_STEPPER_LOOP(i) mixer.set_collector(i, (i == (uint8_t)target_e_stepper) ? 1.0 : 0.0);
171
+      MIXER_STEPPER_LOOP(i) mixer.set_collector(i, i == uint8_t(eindex) ? 1.0 : 0.0);
172 172
       mixer.normalize();
173 173
     }
174 174
 

+ 1
- 3
Marlin/src/gcode/feature/power_monitor/M430.cpp Переглянути файл

@@ -53,9 +53,7 @@ void GcodeSuite::M430() {
53 53
     SERIAL_ECHOLNPGM(
54 54
       #if ENABLED(POWER_MONITOR_CURRENT)
55 55
         "Current: ", power_monitor.getAmps(), "A"
56
-        #if ENABLED(POWER_MONITOR_VOLTAGE)
57
-          "  "
58
-        #endif
56
+        TERN_(POWER_MONITOR_VOLTAGE, "  ")
59 57
       #endif
60 58
       #if ENABLED(POWER_MONITOR_VOLTAGE)
61 59
         "Voltage: ", power_monitor.getVolts(), "V"

+ 1
- 1
Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.cpp Переглянути файл

@@ -366,7 +366,7 @@ int8_t ChironTFT::FindToken(char c) {
366 366
       #endif
367 367
       return pos;
368 368
     }
369
-  } while(++pos < command_len);
369
+  } while (++pos < command_len);
370 370
   #if ACDEBUG(AC_INFO)
371 371
     SERIAL_ECHOLNPGM("Not found: ", c);
372 372
   #endif

+ 1
- 1
Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/files_screen.cpp Переглянути файл

@@ -77,7 +77,7 @@ const char *FilesScreen::getSelectedFilename(bool shortName) {
77 77
 }
78 78
 
79 79
 void FilesScreen::drawSelectedFile() {
80
-  if(mydata.selected_tag == 0xFF) return;
80
+  if (mydata.selected_tag == 0xFF) return;
81 81
   FileList files;
82 82
   files.seek(getSelectedFileIndex(), true);
83 83
   mydata.flags.is_dir = files.isDir();

+ 43
- 40
Marlin/src/sd/Sd2Card.cpp Переглянути файл

@@ -392,50 +392,51 @@ bool DiskIODriver_SPI_SD::readData(uint8_t *dst) {
392 392
 
393 393
 #if ENABLED(SD_CHECK_AND_RETRY)
394 394
   #ifdef FAST_CRC
395
-  static const uint16_t crctab16[] PROGMEM = {
396
-    0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7,
397
-    0x8108, 0x9129, 0xA14A, 0xB16B, 0xC18C, 0xD1AD, 0xE1CE, 0xF1EF,
398
-    0x1231, 0x0210, 0x3273, 0x2252, 0x52B5, 0x4294, 0x72F7, 0x62D6,
399
-    0x9339, 0x8318, 0xB37B, 0xA35A, 0xD3BD, 0xC39C, 0xF3FF, 0xE3DE,
400
-    0x2462, 0x3443, 0x0420, 0x1401, 0x64E6, 0x74C7, 0x44A4, 0x5485,
401
-    0xA56A, 0xB54B, 0x8528, 0x9509, 0xE5EE, 0xF5CF, 0xC5AC, 0xD58D,
402
-    0x3653, 0x2672, 0x1611, 0x0630, 0x76D7, 0x66F6, 0x5695, 0x46B4,
403
-    0xB75B, 0xA77A, 0x9719, 0x8738, 0xF7DF, 0xE7FE, 0xD79D, 0xC7BC,
404
-    0x48C4, 0x58E5, 0x6886, 0x78A7, 0x0840, 0x1861, 0x2802, 0x3823,
405
-    0xC9CC, 0xD9ED, 0xE98E, 0xF9AF, 0x8948, 0x9969, 0xA90A, 0xB92B,
406
-    0x5AF5, 0x4AD4, 0x7AB7, 0x6A96, 0x1A71, 0x0A50, 0x3A33, 0x2A12,
407
-    0xDBFD, 0xCBDC, 0xFBBF, 0xEB9E, 0x9B79, 0x8B58, 0xBB3B, 0xAB1A,
408
-    0x6CA6, 0x7C87, 0x4CE4, 0x5CC5, 0x2C22, 0x3C03, 0x0C60, 0x1C41,
409
-    0xEDAE, 0xFD8F, 0xCDEC, 0xDDCD, 0xAD2A, 0xBD0B, 0x8D68, 0x9D49,
410
-    0x7E97, 0x6EB6, 0x5ED5, 0x4EF4, 0x3E13, 0x2E32, 0x1E51, 0x0E70,
411
-    0xFF9F, 0xEFBE, 0xDFDD, 0xCFFC, 0xBF1B, 0xAF3A, 0x9F59, 0x8F78,
412
-    0x9188, 0x81A9, 0xB1CA, 0xA1EB, 0xD10C, 0xC12D, 0xF14E, 0xE16F,
413
-    0x1080, 0x00A1, 0x30C2, 0x20E3, 0x5004, 0x4025, 0x7046, 0x6067,
414
-    0x83B9, 0x9398, 0xA3FB, 0xB3DA, 0xC33D, 0xD31C, 0xE37F, 0xF35E,
415
-    0x02B1, 0x1290, 0x22F3, 0x32D2, 0x4235, 0x5214, 0x6277, 0x7256,
416
-    0xB5EA, 0xA5CB, 0x95A8, 0x8589, 0xF56E, 0xE54F, 0xD52C, 0xC50D,
417
-    0x34E2, 0x24C3, 0x14A0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405,
418
-    0xA7DB, 0xB7FA, 0x8799, 0x97B8, 0xE75F, 0xF77E, 0xC71D, 0xD73C,
419
-    0x26D3, 0x36F2, 0x0691, 0x16B0, 0x6657, 0x7676, 0x4615, 0x5634,
420
-    0xD94C, 0xC96D, 0xF90E, 0xE92F, 0x99C8, 0x89E9, 0xB98A, 0xA9AB,
421
-    0x5844, 0x4865, 0x7806, 0x6827, 0x18C0, 0x08E1, 0x3882, 0x28A3,
422
-    0xCB7D, 0xDB5C, 0xEB3F, 0xFB1E, 0x8BF9, 0x9BD8, 0xABBB, 0xBB9A,
423
-    0x4A75, 0x5A54, 0x6A37, 0x7A16, 0x0AF1, 0x1AD0, 0x2AB3, 0x3A92,
424
-    0xFD2E, 0xED0F, 0xDD6C, 0xCD4D, 0xBDAA, 0xAD8B, 0x9DE8, 0x8DC9,
425
-    0x7C26, 0x6C07, 0x5C64, 0x4C45, 0x3CA2, 0x2C83, 0x1CE0, 0x0CC1,
426
-    0xEF1F, 0xFF3E, 0xCF5D, 0xDF7C, 0xAF9B, 0xBFBA, 0x8FD9, 0x9FF8,
427
-    0x6E17, 0x7E36, 0x4E55, 0x5E74, 0x2E93, 0x3EB2, 0x0ED1, 0x1EF0
428
-  };
395
+    static const uint16_t crctab16[] PROGMEM = {
396
+      0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7,
397
+      0x8108, 0x9129, 0xA14A, 0xB16B, 0xC18C, 0xD1AD, 0xE1CE, 0xF1EF,
398
+      0x1231, 0x0210, 0x3273, 0x2252, 0x52B5, 0x4294, 0x72F7, 0x62D6,
399
+      0x9339, 0x8318, 0xB37B, 0xA35A, 0xD3BD, 0xC39C, 0xF3FF, 0xE3DE,
400
+      0x2462, 0x3443, 0x0420, 0x1401, 0x64E6, 0x74C7, 0x44A4, 0x5485,
401
+      0xA56A, 0xB54B, 0x8528, 0x9509, 0xE5EE, 0xF5CF, 0xC5AC, 0xD58D,
402
+      0x3653, 0x2672, 0x1611, 0x0630, 0x76D7, 0x66F6, 0x5695, 0x46B4,
403
+      0xB75B, 0xA77A, 0x9719, 0x8738, 0xF7DF, 0xE7FE, 0xD79D, 0xC7BC,
404
+      0x48C4, 0x58E5, 0x6886, 0x78A7, 0x0840, 0x1861, 0x2802, 0x3823,
405
+      0xC9CC, 0xD9ED, 0xE98E, 0xF9AF, 0x8948, 0x9969, 0xA90A, 0xB92B,
406
+      0x5AF5, 0x4AD4, 0x7AB7, 0x6A96, 0x1A71, 0x0A50, 0x3A33, 0x2A12,
407
+      0xDBFD, 0xCBDC, 0xFBBF, 0xEB9E, 0x9B79, 0x8B58, 0xBB3B, 0xAB1A,
408
+      0x6CA6, 0x7C87, 0x4CE4, 0x5CC5, 0x2C22, 0x3C03, 0x0C60, 0x1C41,
409
+      0xEDAE, 0xFD8F, 0xCDEC, 0xDDCD, 0xAD2A, 0xBD0B, 0x8D68, 0x9D49,
410
+      0x7E97, 0x6EB6, 0x5ED5, 0x4EF4, 0x3E13, 0x2E32, 0x1E51, 0x0E70,
411
+      0xFF9F, 0xEFBE, 0xDFDD, 0xCFFC, 0xBF1B, 0xAF3A, 0x9F59, 0x8F78,
412
+      0x9188, 0x81A9, 0xB1CA, 0xA1EB, 0xD10C, 0xC12D, 0xF14E, 0xE16F,
413
+      0x1080, 0x00A1, 0x30C2, 0x20E3, 0x5004, 0x4025, 0x7046, 0x6067,
414
+      0x83B9, 0x9398, 0xA3FB, 0xB3DA, 0xC33D, 0xD31C, 0xE37F, 0xF35E,
415
+      0x02B1, 0x1290, 0x22F3, 0x32D2, 0x4235, 0x5214, 0x6277, 0x7256,
416
+      0xB5EA, 0xA5CB, 0x95A8, 0x8589, 0xF56E, 0xE54F, 0xD52C, 0xC50D,
417
+      0x34E2, 0x24C3, 0x14A0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405,
418
+      0xA7DB, 0xB7FA, 0x8799, 0x97B8, 0xE75F, 0xF77E, 0xC71D, 0xD73C,
419
+      0x26D3, 0x36F2, 0x0691, 0x16B0, 0x6657, 0x7676, 0x4615, 0x5634,
420
+      0xD94C, 0xC96D, 0xF90E, 0xE92F, 0x99C8, 0x89E9, 0xB98A, 0xA9AB,
421
+      0x5844, 0x4865, 0x7806, 0x6827, 0x18C0, 0x08E1, 0x3882, 0x28A3,
422
+      0xCB7D, 0xDB5C, 0xEB3F, 0xFB1E, 0x8BF9, 0x9BD8, 0xABBB, 0xBB9A,
423
+      0x4A75, 0x5A54, 0x6A37, 0x7A16, 0x0AF1, 0x1AD0, 0x2AB3, 0x3A92,
424
+      0xFD2E, 0xED0F, 0xDD6C, 0xCD4D, 0xBDAA, 0xAD8B, 0x9DE8, 0x8DC9,
425
+      0x7C26, 0x6C07, 0x5C64, 0x4C45, 0x3CA2, 0x2C83, 0x1CE0, 0x0CC1,
426
+      0xEF1F, 0xFF3E, 0xCF5D, 0xDF7C, 0xAF9B, 0xBFBA, 0x8FD9, 0x9FF8,
427
+      0x6E17, 0x7E36, 0x4E55, 0x5E74, 0x2E93, 0x3EB2, 0x0ED1, 0x1EF0
428
+    };
429 429
     // faster CRC-CCITT
430 430
     // uses the x^16,x^12,x^5,x^1 polynomial.
431
-  static uint16_t CRC_CCITT(const uint8_t *data, size_t n) {
432
-    uint16_t crc = 0;
433
-    for (size_t i = 0; i < n; i++) {
434
-      crc = pgm_read_word(&crctab16[(crc >> 8 ^ data[i]) & 0xFF]) ^ (crc << 8);
431
+    static uint16_t CRC_CCITT(const uint8_t *data, size_t n) {
432
+      uint16_t crc = 0;
433
+      for (size_t i = 0; i < n; i++)
434
+        crc = pgm_read_word(&crctab16[(crc >> 8 ^ data[i]) & 0xFF]) ^ (crc << 8);
435
+      return crc;
435 436
     }
436
-    return crc;
437
-  }
437
+
438 438
   #else
439
+
439 440
     // slower CRC-CCITT
440 441
     // uses the x^16,x^12,x^5,x^1 polynomial.
441 442
     static uint16_t CRC_CCITT(const uint8_t *data, size_t n) {
@@ -449,7 +450,9 @@ bool DiskIODriver_SPI_SD::readData(uint8_t *dst) {
449 450
       }
450 451
       return crc;
451 452
     }
453
+
452 454
   #endif
455
+
453 456
 #endif // SD_CHECK_AND_RETRY
454 457
 
455 458
 bool DiskIODriver_SPI_SD::readData(uint8_t *dst, const uint16_t count) {

+ 1
- 1
Marlin/src/sd/usb_flashdrive/lib-uhs2/usbhost.cpp Переглянути файл

@@ -47,7 +47,7 @@ void MAX3421e::regWr(uint8_t reg, uint8_t data) {
47 47
   spiSend(reg | 0x02);
48 48
   spiSend(data);
49 49
   ncs();
50
-};
50
+}
51 51
 
52 52
 // multiple-byte write
53 53
 // return a pointer to memory position after last written

+ 10
- 10
buildroot/web-ui/data/www/webmarlin-class.js Переглянути файл

@@ -349,18 +349,18 @@ class jsLog {
349 349
 
350 350
 var wmGCommands = {
351 351
   CustomCmd     : new wmGCommandItem('',null,null,'Custom command'),
352
-  MoveFw        : new wmGCommandItem('G1','Y{0}',10,'Move forward on Y axis'),
353
-  MoveBw        : new wmGCommandItem('G1','Y-{0}',10,'Move backward on Y axis'),
354
-  MoveSx        : new wmGCommandItem('G1','X{0}',10,'Move left on X axis'),
355
-  MoveDx        : new wmGCommandItem('G1','X-{0}',10,'Move right on X axis'),
356
-  MoveUp        : new wmGCommandItem('G1','Z{0}',10,'Move up on Z axis'),
357
-  MoveDw        : new wmGCommandItem('G1','Z-{0}',10,'Move down on Z axis'),
352
+  MoveFw        : new wmGCommandItem('G1','Y{0}',10,'Move Y forward'),
353
+  MoveBw        : new wmGCommandItem('G1','Y-{0}',10,'Move Y backward'),
354
+  MoveSx        : new wmGCommandItem('G1','X{0}',10,'Move X left'),
355
+  MoveDx        : new wmGCommandItem('G1','X-{0}',10,'Move X right'),
356
+  MoveUp        : new wmGCommandItem('G1','Z{0}',10,'Move Z up'),
357
+  MoveDw        : new wmGCommandItem('G1','Z-{0}',10,'Move Z down'),
358 358
   FillRetrive   : new wmGCommandItem('G10',null,null,'Retract filament'),
359 359
   FillExtrude   : new wmGCommandItem('GYYYY',null,null,'Extrude filament'),
360
-  MoveHome      : new wmGCommandItem('G28',null,null,'Go home on all axis'),
361
-  MoveHomeX     : new wmGCommandItem('G28','X',null,'Go home on X axis'),
362
-  MoveHomeY     : new wmGCommandItem('G28','Y',null,'Go home on Y axis'),
363
-  MoveHomeZ     : new wmGCommandItem('G28','Z',null,'Go home on Z axis'),
360
+  MoveHome      : new wmGCommandItem('G28',null,null,'Home all axes'),
361
+  MoveHomeX     : new wmGCommandItem('G28','X',null,'Home X axis'),
362
+  MoveHomeY     : new wmGCommandItem('G28','Y',null,'Home Y axis'),
363
+  MoveHomeZ     : new wmGCommandItem('G28','Z',null,'Home Z axis'),
364 364
   StepEnable    : new wmGCommandItem('M17','{0}','E X Y Z','Enable stepper'),
365 365
   StepEnableAll : new wmGCommandItem('M17',null,null,'Enable all steppers'),
366 366
   StepDisable   : new wmGCommandItem('M18','{0}','E X Y Z','Disable stepper'),

Завантаження…
Відмінити
Зберегти