Merge pull request #870 from XPila/MK3

Mk3
This commit is contained in:
PavelSindler 2018-06-25 17:36:22 +02:00 committed by GitHub
commit 0fccf5a737
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 3 deletions

View file

@ -1174,11 +1174,17 @@ void setup()
selectedSerialPort = eeprom_read_byte((uint8_t*)EEPROM_SECOND_SERIAL_ACTIVE);
if (selectedSerialPort == 0xFF) selectedSerialPort = 0;
if (farm_mode)
{
{
no_response = true; //we need confirmation by recieving PRUSA thx
important_status = 8;
prusa_statistics(8);
selectedSerialPort = 1;
//increased extruder current (PFW363)
tmc2130_current_h[E_AXIS] = 36;
tmc2130_current_r[E_AXIS] = 36;
//disabled filament autoload (PFW360)
filament_autoload_enabled = false;
eeprom_update_byte((uint8_t*)EEPROM_FSENS_AUTOLOAD_ENABLED, 0);
}
MYSERIAL.begin(BAUDRATE);
fdev_setup_stream(uartout, uart_putchar, NULL, _FDEV_SETUP_WRITE); //setup uart out stream
@ -3274,7 +3280,13 @@ void process_commands()
} else if (code_seen("RESET")) {
// careful!
if (farm_mode) {
asm volatile(" jmp 0x3E000");
#ifdef WATCHDOG
wdt_enable(WDTO_15MS);
cli();
while(1);
#else //WATCHDOG
asm volatile("jmp 0x3E000");
#endif //WATCHDOG
}
else {
MYSERIAL.println("Not in farm mode.");

View file

@ -7451,7 +7451,9 @@ static void lcd_send_status() {
//send important status messages periodicaly
prusa_statistics(important_status, saved_filament_type);
NcTime = millis();
#ifdef FARM_CONNECT_MESSAGE
lcd_connect_printer();
#endif //FARM_CONNECT_MESSAGE
}
}

View file

@ -828,7 +828,7 @@ if (print_sd_status)
// Farm number display
if (farm_mode)
{
lcd.setCursor(0, 6);
lcd.setCursor(6, 2);
lcd_printPGM(PSTR(" F"));
lcd.print(farm_no);
lcd_printPGM(PSTR(" "));

View file

@ -468,6 +468,8 @@
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED
//connect message when communication with monitoring broken
//#define FARM_CONNECT_MESSAGE
/*-----------------------------------
PREHEAT SETTINGS