Bladeren bron

card.transfer_port => transfer_port_index

Scott Lahteine 6 jaren geleden
bovenliggende
commit
2c10222e87

+ 6
- 6
Marlin/src/gcode/queue.cpp Bestand weergeven

367
         stream_state = StreamState::PACKET_TIMEOUT;
367
         stream_state = StreamState::PACKET_TIMEOUT;
368
         return false;
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
       packet.timeout = millis() + STREAM_MAX_WAIT;
372
       packet.timeout = millis() + STREAM_MAX_WAIT;
373
       return true;
373
       return true;
374
     }
374
     }
379
       millis_t transfer_timeout = millis() + RX_TIMESLICE;
379
       millis_t transfer_timeout = millis() + RX_TIMESLICE;
380
 
380
 
381
       #if ENABLED(SDSUPPORT)
381
       #if ENABLED(SDSUPPORT)
382
-        PORT_REDIRECT(card.transfer_port);
382
+        PORT_REDIRECT(card.transfer_port_index);
383
       #endif
383
       #endif
384
 
384
 
385
       while (PENDING(millis(), transfer_timeout)) {
385
       while (PENDING(millis(), transfer_timeout)) {
491
               stream_state = StreamState::PACKET_RESEND;
491
               stream_state = StreamState::PACKET_RESEND;
492
               break;
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
             packet.timeout = millis() + STREAM_MAX_WAIT;
496
             packet.timeout = millis() + STREAM_MAX_WAIT;
497
             break;
497
             break;
498
           case StreamState::PACKET_TIMEOUT:
498
           case StreamState::PACKET_TIMEOUT:
558
        * receive buffer (which limits the packet size to MAX_CMD_SIZE).
558
        * receive buffer (which limits the packet size to MAX_CMD_SIZE).
559
        * The receive buffer also limits the packet size for reliable transmission.
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
       return;
562
       return;
563
     }
563
     }
564
   #endif
564
   #endif

+ 1
- 1
Marlin/src/gcode/sdcard/M20-M30_M32-M34_M524_M928.cpp Bestand weergeven

192
       SERIAL_ECHOLN(p);
192
       SERIAL_ECHOLN(p);
193
       card.openFile(p, false);
193
       card.openFile(p, false);
194
       #if NUM_SERIAL > 1
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
       #endif
196
       #endif
197
     }
197
     }
198
     else
198
     else

+ 1
- 1
Marlin/src/sd/cardreader.cpp Bestand weergeven

52
 int8_t CardReader::autostart_index;
52
 int8_t CardReader::autostart_index;
53
 
53
 
54
 #if ENABLED(BINARY_FILE_TRANSFER) && NUM_SERIAL > 1
54
 #if ENABLED(BINARY_FILE_TRANSFER) && NUM_SERIAL > 1
55
-  int8_t CardReader::transfer_port;
55
+  int8_t CardReader::transfer_port_index;
56
 #endif
56
 #endif
57
 
57
 
58
 // private:
58
 // private:

+ 2
- 2
Marlin/src/sd/cardreader.h Bestand weergeven

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

Laden…
Annuleren
Opslaan