Fix binary protocol with one serial port (#13270)

- The `sdcard.transfer_port` variable is Marlin's internal serial port index, not the physical serial port number.
- Added packet number to "ok" response so hosts don't need to wait for the ACK.
- Renamed feature to `BINARY_FILE_TRANSFER`, as the speed up is only consequential to the ability to transfer binaries over serial.
This commit is contained in:
Chris Pepper
2019-02-28 01:57:48 +00:00
committed by Scott Lahteine
parent ab781de5a0
commit 4ab433d391
78 changed files with 124 additions and 121 deletions

View File

@@ -42,7 +42,7 @@ typedef struct {
detected:1,
filenameIsDir:1,
abort_sd_printing:1
#if ENABLED(FAST_FILE_TRANSFER)
#if ENABLED(BINARY_FILE_TRANSFER)
, binary_mode:1
#endif
;
@@ -145,11 +145,11 @@ public:
static char filename[FILENAME_LENGTH], longFilename[LONG_FILENAME_LENGTH];
static int8_t autostart_index;
#if ENABLED(FAST_FILE_TRANSFER)
#if ENABLED(BINARY_FILE_TRANSFER)
#if NUM_SERIAL > 1
static int8_t transfer_port;
#else
static constexpr int8_t transfer_port = SERIAL_PORT;
static constexpr int8_t transfer_port = 0;
#endif
#endif