8 Commits

Author SHA1 Message Date
David Ramiro
2c53c33d52 Tweak M600 display resume
- Add startFileprint(); call to M108 display routine to fix progress and ensure "printing done" gets shown
- Add SD printing check in marlin_main.cpp M600 routine to skip TFTstate if not necessary (e.g. USB printing)
- Move routine to the top again to ensure immediate execution
2019-02-24 15:48:03 +01:00
David Ramiro
8fc01144f1 Set SDPAUSE state on M600 regardless of prior TFTstate
Move the routine to a better position and set the state regardless of SDPRINT status.

This ensures that M600 makes the display show a continue button every time. Before, it was only behaving correctly for the first instance of M600.
2019-02-23 11:16:29 +01:00
David Ramiro
8448c67846 Streamline build identification 2019-02-23 00:31:25 +01:00
David Ramiro
e822d53f2f Merge branch 'master' into dev 2019-02-23 00:26:33 +01:00
David Ramiro
30bbf59cb0 Increase filament rounout trigger delay
In some cases, the filament runout was triggered erratically, we are now waiting for the trigger to last a few moments until we start the routine.
2019-02-22 22:26:58 +01:00
David Ramiro
0f5745e281 Update README.md 2019-02-21 10:30:21 +01:00
David Ramiro
d6f2b7dcf2 Update README.md 2019-02-19 19:15:28 +01:00
David Ramiro
b25aa626e7 Update semantic versioning 2019-02-18 20:01:22 +01:00
6 changed files with 64 additions and 37 deletions

View File

@@ -264,13 +264,14 @@ void AnycubicTFTClass::FilamentChangeResume(){
HOTEND_LOOP() thermalManager.reset_heater_idle_timer(e); // resume heating if timed out
wait_for_heatup = false;
wait_for_user = false; // remove waiting flags
// TFTstate=ANYCUBIC_TFT_STATE_SDPRINT;
card.startFileprint(); // resume with proper progress state
#ifdef ANYCUBIC_TFT_DEBUG
SERIAL_ECHOLNPGM("DEBUG: M108 Resume called");
#endif
}
void AnycubicTFTClass::FilamentChangePause(){
PausedByFilamentChange=true;
enqueue_and_echo_commands_P(PSTR("M600"));
TFTstate=ANYCUBIC_TFT_STATE_SDPAUSE_REQ; // set TFT state to paused
#ifdef ANYCUBIC_TFT_DEBUG
@@ -329,7 +330,6 @@ void AnycubicTFTClass::HandleSpecialMenu()
enqueue_and_echo_commands_P(PSTR("G91\nG1 Z-0.1\nG90"));
} else if (strcmp(SelectedDirectory, "<filamentchange pause>")==0) {
SERIAL_PROTOCOLLNPGM("Special Menu: FilamentChange Pause");
PausedByFilamentChange=true;
FilamentChangePause();
} else if (strcmp(SelectedDirectory, "<filamentchange resume>")==0) {
SERIAL_PROTOCOLLNPGM("Special Menu: FilamentChange Resume");
@@ -606,7 +606,7 @@ void AnycubicTFTClass::FilamentRunout()
if(FilamentTestStatus>FilamentTestLastStatus)
{
FilamentRunoutCounter++;
if(FilamentRunoutCounter>=15800)
if(FilamentRunoutCounter>=31600)
{
FilamentRunoutCounter=0;
#ifdef SDSUPPORT

View File

@@ -81,10 +81,10 @@
// User-specified version info of this build to display in [Pronterface, etc] terminal window during
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
// build by the user have been successfully uploaded into firmware.
#define STRING_CONFIG_H_AUTHOR "(davidramiro, for Anycubic i3 Mega)" // Who made the changes.
#define STRING_CONFIG_H_AUTHOR "(davidramiro)" // Who made the changes.
#define SHOW_BOOTSCREEN
#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2
#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
#define STRING_SPLASH_LINE2 CUSTOM_BUILD_VERSION // will be shown during bootup in line 2
/**
* *** VENDORS PLEASE READ ***

View File

@@ -8508,7 +8508,7 @@ inline void gcode_M109() {
#ifdef ANYCUBIC_TFT_MODEL
AnycubicTFT.CommandScan();
#endif
#if TEMP_RESIDENCY_TIME > 0
const float temp_diff = ABS(target_temp - temp);
@@ -8547,11 +8547,11 @@ inline void gcode_M109() {
#ifdef ANYCUBIC_TFT_MODEL
AnycubicTFT.HeatingDone();
#endif
#if DISABLED(BUSY_WHILE_HEATING)
KEEPALIVE_STATE(IN_HANDLER);
#endif
// flush the serial buffer after heating to prevent lockup by m105
SERIAL_FLUSH();
@@ -8665,11 +8665,11 @@ inline void gcode_M109() {
}
}
#endif
#ifdef ANYCUBIC_TFT_MODEL
AnycubicTFT.CommandScan();
#endif
#if TEMP_BED_RESIDENCY_TIME > 0
const float temp_diff = ABS(target_temp - temp);
@@ -8697,16 +8697,16 @@ inline void gcode_M109() {
}
} while (wait_for_heatup && TEMP_BED_CONDITIONS);
#ifdef ANYCUBIC_TFT_MODEL
AnycubicTFT.BedHeatingDone();
#endif
if (wait_for_heatup) lcd_reset_status();
#if DISABLED(BUSY_WHILE_HEATING)
KEEPALIVE_STATE(IN_HANDLER);
#endif
// flush the serial buffer after heating to prevent lockup by m105
SERIAL_FLUSH();
}
@@ -8904,7 +8904,7 @@ inline void gcode_M111() {
#if ENABLED(ULTIPANEL)
lcd_reset_status();
#endif
#ifdef ANYCUBIC_TFT_MODEL
AnycubicTFT.CommandScan();
#endif
@@ -8940,7 +8940,7 @@ inline void gcode_M81() {
#if ENABLED(ULTIPANEL)
LCD_MESSAGEPGM(MACHINE_NAME " " MSG_OFF ".");
#endif
#ifdef ANYCUBIC_TFT_MODEL
AnycubicTFT.CommandScan();
#endif
@@ -10992,12 +10992,23 @@ inline void gcode_M502() {
* Default values are used for omitted arguments.
*/
inline void gcode_M600() {
#ifdef SDSUPPORT
if ((AnycubicTFT.TFTstate==ANYCUBIC_TFT_STATE_SDPRINT)){
AnycubicTFT.TFTstate=ANYCUBIC_TFT_STATE_SDPAUSE_REQ;
AnycubicTFT.PausedByFilamentChange=true;
}
if (card.sdprinting) { // are we printing from sd?
#ifdef ANYCUBIC_TFT_DEBUG
SERIAL_ECHOLNPGM("DEBUG: Enter M600 TFTstate routine");
#endif
AnycubicTFT.TFTstate=ANYCUBIC_TFT_STATE_SDPAUSE_REQ; // enter correct display state to show resume button
#ifdef ANYCUBIC_TFT_DEBUG
SERIAL_ECHOLNPGM("DEBUG: Set TFTstate to SDPAUSE_REQ");
#endif
AnycubicTFT.PausedByFilamentChange=true; // set flag to ensure correct resume routine gets executed
#ifdef ANYCUBIC_TFT_DEBUG
SERIAL_ECHOLNPGM("DEBUG: Set filament change flag");
#endif
}
#endif
point_t park_point = NOZZLE_PARK_POINT;
if (get_target_extruder_from_command(600)) return;
@@ -14746,7 +14757,7 @@ void manage_inactivity(const bool ignore_stepper_queue/*=false*/) {
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
runout.run();
#endif
#if ENABLED(ANYCUBIC_TFT_MODEL) && ENABLED(ANYCUBIC_FILAMENT_RUNOUT_SENSOR)
AnycubicTFT.FilamentRunout();
#endif
@@ -14954,7 +14965,7 @@ void idle(
#ifdef ANYCUBIC_TFT_MODEL
AnycubicTFT.CommandScan();
#endif
lcd_update();
host_keepalive();
@@ -15011,7 +15022,7 @@ void kill(const char* lcd_msg) {
#else
UNUSED(lcd_msg);
#endif
#ifdef ANYCUBIC_TFT_MODEL
// Kill AnycubicTFT
AnycubicTFT.KillTFT();
@@ -15106,7 +15117,7 @@ void setup() {
MYSERIAL0.begin(BAUDRATE);
SERIAL_PROTOCOLLNPGM("start");
SERIAL_ECHO_START();
#ifdef ANYCUBIC_TFT_MODEL
// Setup AnycubicTFT
AnycubicTFT.Setup();
@@ -15132,6 +15143,9 @@ void setup() {
SERIAL_ECHOPGM(MSG_MARLIN);
SERIAL_CHAR(' ');
SERIAL_ECHOLNPGM(SHORT_BUILD_VERSION);
SERIAL_ECHOPGM(MSG_MARLIN_AI3M);
SERIAL_CHAR(' ');
SERIAL_ECHOLNPGM(CUSTOM_BUILD_VERSION);
SERIAL_EOL();
#if defined(STRING_DISTRIBUTION_DATE) && defined(STRING_CONFIG_H_AUTHOR)

View File

@@ -37,18 +37,24 @@
*/
#define SHORT_BUILD_VERSION "1.1.9"
/**
* Defines the version of the Marlin-AI3M build. Not to be confused with
* Marlin's own build number, e.g. 1.1.9.
*/
#define CUSTOM_BUILD_VERSION "v1.4.2"
/**
* Verbose version identifier which should contain a reference to the location
* from where the binary was downloaded or the source code was compiled.
*/
#define DETAILED_BUILD_VERSION SHORT_BUILD_VERSION " (Github, davidramiro)"
#define DETAILED_BUILD_VERSION SHORT_BUILD_VERSION "(Github, davidramiro)"
/**
* The STRING_DISTRIBUTION_DATE represents when the binary file was built,
* here we define this default string as the date where the latest release
* version was tagged.
*/
#define STRING_DISTRIBUTION_DATE "2019-02-18"
#define STRING_DISTRIBUTION_DATE "2019-02-24"
/**
* Required minimum Configuration.h and Configuration_adv.h file versions.
@@ -78,7 +84,7 @@
* has a distinct Github fork— the Source Code URL should just be the main
* Marlin repository.
*/
#define SOURCE_CODE_URL "https://github.com/MarlinFirmware/Marlin"
#define SOURCE_CODE_URL "https://github.com/davidramiro/Marlin-AI3M"
/**
* Default generic printer UUID.

View File

@@ -137,7 +137,8 @@
#define MSG_INVALID_EXTRUDER "Invalid extruder"
#define MSG_INVALID_SOLENOID "Invalid solenoid"
#define MSG_ERR_NO_THERMISTORS "No thermistors - no temperature"
#define MSG_M115_REPORT "FIRMWARE_NAME:Marlin " DETAILED_BUILD_VERSION " SOURCE_CODE_URL:" SOURCE_CODE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) " UUID:" MACHINE_UUID
#define MSG_M115_REPORT "FIRMWARE_NAME:Marlin " DETAILED_BUILD_VERSION " SOURCE_CODE_URL:" SOURCE_CODE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) " UUID:" MACHINE_UUID " MARLIN-AI3M_VERSION:" CUSTOM_BUILD_VERSION
#define MSG_MARLIN_AI3M "Marlin-AI3M"
#define MSG_COUNT_X " Count X:"
#define MSG_COUNT_A " Count A:"
#define MSG_ERR_KILLED "Printer halted. kill() called!"

View File

@@ -9,17 +9,20 @@ Feel free to discuss issues and work with me further optimizing this firmware!
I am running this version on an i3 Mega Ultrabase V3 (for distinction of the different versions, check [this Thingiverse thread](https://www.thingiverse.com/groups/anycubic-i3-mega/forums/general/topic:27064)).
Basically, this should work on every Ultrabase version that has two Z-axis endstops.
The new Mega-S should work too, but you will need to enter those two commands to make the new extruder work:
The new **Mega-S** should work too, but you will need to enter those two commands to make the new extruder work:
```
M92 E384
M500
```
Afterwards, calibration is highly recommended as per the instructions on the [Wiki](https://github.com/davidramiro/Marlin-AI3M/wiki/Extruder-Calibration/).
Afterwards, calibration is highly recommended as per the instructions on the [Wiki](https://github.com/davidramiro/Marlin-AI3M/wiki/Calibration/).
Looking for a **BLtouch firmware**? Head [this way](https://github.com/MNieddu91/Marlin-AI3M-BLTouch)! Mounting and configuration instructions are included.
Note: This is just a firmware, not magic. A big part of print quality still depends on your slicer settings and mechanical condition of your machine.
#### Make sure to take a look at the [Wiki](https://github.com/davidramiro/Marlin-AI3M/wiki/), especially the [FAQ](https://github.com/davidramiro/Marlin-AI3M/wiki/Frequently-Asked-Questions).
A German translation of the instructions can be found [here](https://kore.cc/i3mega/download/marlin-ai3m_german.pdf).
## Known issues:
@@ -27,7 +30,7 @@ Note: This is just a firmware, not magic. A big part of print quality still depe
- Estimated print times from your slicer might be slightly off.
- Special characters on any file or folders name on the SD card will cause the file menu to freeze. Simply replace or remove every special character (Chinese, Arabic, Russian, accents, German & Scandinavian umlauts, ...) from the name. Symbols like dashes or underscores are no problem.
**Important note: On the SD card that comes with the printer there is a folder with Chinese characters in it by default. Please rename or remove it.**
- Cancelling prints via display is buggy sometimes, simply reboot the printer when the menu shows an error. Protip: Switch to OctoPrint.
- Cancelling prints after pausing may show an error. Simply resume the print before canceling. Protip: Switch to OctoPrint.
## Why use this?
@@ -40,7 +43,7 @@ While the i3 Mega is a great printer for its price and produces fantastic result
- Even better print quality by adding Linear Advance, S-Curve Acceleration and some tweaks on jerk and acceleration.
- Thermal runaway protection: Reducing fire risk by detecting a faulty or misaligned thermistor.
- Very loud stock stepper motor drivers, easily replaced by Watterott or FYSETC TMC2208. To do that, you'd usually have to flip the connectors on the board, this is not necessary using this firmware.
- No need to slice and upload custom bed leveling tests, simply start one with a simple G26 command.
- No need to slice and upload custom bed leveling tests, test it with a single GCode command
- Easily start an auto PID tune or mesh bed leveling via the special menu (insert SD card, select special menu and press the round arrow)
- Filament change feature enabled: Switch colors/material mid print with `M600` (instructions below)
@@ -52,10 +55,10 @@ I provided three different precompiled hex files: One for no modifications on th
- Download the precompiled firmware here: [Releases](https://github.com/davidramiro/Marlin-AI3M/releases)
- Choose the correct hex file:
- For TMC2208 with connectors in original orientation, use `Marlin-AI3M-XXXXXX-TMC2208.hex`
- If you use TMC2208 and already reversed your connectors, use `Marlin-AI3M-XXXXXX-TMC2208_reversed.hex`
- If you use a newer version of the TMC2208 that doesn't require the connector to be reversed (TMC2208 "v2.0" written on the PCB, chip on the top side), please also use `Marlin-AI3M-XXXXXX-TMC2208_reversed.hex`.
- If you use the original stepper motor drivers, use `Marlin-AI3M-XXXXXX-stock_drivers.hex`.
- For TMC2208 with connectors in original orientation, use `Marlin-AI3M-vx.x.x-TMC2208.hex`
- If you use TMC2208 and already reversed your connectors, use `Marlin-AI3M-vx.x.x-TMC2208_reversed.hex`
- If you use a newer version of the TMC2208 that doesn't require the connector to be reversed (TMC2208 "v2.0" written on the PCB, chip on the top side), please also use `Marlin-AI3M-vx.x.x-TMC2208_reversed.hex`.
- If you use the original stepper motor drivers, use `Marlin-AI3M-vx.x.x-stock_drivers.hex`.
### Or compile it yourself:
@@ -169,6 +172,7 @@ G26 C H200 P25 R25
#### Configuration:
- Send `M603 L0 U0` to use manual loading & unloading.
- Send `M603 L538 U555` to use automatic loading & unloading
- The `L` and `U` paramters define the load and unload length in mm. The values above work well on a stock setup, if you modded your extruder, bowden tube or hotend, you might need to adjust those.
- Save with `M500`
#### Filament change process (manual loading):
@@ -228,7 +232,7 @@ After flashing the new version, issue a `M502` and `M500`. After that, enter eve
## Detailed changes:
- Thermal runaway protection enabled and tweaked
- Thermal runaway protection thresholds tweaked
- Manual mesh bed leveling enabled ([check this link](https://github.com/MarlinFirmware/Marlin/wiki/Manual-Mesh-Bed-Leveling) to learn more about it)
- Heatbed PID mode enabled
- TMC2208 configured in standalone mode
@@ -240,6 +244,8 @@ After flashing the new version, issue a `M502` and `M500`. After that, enter eve
- Minor tweaks on default jerk and acceleration
- Printcounter enabled (`M78`)
- `M600` filament change feature enabled
- Screen resume for `M600` implemented
- Filament runout, stop and pause behaviour tweaked
## Changes by [derhopp](https://github.com/derhopp/):