浏览代码

card.transfer_port => transfer_port_index

Scott Lahteine 6 年前
父节点
当前提交
2c10222e87

+ 6
- 6
Marlin/src/gcode/queue.cpp 查看文件

@@ -367,8 +367,8 @@ void gcode_line_error(PGM_P const err, const int8_t port) {
367 367
         stream_state = StreamState::PACKET_TIMEOUT;
368 368
         return false;
369 369
       }
370
-      if (!serial_data_available(card.transfer_port)) return false;
371
-      data = read_serial(card.transfer_port);
370
+      if (!serial_data_available(card.transfer_port_index)) return false;
371
+      data = read_serial(card.transfer_port_index);
372 372
       packet.timeout = millis() + STREAM_MAX_WAIT;
373 373
       return true;
374 374
     }
@@ -379,7 +379,7 @@ void gcode_line_error(PGM_P const err, const int8_t port) {
379 379
       millis_t transfer_timeout = millis() + RX_TIMESLICE;
380 380
 
381 381
       #if ENABLED(SDSUPPORT)
382
-        PORT_REDIRECT(card.transfer_port);
382
+        PORT_REDIRECT(card.transfer_port_index);
383 383
       #endif
384 384
 
385 385
       while (PENDING(millis(), transfer_timeout)) {
@@ -491,8 +491,8 @@ void gcode_line_error(PGM_P const err, const int8_t port) {
491 491
               stream_state = StreamState::PACKET_RESEND;
492 492
               break;
493 493
             }
494
-            if (!serial_data_available(card.transfer_port)) break;
495
-            read_serial(card.transfer_port); // throw away data
494
+            if (!serial_data_available(card.transfer_port_index)) break;
495
+            read_serial(card.transfer_port_index); // throw away data
496 496
             packet.timeout = millis() + STREAM_MAX_WAIT;
497 497
             break;
498 498
           case StreamState::PACKET_TIMEOUT:
@@ -558,7 +558,7 @@ inline void get_serial_commands() {
558 558
        * receive buffer (which limits the packet size to MAX_CMD_SIZE).
559 559
        * The receive buffer also limits the packet size for reliable transmission.
560 560
        */
561
-      binaryStream.receive(serial_line_buffer[card.transfer_port]);
561
+      binaryStream.receive(serial_line_buffer[card.transfer_port_index]);
562 562
       return;
563 563
     }
564 564
   #endif

+ 1
- 1
Marlin/src/gcode/sdcard/M20-M30_M32-M34_M524_M928.cpp 查看文件

@@ -192,7 +192,7 @@ void GcodeSuite::M28() {
192 192
       SERIAL_ECHOLN(p);
193 193
       card.openFile(p, false);
194 194
       #if NUM_SERIAL > 1
195
-        card.transfer_port = command_queue_port[cmd_queue_index_r];
195
+        card.transfer_port_index = command_queue_port[cmd_queue_index_r];
196 196
       #endif
197 197
     }
198 198
     else

+ 1
- 1
Marlin/src/sd/cardreader.cpp 查看文件

@@ -52,7 +52,7 @@ char CardReader::filename[FILENAME_LENGTH], CardReader::longFilename[LONG_FILENA
52 52
 int8_t CardReader::autostart_index;
53 53
 
54 54
 #if ENABLED(BINARY_FILE_TRANSFER) && NUM_SERIAL > 1
55
-  int8_t CardReader::transfer_port;
55
+  int8_t CardReader::transfer_port_index;
56 56
 #endif
57 57
 
58 58
 // private:

+ 2
- 2
Marlin/src/sd/cardreader.h 查看文件

@@ -147,9 +147,9 @@ public:
147 147
 
148 148
   #if ENABLED(BINARY_FILE_TRANSFER)
149 149
     #if NUM_SERIAL > 1
150
-      static int8_t transfer_port;
150
+      static int8_t transfer_port_index;
151 151
     #else
152
-      static constexpr int8_t transfer_port = 0;
152
+      static constexpr int8_t transfer_port_index = 0;
153 153
     #endif
154 154
   #endif
155 155
 

正在加载...
取消
保存