Serial communication uses port0 or port1, not both, removed some suspected code.

build 141
This commit is contained in:
Robert Pelnar 2017-12-29 00:06:47 +01:00
parent 8e63098504
commit e3c006dbe9
6 changed files with 15174 additions and 15077 deletions

View file

@ -9,7 +9,7 @@
// Firmware version // Firmware version
#define FW_version "3.1.1-RC4" #define FW_version "3.1.1-RC4"
#define FW_build 140s #define FW_build 141
//#define FW_build --BUILD-NUMBER-- //#define FW_build --BUILD-NUMBER--
#define FW_version_build FW_version " b" STR(FW_build) #define FW_version_build FW_version " b" STR(FW_build)

File diff suppressed because it is too large Load diff

View file

@ -53,36 +53,41 @@ FORCE_INLINE void store_char(unsigned char c)
#if defined(M_USARTx_RX_vect) #if defined(M_USARTx_RX_vect)
// fixed by Mark Sproul this is on the 644/644p // fixed by Mark Sproul this is on the 644/644p
//SIGNAL(SIG_USART_RECV) //SIGNAL(SIG_USART_RECV)
SIGNAL(M_USARTx_RX_vect) SIGNAL(M_USARTx_RX_vect)
{ {
// Test for a framing error. // Test for a framing error.
if (M_UCSRxA & (1<<M_FEx)) { if (M_UCSRxA & (1<<M_FEx))
// Characters received with the framing errors will be ignored. {
// Dummy register read (discard) // Characters received with the framing errors will be ignored.
(void)(*(char *)M_UDRx); // Dummy register read (discard)
} else { (void)(*(char *)M_UDRx);
// Read the input register. }
unsigned char c = M_UDRx; else
store_char(c); {
} // Read the input register.
} unsigned char c = M_UDRx;
if (selectedSerialPort == 0)
store_char(c);
}
}
#ifndef SNMM #ifndef SNMM
SIGNAL(USART1_RX_vect) SIGNAL(USART1_RX_vect)
{ {
if (selectedSerialPort == 1) { // Test for a framing error.
// Test for a framing error. if (UCSR1A & (1<<FE1))
if (UCSR1A & (1<<FE1)) { {
// Characters received with the framing errors will be ignored. // Characters received with the framing errors will be ignored.
// Dummy register read (discard) // Dummy register read (discard)
(void)(*(char *)UDR1); (void)(*(char *)UDR1);
} else { }
// Read the input register. else
unsigned char c = UDR1; {
store_char(c); // Read the input register.
unsigned char c = UDR1;
} if (selectedSerialPort == 1)
} store_char(c);
} }
}
#endif #endif
#endif #endif

View file

@ -374,12 +374,12 @@ void get_command()
rx_buffer_full = true; //sets flag that buffer was full rx_buffer_full = true; //sets flag that buffer was full
} }
char serial_char = MYSERIAL.read(); char serial_char = MYSERIAL.read();
if (selectedSerialPort == 1) /* if (selectedSerialPort == 1)
{ {
selectedSerialPort = 0; selectedSerialPort = 0;
MYSERIAL.write(serial_char); // for debuging serial line 2 in farm_mode MYSERIAL.write(serial_char); // for debuging serial line 2 in farm_mode
selectedSerialPort = 1; selectedSerialPort = 1;
} } */ //RP - removed
TimeSent = millis(); TimeSent = millis();
TimeNow = millis(); TimeNow = millis();

View file

@ -662,9 +662,9 @@ void isr() {
} }
for(uint8_t i=0; i < step_loops; i++) { // Take multiple steps per interrupt (For high speed moves) for(uint8_t i=0; i < step_loops; i++) { // Take multiple steps per interrupt (For high speed moves)
#ifndef AT90USB /* #ifndef AT90USB
MSerial.checkRx(); // Check for serial chars. MSerial.checkRx(); // Check for serial chars.
#endif #endif*/ //RP - removed
#ifdef LIN_ADVANCE #ifdef LIN_ADVANCE
counter_e += current_block->steps_e; counter_e += current_block->steps_e;

View file

@ -3830,7 +3830,7 @@ static void lcd_settings_menu()
else { else {
MENU_ITEM(function, MSG_TEMP_CALIBRATION_ON, lcd_temp_calibration_set); MENU_ITEM(function, MSG_TEMP_CALIBRATION_ON, lcd_temp_calibration_set);
} }
if (selectedSerialPort == false) { if (selectedSerialPort == 0) {
MENU_ITEM(function, MSG_SECOND_SERIAL_OFF, lcd_second_serial_set); MENU_ITEM(function, MSG_SECOND_SERIAL_OFF, lcd_second_serial_set);
} }
else { else {