Merge pull request #358 from XPila/MK3
Serial communication uses port0 or port1, not both, removed some susp…
This commit is contained in:
commit
07fe9abe44
6 changed files with 15174 additions and 15077 deletions
|
@ -9,7 +9,7 @@
|
|||
|
||||
// Firmware version
|
||||
#define FW_version "3.1.1-RC4"
|
||||
#define FW_build 140s
|
||||
#define FW_build 141
|
||||
//#define FW_build --BUILD-NUMBER--
|
||||
#define FW_version_build FW_version " b" STR(FW_build)
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -56,31 +56,36 @@ FORCE_INLINE void store_char(unsigned char c)
|
|||
SIGNAL(M_USARTx_RX_vect)
|
||||
{
|
||||
// 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)
|
||||
(void)(*(char *)M_UDRx);
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
// Read the input register.
|
||||
unsigned char c = M_UDRx;
|
||||
if (selectedSerialPort == 0)
|
||||
store_char(c);
|
||||
}
|
||||
}
|
||||
#ifndef SNMM
|
||||
SIGNAL(USART1_RX_vect)
|
||||
{
|
||||
if (selectedSerialPort == 1) {
|
||||
// Test for a framing error.
|
||||
if (UCSR1A & (1<<FE1)) {
|
||||
if (UCSR1A & (1<<FE1))
|
||||
{
|
||||
// Characters received with the framing errors will be ignored.
|
||||
// Dummy register read (discard)
|
||||
(void)(*(char *)UDR1);
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
// Read the input register.
|
||||
unsigned char c = UDR1;
|
||||
if (selectedSerialPort == 1)
|
||||
store_char(c);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -374,12 +374,12 @@ void get_command()
|
|||
rx_buffer_full = true; //sets flag that buffer was full
|
||||
}
|
||||
char serial_char = MYSERIAL.read();
|
||||
if (selectedSerialPort == 1)
|
||||
/* if (selectedSerialPort == 1)
|
||||
{
|
||||
selectedSerialPort = 0;
|
||||
MYSERIAL.write(serial_char); // for debuging serial line 2 in farm_mode
|
||||
selectedSerialPort = 1;
|
||||
}
|
||||
} */ //RP - removed
|
||||
TimeSent = millis();
|
||||
TimeNow = millis();
|
||||
|
||||
|
|
|
@ -662,9 +662,9 @@ void isr() {
|
|||
}
|
||||
|
||||
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.
|
||||
#endif
|
||||
#endif*/ //RP - removed
|
||||
|
||||
#ifdef LIN_ADVANCE
|
||||
counter_e += current_block->steps_e;
|
||||
|
|
|
@ -3830,7 +3830,7 @@ static void lcd_settings_menu()
|
|||
else {
|
||||
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);
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in a new issue