Browse Source

Fix various errors, warnings in example config builds (#19686)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Jason Smith 3 years ago
parent
commit
c6cf3da276

+ 3
- 5
Marlin/src/gcode/bedlevel/G26.cpp View File

@@ -511,11 +511,9 @@ void GcodeSuite::G26() {
511 511
        g26_keep_heaters_on       = parser.boolval('K');
512 512
 
513 513
   // Accept 'I' if temperature presets are defined
514
-  const uint8_t preset_index = (0
515
-    #if PREHEAT_COUNT
516
-      + (parser.seenval('I') ? _MIN(parser.value_byte(), PREHEAT_COUNT - 1) + 1 : 0)
517
-    #endif
518
-  );
514
+  #if PREHEAT_COUNT
515
+    const uint8_t preset_index = parser.seenval('I') ? _MIN(parser.value_byte(), PREHEAT_COUNT - 1) + 1 : 0;
516
+  #endif
519 517
 
520 518
   #if HAS_HEATED_BED
521 519
 

+ 1
- 1
Marlin/src/gcode/motion/M290.cpp View File

@@ -127,7 +127,7 @@ void GcodeSuite::M290() {
127 127
         #else
128 128
           PSTR("Babystep Z")
129 129
         #endif
130
-        , babystep.axis_total[BS_AXIS_IND(Z_AXIS)]
130
+        , babystep.axis_total[BS_TOTAL_IND(Z_AXIS)]
131 131
       );
132 132
     }
133 133
     #endif

+ 1
- 1
Marlin/src/lcd/dogm/dogm_Statusscreen.h View File

@@ -1341,7 +1341,7 @@
1341 1341
     #undef STATUS_LOGO_WIDTH
1342 1342
   #endif
1343 1343
 
1344
-  #if (HAS_MULTI_HOTEND && STATUS_LOGO_WIDTH && BED_OR_CHAMBER_OR_FAN) || (HOTENDS >= 3 && !BED_OR_CHAMBER_OR_FAN)
1344
+  #if !defined(STATUS_HEATERS_X) && ((HAS_MULTI_HOTEND && STATUS_LOGO_WIDTH && BED_OR_CHAMBER_OR_FAN) || (HOTENDS >= 3 && !BED_OR_CHAMBER_OR_FAN))
1345 1345
     #define _STATUS_HEATERS_X(H,S,N) ((LCD_PIXEL_WIDTH - (H * (S + N)) - (_EXTRA_WIDTH) + (STATUS_LOGO_WIDTH)) / 2)
1346 1346
     #if STATUS_HOTEND1_WIDTH
1347 1347
       #if HOTENDS > 2

+ 8
- 10
Marlin/src/lcd/extui/lib/mks_ui/draw_printing.cpp View File

@@ -46,7 +46,8 @@
46 46
 
47 47
 extern lv_group_t * g;
48 48
 static lv_obj_t * scr;
49
-static lv_obj_t *labelExt1, * labelExt2, * labelFan, * labelZpos, * labelTime;
49
+static lv_obj_t *labelExt1, * labelFan, * labelZpos, * labelTime;
50
+TERN_(HAS_MULTI_EXTRUDER, static lv_obj_t *labelExt2;)
50 51
 static lv_obj_t *labelPause, * labelStop, * labelOperat;
51 52
 static lv_obj_t * bar1, *bar1ValueText;
52 53
 static lv_obj_t * buttonPause, *buttonOperat, *buttonStop;
@@ -137,9 +138,6 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) {
137 138
 }
138 139
 
139 140
 void lv_draw_printing(void) {
140
-  lv_obj_t *buttonExt1, *buttonExt2, *buttonFanstate, *buttonZpos, *buttonTime;
141
-  TERN_(HAS_HEATED_BED, lv_obj_t * buttonBedstate);
142
-
143 141
   disp_state_stack._disp_index = 0;
144 142
   ZERO(disp_state_stack._disp_state);
145 143
   disp_state_stack._disp_state[disp_state_stack._disp_index] = PRINTING_UI;
@@ -162,16 +160,16 @@ void lv_draw_printing(void) {
162 160
   lv_refr_now(lv_refr_get_disp_refreshing());
163 161
 
164 162
   // Create image buttons
165
-  buttonExt1 = lv_img_create(scr, NULL);
163
+  lv_obj_t *buttonExt1 = lv_img_create(scr, NULL);
166 164
   #if HAS_MULTI_EXTRUDER
167
-    buttonExt2 = lv_img_create(scr, NULL);
165
+    lv_obj_t *buttonExt2 = lv_img_create(scr, NULL);
168 166
   #endif
169 167
   #if HAS_HEATED_BED
170
-    buttonBedstate = lv_img_create(scr, NULL);
168
+    lv_obj_t *buttonBedstate = lv_img_create(scr, NULL);
171 169
   #endif
172
-  buttonFanstate = lv_img_create(scr, NULL);
173
-  buttonTime     = lv_img_create(scr, NULL);
174
-  buttonZpos     = lv_img_create(scr, NULL);
170
+  lv_obj_t *buttonFanstate = lv_img_create(scr, NULL);
171
+  lv_obj_t *buttonTime     = lv_img_create(scr, NULL);
172
+  lv_obj_t *buttonZpos     = lv_img_create(scr, NULL);
175 173
   buttonPause    = lv_imgbtn_create(scr, NULL);
176 174
   buttonStop     = lv_imgbtn_create(scr, NULL);
177 175
   buttonOperat   = lv_imgbtn_create(scr, NULL);

+ 20
- 20
Marlin/src/lcd/extui/lib/mks_ui/tft_lvgl_configuration.cpp View File

@@ -442,39 +442,39 @@ void lv_encoder_pin_init() {
442 442
   //static const int8_t encoderDirection = 1;
443 443
   //static int16_t enc_Direction;
444 444
   void lv_update_encoder() {
445
-    static uint8_t buttons;
446 445
     static uint32_t encoder_time1;
447 446
     uint32_t tmpTime, diffTime = 0;
448 447
     tmpTime = millis();
449 448
     diffTime = getTickDiff(tmpTime, encoder_time1);
450 449
     if (diffTime > 50) {
451 450
 
452
-      #if ANY_BUTTON(EN1, EN2, ENC, BACK)
451
+      #if HAS_ENCODER_WHEEL
453 452
 
454
-        uint8_t newbutton = 0;
453
+        #if ANY_BUTTON(EN1, EN2, ENC, BACK)
455 454
 
456
-        #if BUTTON_EXISTS(EN1)
457
-          if (BUTTON_PRESSED(EN1)) newbutton |= EN_A;
458
-        #endif
459
-        #if BUTTON_EXISTS(EN2)
460
-          if (BUTTON_PRESSED(EN2)) newbutton |= EN_B;
461
-        #endif
462
-        #if BUTTON_EXISTS(ENC)
463
-          if (BUTTON_PRESSED(ENC)) newbutton |= EN_C;
464
-        #endif
465
-        #if BUTTON_EXISTS(BACK)
466
-          if (BUTTON_PRESSED(BACK)) newbutton |= EN_D;
467
-        #endif
455
+          uint8_t newbutton = 0;
456
+
457
+          #if BUTTON_EXISTS(EN1)
458
+            if (BUTTON_PRESSED(EN1)) newbutton |= EN_A;
459
+          #endif
460
+          #if BUTTON_EXISTS(EN2)
461
+            if (BUTTON_PRESSED(EN2)) newbutton |= EN_B;
462
+          #endif
463
+          #if BUTTON_EXISTS(ENC)
464
+            if (BUTTON_PRESSED(ENC)) newbutton |= EN_C;
465
+          #endif
466
+          #if BUTTON_EXISTS(BACK)
467
+            if (BUTTON_PRESSED(BACK)) newbutton |= EN_D;
468
+          #endif
468 469
 
469
-      #else
470
+        #else
470 471
 
471
-        constexpr uint8_t newbutton = 0;
472
+          constexpr uint8_t newbutton = 0;
472 473
 
473
-      #endif
474
+        #endif
474 475
 
475
-      buttons = newbutton;
476 476
 
477
-      #if HAS_ENCODER_WHEEL
477
+        static uint8_t buttons = newbutton;
478 478
         static uint8_t lastEncoderBits;
479 479
 
480 480
         #define encrot0 0

+ 82
- 100
Marlin/src/lcd/extui/lib/mks_ui/wifi_upload.cpp View File

@@ -110,24 +110,17 @@ const char *resultMessages[] = {
110 110
 // 230400b always manages to connect.
111 111
 static const uint32_t uploadBaudRates[] = { 460800, 230400, 115200, 74880 };
112 112
 
113
-
114
-
115 113
 signed char IsReady() {
116 114
   return esp_upload.state == upload_idle;
117 115
 }
118 116
 
119
-
120
-
121
-
122
-
123 117
 void uploadPort_write(const uint8_t *buf, size_t len) {
124 118
   #if 0
125 119
   int i;
126 120
 
127
-  for(i = 0; i < len; i++) {
128
-    while (USART_GetFlagStatus(USART1, USART_FLAG_TC) == RESET);
129
-
130
-      USART_SendData(USART1, *(buf + i));
121
+  for (i = 0; i < len; i++) {
122
+    while (USART_GetFlagStatus(USART1, USART_FLAG_TC) == RESET) { /* nada */ }
123
+    USART_SendData(USART1, *(buf + i));
131 124
   }
132 125
   #endif
133 126
 }
@@ -138,28 +131,22 @@ char uploadPort_read() {
138 131
     return retChar;
139 132
   else
140 133
     return 0;
141
-
142 134
 }
143 135
 
144 136
 int uploadPort_available() {
145 137
   return usartFifoAvailable(&WifiRxFifo);
146 138
 }
147 139
 
148
-
149 140
 void uploadPort_begin() {
150 141
   esp_port_begin(1);
151 142
 }
152 143
 
153 144
 void uploadPort_close() {
154
-
155 145
   //WIFI_COM.end();
156 146
   //WIFI_COM.begin(115200, true);
157
-
158 147
   esp_port_begin(0);
159
-
160 148
 }
161 149
 
162
-
163 150
 void flushInput() {
164 151
   while (uploadPort_available() != 0) {
165 152
     (void)uploadPort_read();
@@ -304,7 +291,6 @@ EspUploadResult readPacket(uint8_t op, uint32_t *valp, size_t *bodyLen, uint32_t
304 291
 
305 292
   *bodyLen = 0;
306 293
 
307
-
308 294
   while (state != done) {
309 295
     uint8_t c;
310 296
     EspUploadResult stat;
@@ -322,73 +308,73 @@ EspUploadResult readPacket(uint8_t op, uint32_t *valp, size_t *bodyLen, uint32_t
322 308
     }
323 309
 
324 310
     // sufficient bytes have been received for the current state, process them
325
-    switch(state) {
326
-    case begin: // expecting frame start
327
-      c = uploadPort_read();
328
-      if (c != (uint8_t)0xC0) {
329
-        break;
330
-      }
331
-      state = header;
332
-      needBytes = 2;
311
+    switch (state) {
312
+      case begin: // expecting frame start
313
+        c = uploadPort_read();
314
+        if (c != (uint8_t)0xC0) {
315
+          break;
316
+        }
317
+        state = header;
318
+        needBytes = 2;
333 319
 
334
-      break;
335
-    case end:   // expecting frame end
336
-      c = uploadPort_read();
337
-      if (c != (uint8_t)0xC0) {
338
-        return slipFrame;
339
-      }
340
-      state = done;
320
+        break;
321
+      case end:   // expecting frame end
322
+        c = uploadPort_read();
323
+        if (c != (uint8_t)0xC0) {
324
+          return slipFrame;
325
+        }
326
+        state = done;
341 327
 
342
-      break;
328
+        break;
343 329
 
344
-    case header:  // reading an 8-byte header
345
-    case body:    // reading the response body
346
-      {
347
-        int rslt;
348
-        // retrieve a byte with SLIP decoding
349
-        rslt = ReadByte(&c, 1);
350
-        if (rslt != 1 && rslt != 2) {
351
-          // some error occurred
352
-          stat = (rslt == 0 || rslt == -2) ? slipData : slipFrame;
353
-          return stat;
354
-        }
355
-        else if (state == header) {
356
-          //store the header byte
357
-          hdr[hdrIdx++] = c;
358
-          if (hdrIdx >= headerLength) {
359
-            // get the body length, prepare a buffer for it
360
-            *bodyLen = (uint16_t)getData(2, hdr, 2);
361
-
362
-            // extract the value, if requested
363
-            if (valp != 0) {
364
-              *valp = getData(4, hdr, 4);
330
+      case header:  // reading an 8-byte header
331
+      case body:    // reading the response body
332
+        {
333
+          int rslt;
334
+          // retrieve a byte with SLIP decoding
335
+          rslt = ReadByte(&c, 1);
336
+          if (rslt != 1 && rslt != 2) {
337
+            // some error occurred
338
+            stat = (rslt == 0 || rslt == -2) ? slipData : slipFrame;
339
+            return stat;
340
+          }
341
+          else if (state == header) {
342
+            //store the header byte
343
+            hdr[hdrIdx++] = c;
344
+            if (hdrIdx >= headerLength) {
345
+              // get the body length, prepare a buffer for it
346
+              *bodyLen = (uint16_t)getData(2, hdr, 2);
347
+
348
+              // extract the value, if requested
349
+              if (valp != 0) {
350
+                *valp = getData(4, hdr, 4);
351
+              }
352
+
353
+              if (*bodyLen != 0) {
354
+                state = body;
355
+              }
356
+              else {
357
+                needBytes = 1;
358
+                state = end;
359
+              }
365 360
             }
366
-
367
-            if (*bodyLen != 0) {
368
-              state = body;
361
+          }
362
+          else {
363
+            // Store the response body byte, check for completion
364
+            if (bodyIdx < ARRAY_SIZE(respBuf)) {
365
+              respBuf[bodyIdx] = c;
369 366
             }
370
-            else {
367
+            ++bodyIdx;
368
+            if (bodyIdx >= *bodyLen) {
371 369
               needBytes = 1;
372 370
               state = end;
373 371
             }
374 372
           }
375 373
         }
376
-        else {
377
-          // Store the response body byte, check for completion
378
-          if (bodyIdx < ARRAY_SIZE(respBuf)) {
379
-            respBuf[bodyIdx] = c;
380
-          }
381
-          ++bodyIdx;
382
-          if (bodyIdx >= *bodyLen) {
383
-            needBytes = 1;
384
-            state = end;
385
-          }
386
-        }
387
-      }
388
-      break;
374
+        break;
389 375
 
390
-    default:    // this shouldn't happen
391
-      return slipState;
376
+      default:    // this shouldn't happen
377
+        return slipState;
392 378
     }
393 379
   }
394 380
 
@@ -397,7 +383,7 @@ EspUploadResult readPacket(uint8_t op, uint32_t *valp, size_t *bodyLen, uint32_t
397 383
   opRet = (uint8_t)getData(1, hdr, 1);
398 384
   // Sync packets often provoke a response with a zero opcode instead of ESP_SYNC
399 385
   if (resp != 0x01 || opRet != op) {
400
-//debug//printf("resp %02x %02x\n", resp, opRet);
386
+    //printf("resp %02x %02x\n", resp, opRet); //debug
401 387
     return respHeader;
402 388
   }
403 389
 
@@ -432,20 +418,19 @@ void _writePacket(const uint8_t *data, size_t len) {
432 418
 // 0xC0 and 0xDB replaced by the two-byte sequences {0xDB, 0xDC} and {0xDB, 0xDD} respectively.
433 419
 
434 420
 void writePacket(const uint8_t *hdr, size_t hdrLen, const uint8_t *data, size_t dataLen) {
435
-
436
-  WriteByteRaw(0xC0);       // send the packet start character
421
+  WriteByteRaw(0xC0);           // send the packet start character
437 422
   _writePacket(hdr, hdrLen);    // send the header
438
-  _writePacket(data, dataLen);    // send the data block
439
-  WriteByteRaw(0xC0);       // send the packet end character
423
+  _writePacket(data, dataLen);  // send the data block
424
+  WriteByteRaw(0xC0);           // send the packet end character
440 425
 }
441 426
 
442 427
 // Send a packet to the serial port while performing SLIP framing. The packet data comprises a header and an optional data block.
443 428
 // This is like writePacket except that it does a fast block write for both the header and the main data with no SLIP encoding. Used to send sync commands.
444 429
 void writePacketRaw(const uint8_t *hdr, size_t hdrLen, const uint8_t *data, size_t dataLen) {
445
-  WriteByteRaw(0xC0);       // send the packet start character
446
-  _writePacketRaw(hdr, hdrLen); // send the header
430
+  WriteByteRaw(0xC0);             // send the packet start character
431
+  _writePacketRaw(hdr, hdrLen);   // send the header
447 432
   _writePacketRaw(data, dataLen); // send the data block in raw mode
448
-  WriteByteRaw(0xC0);       // send the packet end character
433
+  WriteByteRaw(0xC0);             // send the packet end character
449 434
 }
450 435
 
451 436
 // Send a command to the attached device together with the supplied data, if any.
@@ -460,12 +445,10 @@ void sendCommand(uint8_t op, uint32_t checkVal, const uint8_t *data, size_t data
460 445
 
461 446
   // send the packet
462 447
   //flushInput();
463
-  if (op == ESP_SYNC) {
448
+  if (op == ESP_SYNC)
464 449
     writePacketRaw(hdr, sizeof(hdr), data, dataLen);
465
-  }
466
-  else {
450
+  else
467 451
     writePacket(hdr, sizeof(hdr), data, dataLen);
468
-  }
469 452
 }
470 453
 
471 454
 // Send a command to the attached device together with the supplied data, if any, and get the response
@@ -476,9 +459,8 @@ EspUploadResult doCommand(uint8_t op, const uint8_t *data, size_t dataLen, uint3
476 459
   sendCommand(op, checkVal, data, dataLen);
477 460
 
478 461
   stat = readPacket(op, valp, &bodyLen, msTimeout);
479
-  if (stat == success && bodyLen != 2) {
462
+  if (stat == success && bodyLen != 2)
480 463
     stat = badReply;
481
-  }
482 464
 
483 465
   return stat;
484 466
 }
@@ -611,6 +593,8 @@ EspUploadResult flashWriteBlock(uint16_t flashParmVal, uint16_t flashParmMask) {
611 593
   //printf("Upload %d\%\n", ftell(&esp_upload.uploadFile) * 100 / esp_upload.fileSize);
612 594
 
613 595
   return stat;
596
+  #else
597
+    return success;
614 598
   #endif
615 599
 }
616 600
 
@@ -625,15 +609,14 @@ void upload_spin() {
625 609
       esp_upload.uploadResult = connected;
626 610
       esp_upload.state = done;
627 611
     }
628
-    else{
612
+    else {
629 613
 
630 614
       // Reset the serial port at the new baud rate. Also reset the ESP8266.
631
-    //  const uint32_t baud = uploadBaudRates[esp_upload.connectAttemptNumber/esp_upload.retriesPerBaudRate];
615
+      //  const uint32_t baud = uploadBaudRates[esp_upload.connectAttemptNumber/esp_upload.retriesPerBaudRate];
632 616
       if (esp_upload.connectAttemptNumber % esp_upload.retriesPerBaudRate == 0) {
633 617
       }
634
-    //  uploadPort.begin(baud);
635
-    //  uploadPort_close();
636
-
618
+      //uploadPort.begin(baud);
619
+      //uploadPort_close();
637 620
 
638 621
       uploadPort_begin();
639 622
 
@@ -654,7 +637,7 @@ void upload_spin() {
654 637
       esp_upload.lastAttemptTime = getWifiTick();
655 638
       if (res == success) {
656 639
         // Successful connection
657
-//        //MessageF(" success on attempt %d\n", (connectAttemptNumber % retriesPerBaudRate) + 1);
640
+        //MessageF(" success on attempt %d\n", (connectAttemptNumber % retriesPerBaudRate) + 1);
658 641
         //printf("connect success\n");
659 642
         esp_upload.state = erasing;
660 643
       }
@@ -675,14 +658,13 @@ void upload_spin() {
675 658
       const uint32_t sectorSize = 4096;
676 659
       const uint32_t numSectors = (esp_upload.fileSize + sectorSize - 1)/sectorSize;
677 660
       const uint32_t startSector = esp_upload.uploadAddress/sectorSize;
661
+
678 662
       uint32_t headSectors = sectorsPerBlock - (startSector % sectorsPerBlock);
663
+      NOMORE(headSectors, numSectors);
679 664
 
680
-      if (numSectors < headSectors) {
681
-        headSectors = numSectors;
682
-      }
683
-            eraseSize = (numSectors < 2 * headSectors)
684
-                      ? (numSectors + 1) / 2 * sectorSize
685
-                      : (numSectors - headSectors) * sectorSize;
665
+      eraseSize = (numSectors < 2 * headSectors)
666
+                ? (numSectors + 1) / 2 * sectorSize
667
+                : (numSectors - headSectors) * sectorSize;
686 668
 
687 669
       //MessageF("Erasing %u bytes...\n", fileSize);
688 670
       esp_upload.uploadResult = flashBegin(esp_upload.uploadAddress, eraseSize);
@@ -755,7 +737,7 @@ void SendUpdateFile(const char *file, uint32_t address) {
755 737
 
756 738
   if (res !=  FR_OK) return;
757 739
 
758
-    esp_upload.fileSize = f_size(&esp_upload.uploadFile);
740
+  esp_upload.fileSize = f_size(&esp_upload.uploadFile);
759 741
   if (esp_upload.fileSize == 0) {
760 742
     f_close(&esp_upload.uploadFile);
761 743
     return;

+ 1
- 1
Marlin/src/lcd/menu/menu_delta_calibrate.cpp View File

@@ -118,7 +118,7 @@ void lcd_delta_settings() {
118 118
 }
119 119
 
120 120
 void menu_delta_calibrate() {
121
-  const bool all_homed = all_axes_homed();
121
+  TERN_(DELTA_CALIBRATION_MENU, const bool all_homed = all_axes_homed()); // Acquire ahead of loop
122 122
 
123 123
   START_MENU();
124 124
   BACK_ITEM(MSG_MAIN);

+ 1
- 2
Marlin/src/lcd/menu/menu_ubl.cpp View File

@@ -188,11 +188,10 @@ void _lcd_ubl_edit_mesh() {
188 188
    */
189 189
   void _lcd_ubl_validate_custom_mesh() {
190 190
     char ubl_lcd_gcode[24];
191
-    const int16_t temp = TERN(HAS_HEATED_BED, custom_bed_temp, 0);
192 191
     sprintf_P(ubl_lcd_gcode, PSTR("G28\nG26 C P H%" PRIi16 TERN_(HAS_HEATED_BED, " B%" PRIi16))
193 192
       , custom_hotend_temp
194 193
       #if HAS_HEATED_BED
195
-        , temp
194
+        , custom_bed_temp
196 195
       #endif
197 196
     );
198 197
     queue.inject(ubl_lcd_gcode);

+ 1
- 2
Marlin/src/module/thermistor/thermistor_666.h View File

@@ -33,8 +33,7 @@
33 33
  * B: 0.00031362
34 34
  * C: -2.03978e-07
35 35
  */
36
-#define NUMTEMPS 61
37
-const short temptable_666[NUMTEMPS][2] PROGMEM = {
36
+const temp_entry_t temptable_666[] PROGMEM = {
38 37
   { OV(  1), 794 },
39 38
   { OV( 18), 288 },
40 39
   { OV( 35), 234 },

+ 14
- 15
Marlin/src/pins/sensitive_pins.h View File

@@ -608,12 +608,6 @@
608 608
   #define _Z_PROBE
609 609
 #endif
610 610
 
611
-#if TEMP_SENSOR_BED && PIN_EXISTS(HEATER_BED)
612
-  #define _HEATER_BED HEATER_BED_PIN,
613
-#else
614
-  #define _HEATER_BED
615
-#endif
616
-
617 611
 #if PIN_EXISTS(FAN)
618 612
   #define _FAN0 FAN_PIN,
619 613
 #else
@@ -660,21 +654,26 @@
660 654
   #define _FANC
661 655
 #endif
662 656
 
663
-#if PIN_EXISTS(HEATER_BED) && PIN_EXISTS(TEMP_BED)
657
+#if TEMP_SENSOR_BED && PINS_EXIST(TEMP_BED, HEATER_BED)
664 658
   #define _BED_PINS HEATER_BED_PIN, analogInputToDigitalPin(TEMP_BED_PIN),
665 659
 #else
666 660
   #define _BED_PINS
667 661
 #endif
668 662
 
669
-#if PIN_EXISTS(TEMP_CHAMBER)
670
-  #define __CHAMBER_PINS CHAMBER_AUTO_FAN_PIN, analogInputToDigitalPin(TEMP_CHAMBER_PIN),
663
+#if TEMP_SENSOR_CHAMBER && PIN_EXISTS(TEMP_CHAMBER)
664
+  #define _CHAMBER_TEMP analogInputToDigitalPin(TEMP_CHAMBER_PIN),
665
+#else
666
+  #define _CHAMBER_TEMP
667
+#endif
668
+#if TEMP_SENSOR_CHAMBER && PINS_EXIST(TEMP_CHAMBER, HEATER_CHAMBER)
669
+  #define _CHAMBER_HEATER HEATER_CHAMBER_PIN,
671 670
 #else
672
-  #define __CHAMBER_PINS
671
+  #define _CHAMBER_HEATER
673 672
 #endif
674
-#if PIN_EXISTS(HEATER_CHAMBER)
675
-  #define _CHAMBER_PINS __CHAMBER_PINS HEATER_CHAMBER_PIN,
673
+#if TEMP_SENSOR_CHAMBER && PINS_EXIST(TEMP_CHAMBER, CHAMBER_AUTO_FAN)
674
+  #define _CHAMBER_FAN CHAMBER_AUTO_FAN_PIN,
676 675
 #else
677
-  #define _CHAMBER_PINS
676
+  #define _CHAMBER_FAN
678 677
 #endif
679 678
 
680 679
 #ifndef HAL_SENSITIVE_PINS
@@ -685,6 +684,6 @@
685 684
   _X_PINS _Y_PINS _Z_PINS _X2_PINS _Y2_PINS _Z2_PINS _Z3_PINS _Z4_PINS _Z_PROBE \
686 685
   _E0_PINS _E1_PINS _E2_PINS _E3_PINS _E4_PINS _E5_PINS _E6_PINS _E7_PINS \
687 686
   _H0_PINS _H1_PINS _H2_PINS _H3_PINS _H4_PINS _H5_PINS _H6_PINS _H7_PINS \
688
-  _PS_ON _HEATER_BED _FAN0 _FAN1 _FAN2 _FAN3 _FAN4 _FAN5 _FAN6 _FAN7 _FANC \
689
-  _BED_PINS _CHAMBER_PINS HAL_SENSITIVE_PINS \
687
+  _PS_ON _FAN0 _FAN1 _FAN2 _FAN3 _FAN4 _FAN5 _FAN6 _FAN7 _FANC \
688
+  _BED_PINS _CHAMBER_TEMP _CHAMBER_HEATER _CHAMBER_FAN HAL_SENSITIVE_PINS \
690 689
 }

+ 1
- 0
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h View File

@@ -200,6 +200,7 @@
200 200
 #elif SD_CONNECTION_IS(ONBOARD)
201 201
   #define SDIO_SUPPORT
202 202
   #define SD_DETECT_PIN                     PD12
203
+  #define ONBOARD_SD_CS_PIN                 PC11
203 204
 #elif SD_CONNECTION_IS(CUSTOM_CABLE)
204 205
   #error "No custom SD drive cable defined for this board."
205 206
 #endif

Loading…
Cancel
Save