Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Marlin/Marlin.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ typedef unsigned long millis_t;

#ifdef USBCON
#if ENABLED(BLUETOOTH)
#define MYSERIAL bt
#define MYSERIAL BluetoothSerial
#else
#define MYSERIAL Serial
#endif // BLUETOOTH
#else
#define MYSERIAL MSerial
#define MYSERIAL MarlinCustomizedSerial
#endif

#define SERIAL_CHAR(x) MYSERIAL.write(x)
Expand Down
4 changes: 2 additions & 2 deletions Marlin/MarlinSerial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,12 +281,12 @@ void MarlinSerial::printFloat(double number, uint8_t digits) {
// Preinstantiate Objects //////////////////////////////////////////////////////


MarlinSerial MSerial;
MarlinSerial MarlinCustomizedSerial;

#endif // whole file
#endif // !USBCON

// For AT90USB targets use the UART for BT interfacing
#if defined(USBCON) && ENABLED(BLUETOOTH)
HardwareSerial bt;
HardwareSerial BluetoothSerial;
#endif
6 changes: 3 additions & 3 deletions Marlin/MarlinSerial.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,12 @@ class MarlinSerial { //: public Stream
void println(void);
};

extern MarlinSerial MSerial;
extern MarlinSerial MarlinCustomizedSerial;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are correct about instance. I wasn't thinking about it too much and just followed "MSerial". So, it, too, was improperly formatted.

Do you want to do the global change, or shall I? (It's trivial to do in TextMate)

#endif // !USBCON

// Use the UART for BT in AT90USB configurations
// Use the UART for Bluetooth in AT90USB configurations
#if defined(USBCON) && ENABLED(BLUETOOTH)
extern HardwareSerial bt;
extern HardwareSerial BluetoothSerial;
#endif

#endif
2 changes: 1 addition & 1 deletion Marlin/stepper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ ISR(TIMER1_COMPA_vect) {
// Take multiple steps per interrupt (For high speed moves)
for (int8_t i = 0; i < step_loops; i++) {
#ifndef USBCON
MSerial.checkRx(); // Check for serial chars.
MarlinCustomizedSerial.checkRx(); // Check for serial chars.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As with the others here, MarlinCustomizedSerial is an instance and not a class. Instance names should start with a lowercase letter.

#endif

#if ENABLED(ADVANCE)
Expand Down