Commit Graph

3528 Commits

Author SHA1 Message Date
Voinea Dragos
9b847715ac Rename F0 to FRM on the status screen 2021-01-19 13:11:25 +02:00
Voinea Dragos
3f5cfc4e61 Move the change filament button to the main menu when farm printing
PFW-945
2021-01-19 13:06:23 +02:00
D.R.racer
a9d8ddc89c Farmers' requests 1
- remove the UI and related stuff to setting a farm number (the
communication protocol must remain intact)
- remove confirmation after print finished ("Print OK")

Both requests are highly welcome, since they allow for lowering the code
size by >1KB

PFW-963, PFW-927
2021-01-19 09:58:02 +01:00
3d-gussner
9264454d3a Gcode M123 only if FANCHECK and TACHOs are defined
Gcode `M155` added parameter "C" to activate auto-report for temperatures, fans and positions
Updated doxygen
@todo Update RepRap Wiki
@todo improve code
2021-01-19 09:01:46 +01:00
espr14
735895c6bc Use fabs 2021-01-14 16:38:34 +01:00
espr14
ca4e638ea2 Don't use extrusion in XYZ calibration 2021-01-14 13:19:30 +01:00
Alex Voinea
20c3f4cb77 Update comments 2021-01-14 12:53:12 +02:00
Voinea Dragos
dea3f23a69 PRUSA SN in eeprom 2021-01-14 11:52:22 +02:00
espr14
9867ecd3f9 Reduce unnecessary code 2021-01-13 13:59:20 +01:00
espr14
21d6f970ef Fix build 2021-01-12 16:26:46 +01:00
espr14
f3faf651c5 Move down before scanning 2021-01-12 16:12:34 +01:00
espr14
9dceb488b6 Revert double scanning 2021-01-12 16:04:04 +01:00
espr14
546812294e Clean serial output 2021-01-12 00:34:28 +01:00
espr14
d7507649d8 Remove degree char 2021-01-12 00:28:46 +01:00
espr14
180af46fe4 Try double height 2021-01-12 00:27:06 +01:00
espr14
333526f65d Single skew output 2021-01-11 23:14:12 +01:00
espr14
e6e44fe188 Convert to degrees 2021-01-11 23:13:08 +01:00
espr14
b8443b00ad Reverse reverse 2021-01-11 22:18:50 +01:00
espr14
09892bec52 Reverse 2021-01-11 18:46:56 +01:00
Yuri D'Elia
78f8f1e8f9 Remove stray serial newlines in fsensor autoload messages 2021-01-11 18:31:36 +01:00
espr14
211e5f5f37 Define DBG output 2021-01-11 17:31:26 +01:00
espr14
904a23b69e Report calibration results 2021-01-11 17:02:41 +01:00
espr14
2e40a27460 Alignment, comments 2021-01-11 15:40:12 +01:00
DRracer
4728bf2182
Merge pull request #2875 from wavexx/raise_while_preheating
Raise Z while preheating when auto/[un]loading the filament
2021-01-11 07:45:54 +01:00
DRracer
1a6b6fb491
Merge pull request #1776 from wavexx/unused_tmc_defines
Remove an unused define
2021-01-11 07:43:44 +01:00
DRracer
ef51652e39
Merge pull request #1758 from wavexx/disable_filament_checks_in_extr_menu
Disable filament checks inside the Move -> Extruder menu
2021-01-11 07:42:25 +01:00
3d-gussner
a064ce4722 Add gcode M123 Tachometer value 2021-01-10 15:15:44 +01:00
D.R.racer
8a083c9970 Add PVB preheat and 0.8mm nozzle presets
minor features reflecting the latest announcement

Needs some 300B of CPU flash though, after 3.9.3 we need to optimize code
size again.
2021-01-08 13:52:39 +01:00
DRracer
5c3513a6cc
Merge pull request #2397 from odaki/flashair_display_ip
Show the FlashAir IP address
2021-01-08 12:20:12 +01:00
espr14
584177e8fd Fix E mask 2021-01-08 10:24:36 +01:00
DRracer
f549ce690a
Merge pull request #2949 from prusa3d/MK3_3.9.3
Merge 3.9.3 back into MK3
2021-01-08 10:20:40 +01:00
3d-gussner
3329d34ce4 Fix doxygen issue with "^" and "|" only in one line
Doxygen 1.8.13 had no issues but newer doxygen version are failing
to build tables, if a line only consists of "^" and "|"
2021-01-08 09:40:13 +01:00
DRracer
0ed6b537a8
Merge branch 'MK3' into MK3_3.9.3 2021-01-07 13:27:51 +01:00
D.R.racer
603d704178 Version changed (3.9.3 build 3556) 2021-01-07 12:50:58 +01:00
3d-gussner
8a27b6abdb Move Z up before xy home running xyz calibration
to prevent scratches on bed and sheet
2021-01-07 11:45:40 +01:00
espr14
2981b9e9c5 OctoPrint needs new lines 2021-01-04 14:59:12 +01:00
espr14
cc9e7b9376 Fix comments, remove unused 2021-01-04 13:01:06 +01:00
espr14
49d57ed621 Median dynamic circle 2020-12-30 17:02:31 +01:00
espr14
a9fd09ca3f Implement median 2020-12-30 15:15:17 +01:00
espr14
13fefaa1bf Fix typo 2020-12-30 15:01:32 +01:00
espr14
03b87ae68b Add 8 pixel circle pattern 2020-12-30 13:08:47 +01:00
espr14
c14e725574 Fix moves 2020-12-29 18:27:33 +01:00
espr14
c2ab8785f4 Revert Manhattan 2020-12-29 17:31:34 +01:00
espr14
c1e6567461 Fix step axis coding 2020-12-29 17:17:32 +01:00
espr14
922769cefb axis -> axes 2020-12-29 17:14:18 +01:00
espr14
a01dfe26fe Add Manhattan movement 2020-12-29 17:13:11 +01:00
espr14
6461206e08 Fix direction setting 2020-12-29 14:19:05 +01:00
espr14
b6e78bf900 Fix direction 2020-12-29 14:08:30 +01:00
espr14
c11e8654da Revert both directions, refactor code 2020-12-29 12:39:35 +01:00
espr14
e86ba5e26d Scan only once 2020-12-28 16:45:39 +01:00
D.R.racer
7e02a7f118 Version changed (3.9.3-RC1 build 3555) 2020-12-26 15:45:34 +01:00
DRracer
d61cdf2b88
Merge pull request #2932 from espr14/PFW-1165-2
Calibration: Turn off speed optimization due to MK2.5 PFW-1165
2020-12-25 18:22:04 +01:00
espr14
80e32ce1a5 Turn off speed optimization due to MK2.5 2020-12-25 15:27:42 +01:00
3d-gussner
12f4102272 Group PINDA defines 2020-12-23 21:00:02 +01:00
3d-gussner
76eb743139 Set default SuperPINDA toggle on MK2.5/S to NO 2020-12-23 20:59:33 +01:00
3d-gussner
4b510fef0a Add PINDA_TEMP_COMP variable to enable SuperPINDA toggle menu/function 2020-12-23 20:59:08 +01:00
3d-gussner
a97587f373 Changed PINDA_MINTEMP having own value
Prevent bad readings/issues if someone changes the bed thermistor that is "better" with lower min values and creates a custom firmware.
The firmware will now be in the range of the PINDAv2 thermistor independant from the bed thermistor (which may change and need adjustments)
2020-12-23 20:58:44 +01:00
3d-gussner
732b6e0cad Cleanup 2020-12-23 20:58:20 +01:00
3d-gussner
62c36f718b Add SuperPINDA support for MK2.5/S
- Changed DETECT_SUPERPINDA to SUPERPINDA_SUPPORT as on miniRAMo the thermistor readings below 30°C
  aren't accurate egnough to determine if SUPERPINDA is connected or not
- Add LCD toggle menu Settings -> HW Setup -> SuperPINDA [Yes/No] to overwrite SuperPINDA detection
  - If EEPROM_PINDA_TEMP_COMPENSTATION is empty = 0xff then detect SuperPINDA by checking thermistor
  - If EEPROM_PINDA_TEMP_COMPENSTAION is 0 then forec enable for temperature compensation menues and functions
  - If EEPROM_PINDA_TEMP_COMPENSATION is 1 then force disable for temperature compensation menues and functions
2020-12-23 20:56:50 +01:00
espr14
e6eb3be247 Set jerk = 1, accel. = 1000 2020-12-23 16:56:04 +01:00
espr14
979525f028 Add more restarts 2020-12-22 19:34:12 +01:00
espr14
25d138d198 Revert max.speed 2020-12-22 15:10:01 +01:00
espr14
e24a763e46 Cleanup 2020-12-22 14:45:55 +01:00
espr14
8df2eccf45 Remove defines and unused vars 2020-12-22 14:36:37 +01:00
espr14
25d6e24778 Add comments 2020-12-22 14:16:20 +01:00
espr14
90c8045f7d Clean the code 2020-12-22 13:59:50 +01:00
espr14
20659ec818 Add debug output 2020-12-22 12:51:22 +01:00
espr14
c397e9249a Restart scanning 2020-12-21 19:33:36 +01:00
espr14
1610c96fc4 Fix and report circle divergence 2020-12-21 18:05:52 +01:00
espr14
744763f0a9 Fix diagonal movement 2020-12-21 17:34:54 +01:00
espr14
de23a845b4 Remove unused 2020-12-21 15:53:51 +01:00
espr14
3c9168f8f6 Optimize diagonal 2020-12-21 15:52:25 +01:00
espr14
9a59369c77 Diagonal acceleration 2020-12-21 15:32:09 +01:00
espr14
27ff6b0057 Fix build 2020-12-21 13:11:48 +01:00
espr14
9b55ff9de1 Acceleration up and down 2020-12-21 13:05:26 +01:00
espr14
f39a0999e1 Prepare full acceleration control 2020-12-18 21:33:43 +01:00
espr14
ccf26e4e7a Basic acceleration 2020-12-18 20:04:00 +01:00
espr14
a8f4207df9 New XYZ calibration algorithm 2020-12-17 18:19:36 +01:00
Alex Voinea
2ac106d9fe
Merge branch 'MK3' into MK3_random_patches 2020-11-30 09:14:58 +02:00
odaki
61c48df0bd Merge remote-tracking branch 'upstream/MK3' into flashair_display_ip 2020-11-23 15:53:03 +09:00
Voinea Dragos
f96f75bd17 Fix warning and a bit of indentation
Saved 64B of flash and 1B of SRAM
2020-11-16 10:58:26 +02:00
Voinea Dragos
f3953d7c83 Merge branch 'MK3' into MK3_random_patches 2020-11-16 09:11:12 +02:00
odaki
c0070506fb Merge branch 'MK3' into flashair_display_ip 2020-11-13 22:28:22 +09:00
DRracer
d013abfd52
Merge pull request #2890 from prusa3d/MK3_3.9.2
Merge MK3_3.9.2 into MK3
2020-11-13 13:03:35 +01:00
Alex Voinea
807eddafb0
Remove debugging code 2020-11-13 12:12:18 +02:00
Alex Voinea
43ace00a24
Fill the progress bar at the end and code optimizations 2020-11-12 18:43:48 +02:00
Alex Voinea
5ad125cbed
Merge branch 'MK3' into MK3_filecheck_progress_bar 2020-11-12 15:53:33 +02:00
D.R.racer
396ee0fde2
Version changed (3.9.2 build 3524) 2020-11-10 10:27:18 +01:00
Voinea Dragos
176e2674b9 Fix M105 ok hack 2020-11-09 21:49:56 +02:00
Voinea Dragos
023ccb0e89 Fix double ok in M603 2020-11-09 21:49:56 +02:00
Alex Voinea
0c305ee5f5 Fix warning 2020-11-09 21:49:56 +02:00
Alex Voinea
4abf1f436a Gracefully dump the queue + fixes to fancheck 2020-11-09 21:49:56 +02:00
Alex Voinea
fdbbc7d62a Terminate last line from the SD card even if it doesn't have a \n 2020-11-09 21:49:56 +02:00
Alex Voinea
ff56ece6f8 Remove redundant get_command prototype 2020-11-09 21:49:56 +02:00
Alex Voinea
5f0e4a1cac Temporary M602 patch. Needs more work 2020-11-09 21:49:56 +02:00
Alex Voinea
6873a9d28e Only send capabilities when M115 is run without arguments 2020-11-09 21:49:56 +02:00
Alex Voinea
0ee8e1f424 Fix missing ok in M601 2020-11-09 21:49:56 +02:00
Alex Voinea
e5ebf7c67f Fix missing keep-alive messages 2020-11-09 21:49:56 +02:00
Alex Voinea
26f62f042e Use the longest filename instead of just using the long filename in M27 2020-11-09 21:49:56 +02:00
D.R.racer
4747c8c9f5 Increase top Z-offset limit based on some test results 2020-11-09 12:29:19 +01:00
D.R.racer
5184910ef9 Try harder finding the calibration center
with alternative PINDAs it looks like their properties vary a lot
and searching for the calibration center requires trying different
Z levels.
2020-11-09 06:33:41 +01:00
D.R.racer
cd4e16ef9f XYZ calibration tune
PFW-1159
2020-11-06 08:25:56 +01:00
Yuri D'Elia
e28159122f Make MIN_Z_FOR_LOAD/UNLOAD the same
When unloading + preheat immediately followed by a load, the carriage is
raised first up to 20mm, then again to 50mm.

With PR #2318 it makes sense to make more space for the extra extrusion
anyway, so make them the same. This moves the carriage only once _while_
preheating, which is nice.
2020-10-29 15:30:16 +01:00
Yuri D'Elia
5f23474c95 Raise Z while preheating when auto/[un]loading the filament
Preheating already raised Z to avoid scorching the PEI sheet, as does
filament loading/unloading to allow for excess material to be removed.

However, when loading/autoloading/unloading via the LCD with a cold
nozzle the preheating menu is performed before the carriage is raised,
leaving the carriage close to the sheet while heating the nozzle.

Pre-raise the carriage already while waiting, so that the subsequent
move is automagically skipped.

Set bFilamentWaitingFlag only once to perform both the LCD
initialization and raising to the appropriate height.

Should fix #2761
2020-10-28 20:49:28 +01:00
DRracer
c05d4c9112
Update messages.h
cleanup space
2020-10-21 17:04:20 +02:00
MartinPoupa
a84d7ef8d6 corectino of declaration 2020-10-13 16:56:57 +02:00
MartinPoupa
c8c7563e8a LCD status changed
When the lcd status changed it will be printed "LCD status changed" to serial line.
2020-10-07 17:44:17 +02:00
Yuri D'Elia
df824414ef Fix probing in IR_SENSOR 2020-09-28 21:02:06 +02:00
Yuri D'Elia
c2e8d229a7 Be more compliant in the I2C protocol
- Enter a repeated-start for reading data
- Write in the same session
2020-09-28 20:21:07 +02:00
odaki
ebc987bd23 Merge branch 'MK3' into flashair_display_ip 2020-09-28 21:19:44 +09:00
Yuri D'Elia
384f40956c Remove obsolete cbi/sbi 2020-09-27 16:42:20 +02:00
Yuri D'Elia
6d476d7144 Still use SWI2C on RAMBo10a boards
The wiring for the PAT9125 on RAMBo10a boards is not directly connected
to the SCL pin and requires the sw mode.

Detect this requirement by checking the definition for the SWI2C_SCL pin
in the board definition.

Remove SWI2C_SCL/SDA from the other boards to use the HW mode.
2020-09-27 14:29:07 +02:00
DRracer
134f841380
Merge pull request #2841 from leptun/MK3_SD_REMOVED_MESSAGE
SD card released message
2020-09-23 10:22:04 +02:00
DRracer
95e2e2f69c
Merge pull request #2832 from leptun/MK3_AUTO_REPORT_TEMPERATURES
Mk3 auto report temperatures
2020-09-23 08:51:26 +02:00
DRracer
ef0840f587
Merge pull request #2786 from leptun/MK3_M115_Capabilities_report
Printer Capabilities framework + Macros + Code cleanup
2020-09-23 08:37:03 +02:00
Alex Voinea
d9fa44c142
Document M155 command 2020-09-23 09:14:35 +03:00
DRracer
e24466f22e
Merge pull request #2837 from prusa3d/MK3_3.9.1
Merge MK3_3.9.1 into MK3
2020-09-22 10:43:59 +02:00
odaki
4c7100985e Merge branch 'MK3_3.9.1' into flashair_display_ip 2020-09-22 11:59:05 +09:00
D.R.racer
7278458316 Version changed (3.9.1 build 3518) 2020-09-18 16:59:22 +02:00
3d-gussner
bd7bb5acb3
Update new messages and their translations (#2835)
* Add missing translations

* Add missing CZ and IT translations

* Update CZ, FR, IT, ES translations
CZ thanks to @DRracer
FR thanks to Carlin Dcustom
ES tried myself
IT thanks to @wavexx

Only missing is PL

* Improve wording +change keys

* Add missing PL translations

* Fix copy paste error in Italian
fix double translations

* Make PL translation shorter

* Fix some length issues and capital letters

* Fixed again translations length issues
updated po files

* Update FR translation - thanks @awenelo

* Fix execution of lang-check.py

- Make lang-check.py executable
- Execute directly instead of specifying the python interpreter manually
  ("python" is no longer available on Debian, and would default to
  version 2 prior to that despite being written for python 3)

* Fix permissions of translation files

Co-authored-by: D.R.racer <drracer@drracer.eu>
Co-authored-by: Yuri D'Elia <wavexx@thregr.org>
2020-09-18 16:50:25 +02:00
Voinea Dragos
2f5083daa7
quickfix to mistake made in the experimental menu visibility code
Fix indentation
2020-09-15 18:56:39 +03:00
DRracer
9fb6efc435
Add newline at the end of file 2020-09-15 14:56:41 +02:00
Voinea Dragos
c0fced2f3c Fix typo 2020-09-15 14:21:21 +03:00
Voinea Dragos
e2ef5af40e Add capability line 2020-09-15 14:21:09 +03:00
Voinea Dragos
a1dfbffedb Merge branch 'MK3_M115_Capabilities_report' into MK3_AUTO_REPORT_TEMPERATURES 2020-09-15 13:39:00 +03:00
Voinea Dragos
073eadff7e Merge branch 'MK3' into MK3_AUTO_REPORT_TEMPERATURES 2020-09-15 13:38:47 +03:00
DRracer
3093c8c7f6
Merge pull request #2829 from wavexx/la10_15_readjust
Re-adjust LA10->15 conversion
2020-09-15 11:59:07 +02:00
Alex Voinea
c158259970
Remove unused where C++ alternative can be used 2020-09-11 20:04:06 +03:00
Alex Voinea
44b1b1c219
More macros 2020-09-11 18:48:44 +03:00
Alex Voinea
c3abd4ffe6
Remove io_atmega2560.h and some more macros 2020-09-11 17:43:38 +03:00
Alex Voinea
eb007c35d2
Macros initial 2020-09-11 16:12:49 +03:00
Alex Voinea
160af0a624
Printer capabilities 2020-09-11 16:11:28 +03:00
3d-gussner
fef5b02010 Tag as community contribution 2020-09-09 12:34:25 +02:00
3d-gussner
4d3aa1b59a Merge remote-tracking branch 'upstream/MK3' into MK3_Dutch
Merge upstream/MK3
Fix conflicts
update Dutch translation
2020-09-09 11:37:35 +02:00
DRracer
f145769e98
Merge pull request #2807 from leptun/MK3_Polling
M220 M221 polling of values
2020-09-09 10:25:36 +02:00
DRracer
763d2d9849
Merge pull request #2806 from leptun/MK3_PRUSA_SN
Make the serial number available to the user
2020-09-09 09:54:29 +02:00
DRracer
a0420c7928
Merge pull request #2619 from 3d-gussner/MK3_G21
Add dummy G21 to prevent UNKOWN warnings in serial
2020-09-09 09:22:07 +02:00
DRracer
b82ee3fc06
Merge pull request #2811 from leptun/MK3_fastio_timer_patch
Fix fastio extra parenthesis
2020-09-09 08:57:37 +02:00
DRracer
a2db9e8f6b
Merge pull request #2585 from leptun/MK3_FEEDRATE
🐛♻️ Update the feedrate percentage before drawing the screen
2020-09-09 08:56:46 +02:00
Yuri D'Elia
26e900896a Re-adjust LA10->15 conversion
After fixing some LA15 issues, the strenght of LA15 increased.
As such, re-adjust the conversion factor so that:

Start K10 => 0.01 (previous minimum was K15)
PLA   K30 => 0.05 (was 0.07, optimal 0.045-0.06)
PETG  K45 => 0.08 (was 0.13, optimal 0.07-0.11 depending on material/temp)
2020-09-07 21:44:34 +02:00
Alex Voinea
7ac16d5f04
Menu view return patch 2020-09-07 19:42:53 +03:00
D.R.racer
02891f6bb8 Version changed (3.9.1-RC1 build 3512) 2020-09-02 11:56:53 +02:00
Alex Voinea
3e7bba54e0
SD card released message 2020-08-28 17:32:07 +03:00
Yuri D'Elia
e37cdab38f PAT9125_I2C: accept either NACK or ACK in receive
Both would be technically correct.
2020-08-25 12:15:55 +02:00
Yuri D'Elia
d8a8837938 Document the 3 possible modes 2020-08-25 11:32:05 +02:00
Alex Voinea
1659f61dd5
Fix fastio extra parenthesis 2020-08-21 10:51:46 +03:00
Yuri D'Elia
30e7b777e0 Error-out with PAT9125_SWSPI (not fully implemented)
.. and likely will never was/be.
2020-08-20 22:13:13 +02:00
Yuri D'Elia
7f425120f0 Strip down the TWI code
- Only implement a single syncronous read/write function to read a byte,
  since that's all we need currently
- Implement a compact IR_SENSOR probe for PAT9125
- Saves 242 bytes compared to PAT9125_SWI2C
2020-08-20 22:13:04 +02:00
DRracer
772844678f
Merge pull request #2809 from leptun/PFW-1134-ALTFAN_KILLSWITCH
Pfw 1134
2020-08-20 15:42:03 +02:00
Yuri D'Elia
240dc1132e Include initial implementation based on Arduino's twi 2020-08-20 15:34:46 +02:00
Yuri D'Elia
502bc8c72d Isolate more pat9125 code
Remove probing from Marlin_main and move it into pat9125_probe so that
it can support the various variants.
2020-08-20 15:34:46 +02:00
3d-gussner
90c36a5887
Update ALTFAN eeprom documentation
EEPROM_ALTFAN_OVERRIDE and EEPROM_EXPERIMENTAL_VISIBILITY are compared to 0xFF in the code that's why I keep the uint8.
2020-08-20 15:14:39 +02:00
Alex Voinea
2c2926882a
Don't switch unnecessarily. Also "\n" the ";S" request 2020-08-18 19:29:18 +03:00
Alex Voinea
8d9dc73d1b
Fix compile error
fix compile


Fix compile error
2020-08-12 17:25:49 +03:00
Alex Voinea
5530b99882
Reboot after factory reset 2020-08-12 12:46:35 +03:00
Alex Voinea
6b853a4cc3
Auto-detect ALTFAN after fw. update 2020-08-12 12:19:08 +03:00
Alex Voinea
96435ad084
Move experimental menu to HW setup 2020-08-12 08:48:12 +03:00
DRracer
008d3b0e65
Merge pull request #2792 from wavexx/MK3_fix_high_speed_deceleration
Mk3 fix high speed deceleration
2020-08-06 13:27:52 +02:00
DRracer
89ecf2ce3a
Merge pull request #2791 from wavexx/stack_protect_reentrant_isr
Fix stack smashing in temperature/fsensor ISR
2020-08-06 13:26:33 +02:00
DRracer
d0eca4d5c4
Merge pull request #2794 from leptun/PFW-1134-ALTFAN_KILLSWITCH
Minor documentation fixes to altfan PR
2020-08-06 12:53:34 +02:00
Alex Voinea
f1a8657093
Minor documentation fixes
Add even more comments


a
2020-08-06 12:20:38 +03:00
DRracer
22a8c18551
Merge pull request #2784 from leptun/PFW-1134-ALTFAN_KILLSWITCH
altfan killswitch
2020-08-06 08:15:42 +02:00
Yuri D'Elia
b3af08d94a Fix stack smashing in temperature/fsensor ISR
The temperature and fsensor ISR re-enable interrupts while executing.

However, we still need to protect the epilogue of the ISR so that
the saved return address is not altered while returning.

We hoist the body of the function out of the isr in both cases for
clarity (and to avoid a stray return bypassing the lock/cli), so that
the re-entrant portion is clearly indicated.

This should fix the "STATIC MEMORY OVERWRITTEN" error messages randomly
happening when stepping at high frequency (where either isr is
preempted more frequently).
2020-08-05 17:47:46 +02:00
DRracer
f1bde1a039
Merge pull request #2724 from wavexx/max_ambient
Implement MIN/MAX AMBIENT safety checks
2020-08-05 08:52:55 +02:00
Yuri D'Elia
a2c7dcbbf8 Fix indentation 2020-08-04 13:14:35 +02:00
Alex Voinea
654a3a0d79
Other requested changes 2020-08-04 10:43:30 +03:00
Alex Voinea
e0bf92cd4e
Change bool literal to int 2020-08-04 09:54:57 +03:00
Yuri D'Elia
b8e8f182ca Add reference C implementations for MultiU16X8toH16/MultiU24X24toH16
Higher step counts might still overflow the ASM MultiU24X24toH16.

e4595fa24a
2020-08-03 19:03:13 +02:00
Yuri D'Elia
30a806608f Also convert acceleration_rate to uint32_t
acceleration_rate is also unsigned
2020-08-03 19:01:38 +02:00
Yuri D'Elia
aebaca5cdc Correct comments regarding acceleration ramp
Backport fixes from upstream Marlin
2020-08-03 18:53:13 +02:00
Yuri D'Elia
8108d50b59 Reintroduce/fix check for step_rate underflow during deceleration
Check for negative results and results under the final_rate
2020-08-03 18:53:13 +02:00
Yuri D'Elia
4654283f54 Restore indentation 2020-08-03 18:16:20 +02:00
Alex Voinea
12be141188 Fix high speed deceleration 2020-08-03 18:16:13 +02:00
Yuri D'Elia
a8ce9358e5 Avoid redundant temperature error strings
Factor-out MIN/MAXTEMP [BED/AMB] out of the error message, which is now
built at runtime instead.

Introduce two missing ultralcd functions lcd_setalertstatus and
lcd_updatestatus to handle regular strings.

246272 -> 246084 = 188 bytes saved
2020-08-01 17:47:42 +02:00
Yuri D'Elia
e1c79c342d Re-introduce redundant disable_heaters() calls
Partially revert 285b505c73a54e9af01816e3a614de73ad181851 so that
we ensure heaters are disabled ASAP in case of potential bugs
in the max_*_error functions.
2020-08-01 17:47:20 +02:00
Yuri D'Elia
a60ed81a35 Implement MIN/MAX AMBIENT safety checks
Take advantage of the NTC thermistor found on the Einsy as an additional
safety measure, following the steps of the other MIN/MAXTEMP errors.

Introduce two configurable params AMBIENT_MINTEMP and AMBIENT_MAXTEMP
in the variant defines and set them for the MK3/MK3S to -30/+100
respectively.

AMBIENT_MINTEMP is primarily intended to catch a defective board
thermistor (to ensure MAXTEMP would be properly triggered) and thus the
trigger temperature is set just above the sensing limit and well below
the operating range.

AMBIENT_MAXTEMP is set at 100C, which is instead 20C above the maximum
recommended operating temperature of the Einsy. The NTC thermistor is
located just above the main power connector on the bottom of the board,
and could also help in detecting a faulty connection which can result in
rapid overheating of the contacts.

As for MAXTEMP, we cut power to the heaters, print fan and motors to
reduce power draw. Resume is not possible except by resetting the
printer, since the user is highly advised to inspect the board for
problems before attempting to continue.
2020-08-01 17:38:10 +02:00
Yuri D'Elia
3336db7954 Add some important notes about thermistor ADC handling 2020-08-01 17:36:43 +02:00
Yuri D'Elia
65f25b0d7e Remove redundant disable_heater() calls in max/min_temp handling
In max/min_temp handlers remove the redundant disable_heater() call.
Handlers already need to call Stop(), which will disable all heaters
as the first step.

Fix comments in order to mention that all heaters get disabled.
Use "MAX/MINTEMP BED" correctly in both the LCD and serial.
2020-08-01 17:36:43 +02:00
Yuri D'Elia
942fca5b66 Remove useless assignment
target_temperature_bed is already reset by disable_heaters() in Stop()
2020-08-01 17:36:43 +02:00
Yuri D'Elia
87bc5a78b6 Remove bogus comment (BED_MINTEMP *is* implemented) 2020-08-01 17:36:43 +02:00
Yuri D'Elia
feafc5e5ab Alternative schedule for LA ticks
Remove most of the original complexity from advance_spread.

Instead of accumulating time to be scheduled, plan ahead of time each
eISR tick using the next main interval + an accumulator (eISR_Err),
which keeps everything much simpler.

The distribution of the advance ticks is now using the real LA
frequency, which leaves a bit more time between the last LA tick and
the main stepper isr.

We take advantage of the accumulator to force a LA tick right after the
first main tick, which removes a +/- 1 scheduling error at higher step
rates.

When decompressing, we force 2 steps instead, so that the direction
reversal happens immediately (first tick zeros esteps, second inverts
the sign), removing another +/- 1 error at higher step rates.
2020-07-29 19:14:48 +02:00
Alex Voinea
773c6997ef
Add comments 2020-07-29 17:36:03 +03:00
Alex Voinea
ec6a20971e
Add experimental menu to HW_setup 2020-07-29 11:23:24 +03:00
Alex Voinea
d8fbd46cd2
M155 2020-07-23 17:28:25 +03:00
Alex Voinea
e2856ba4f5
Make the serial number available to the user 2020-07-21 12:52:04 +03:00
Alex Voinea
a95feb56d9
ALTFAN override 2020-07-20 19:35:25 +03:00
Yuri D'Elia
a08ca19ade Make flow correction optional, disabled by default
If you're using flow to correct for an incorrect source diameter, which
is probably the main usage when using the LCD, then LA shouldn't be
adjusted.

It's still unclear what the effect of M221 in gcode should be regarding
overall extrusion width. If M221 means "thicker lines", then LA should
also be adjusted accordingly.

This stems from the fact that the source diameter/length needs to be
known in order to determine a compression factor which is independent of
the extrusion width, but the FW only ever sees one value currently (the
extrusion length) which combines both.

This makes it impossible for the FW to adjust for one OR the other
scenario, depending on what you expect for M221 to mean.
2020-07-20 14:33:45 +02:00
Yuri D'Elia
9b8f642b28 Account for flow adjustments in LA
The e/D ratio should be calculated using the extrusion length.

As such, purify the e_D_ratio from the current extruder multiplier in
order to account correctly for flow adjustments.
2020-07-19 17:41:38 +02:00
Yuri D'Elia
c54474f2db Guard against planning/numerical errors in short segments
Turns out for high-res curved models the numerical error and the
SLOWDOWN handling in the planner can cause enough variance in the
calculated pressure to trigger LA to continuosly, making matters worse.

Clamp LA again, but only during extrusion, so that the runaway error is
limited by the current segment length.
2020-07-16 18:54:00 +02:00
Yuri D'Elia
fb5f09da6d Fix incorrect precedence for retraction phase
The logic was inverted, causing the fastest isr to always retract
instead of counter-balance the acceleration properly.
2020-07-16 18:53:53 +02:00
Yuri D'Elia
c08f37da96 Use nominal rate for phase calculations
The local interval calculated by advance_spread() might oscillate too
much in narrow intervals.
2020-07-12 17:15:47 +02:00
Yuri D'Elia
78bbfc6237 Fix delay calculations inside babystep()
- Avoid all delays when using DEDGE stepping
- Correctly account for direction change delays
2020-06-24 17:58:43 +02:00
Yuri D'Elia
6ea198a866 Fix DEDGE in sm4.c (fixes xyz calibration) 2020-06-24 17:58:43 +02:00
Yuri D'Elia
e6b182aa9f Implement proper step/delay pauses in tmc2130 functions
Add constants for the various required delays in tmc2130.h,
which will come in handy for stepper.cpp as well.

Move the delays in the _set functions and remove the pauses
from the various calling points and macros.

Note that the hard-coded pause wouldn't cut it for the stepper ISR,
but it's fine for other use cases.
2020-06-24 17:58:43 +02:00
Yuri D'Elia
1181beffb1 Enable DEDGE stepping on supported variants 2020-06-24 17:58:43 +02:00
Yuri D'Elia
6ceca9bf85 Implement double-edge stepping
Introduce new wrapper macros to tick the stepper pins.
Default to the original raising-edge stepping mode.

When using the TMC double-edge stepping mode (aka half-wave or
square-wave mode) the _LO macros become no-ops.
2020-06-24 17:58:43 +02:00
Yuri D'Elia
6017600714 Reintroduce the ability to disable TMC interpolation per-axis 2020-06-24 17:58:43 +02:00
Yuri D'Elia
d53c55ce64 Disable filament checks inside the Move -> Extruder menu 2020-06-24 16:10:32 +02:00
Yuri D'Elia
f1efce7e52 Handle LA termination with double/quad stepping properly
Before PR #2591 LA was automatically capped during cruising or
deceleration. However we now rely on reaching the current pressure state
exactly to stop. When dual/quad stepping inside the eISR we might incur
in oscillating behavior if we do not handle it correctly.

This might be the cause behind #2757

This now changes e_step_loops to be a phase-local variable, so we now
reset it each phase too (instead of per-segment).
2020-06-23 16:51:54 +02:00
Yuri D'Elia
50a09824fd Avoid scheduling useless eISR ticks
When switching to a new trapezoid step with the right pressure, cancel
any pending eISR right away.

Similarly do not schedule another eISR if the pressure will be reached
by the end of the eISR.

This was done in the past to preserve the current LA_phase. This is not
needed anymore, since it will be reset at each trapezoid step when LA
is re-initialized.
2020-06-23 15:24:16 +02:00
Yuri D'Elia
1206fc3164 Avoid useless cast 2020-06-22 15:34:34 +02:00
Yuri D'Elia
a36efcb347 Remove cumulative error in segments without cruising (take 4)
Avoid sqrt when possible
2020-06-22 15:03:49 +02:00
Yuri D'Elia
173aa2deba Fix bogus timer check preventing fast LA steps to be scheduled
Simplify and fix the broken timer check when scheduling advance ticks.
This dates back to the original LA15 PR, an old bug...
2020-06-22 00:54:50 +02:00
Yuri D'Elia
51a539608c Reset LA_phase at each trapezoid stage
There used to be a single stage where an extruder reversal could occur,
but since PR #2591 reversals can happen up to two times per trapezoid.

Reset LA_phase when ADV_INIT is set, since it is re-inizialized only
when needed a few lines afterward. This improves performance by avoiding
to check the phase continuosly to the end of the trapezoid.

Likewise, always set ADV_INIT during the first cruising step, also to
force a LA_phase reset.
2020-06-22 00:19:47 +02:00
Yuri D'Elia
7c140bc497 Remove cumulative error in segments without cruising (take 3)
Remove another division by precomputing the division directly in
adv_comp.
2020-06-21 16:32:22 +02:00
Yuri D'Elia
753e651af3 Remove cumulative error in segments without cruising (take 2)
Reduce per-trapezoid calculations
2020-06-21 16:32:22 +02:00
Yuri D'Elia
15548958e9 Remove cumulative error in segments without cruising (take 1)
PR #2591 made LA compression always account for retractions instead of
discarding the current compression steps. While this fixed overextrusion
in short segments followed by wipes, it uncovered another issue in how
the compression steps are spread during the trapezoid calculations
leading to gaps in segments followed by retractions (as highlighted by
/some/ prints in #2693).

LA1.5 always computes the required target compression steps for a
segment at nominal speed. Because of how the extra steps are allocated
using multiples of the accelerating frequency, if the segment is
truncated before cruising is reached, an additional cycle of steps can
be inserted before deceleration starts. Deceleration is also not
guaranteed to be symmetric where up to _two_ cycles can be skipped
depending on the stepping cycle, leading to a situation where a
symmetric acceleration/deceleration block will lead up to a cycle of
accumulated compression.

While forcing an the extra step during deceleration is possible by
tweaking the error term (eISR_Err), this doesn't guarantee balance in
all cases. The underlying issue is that the function is aiming a
compression which cannot be reached (nominal speed), and not at the
effective max speed reached in the trapezoid, thus moving the average
result higher over time.

We fix this by calculating the effective maximum speed (and compression)
reached during the trapezoid, which stops compression on the required
cycle irregardless of the error term, balancing the result.

This is the first unoptimized POC: this is not for production: a lot of
calculations are redundand and could work directly in steps/s^2.
2020-06-21 16:32:22 +02:00
Alex Voinea
a0cf5714ce
M220 M221 2020-06-19 15:39:16 +03:00
Marek Běl
45e182911d
Merge pull request #2748 from mkbel/detect_superpinda
Detect superPINDA PFW-1107
2020-06-16 14:07:12 +02:00
Marek Bel
9838be8512 Do not compile, if PINDA temperature compensation start point is lower than PINDA_MINTEMP. Document. 2020-06-16 02:03:14 +02:00
Marek Bel
d5feed1f6a Refactor: Remove if(true) condition, redundant break statement and decrease indentation. 2020-06-16 01:20:17 +02:00
Marek Bel
40ffea64ab Do not compile temperature compensation code for PINDAv1 if PINDA_THERMISTOR macro is defined.
This saves nearly all of additional FLASH usage of previous commit. It is only 70B worse than if no skipping is done in temperature compensation gcode G76.
2020-06-16 01:09:40 +02:00
Marek Bel
d398aa1e3f Skip PINDA_THERMISTOR block in PINDA probe temperature calibration if PINDA_THERMISTOR is not detected.
Costs 1328B of FLASH, something must be wrong.
2020-06-16 00:44:59 +02:00
Marek Bel
23cc22bc22 Move has_temperature_compensation() into temperature.cpp.
No change in FLASH usage.
2020-06-16 00:41:21 +02:00
Marek Bel
bdf53387b1 Disable temperature compensation and temperature calibration menu if superPINDA is detected.
Even though functionality was added, 20B of flash memory has been saved.
2020-06-16 00:19:06 +02:00
Marek Bel
bbe9e3b4ea Remove temp_cal_active variable.
This saves 18B of FLASH and 1B of RAM memory. This variable was duplicate to EEPROM variable of the same name.
2020-06-11 20:00:55 +02:00
Marek Bel
fca4015667 Remove st_current_init() call from lcd_temp_calibration_set().
There is no known purpose of this call.
lcd_temp_calibration_set() is switching on/off pinda temperature compensation from LCD settings menu (this is called "Temp. cal." on LCD).
st_current_init() does nothing on Einsy board, it enables and sets motor current selecting outputs on Rambo board (it used to be called digipot in history)
2020-06-11 19:38:40 +02:00
Marek Běl
750af103ff
Merge pull request #2727 from mkbel/fix_unused_function
Unused function warning fix.
2020-06-08 15:25:11 +02:00
Marek Běl
971504f395
Merge pull request #2728 from mkbel/fix_unused_variable
Fix compiler warning unused variable kill_message.
2020-06-08 15:09:19 +02:00
Marek Bel
f6df3f2394 Unused function warning fix.
(cherry picked from commit 54e2b6a829a221cc3abbff3a39ca7d3cafed3a09)
Pick only unused function warning fix.
2020-06-08 15:04:26 +02:00
Marek Bel
200696c764 Fix compiler warning unused variable kill_message.
(cherry picked from commit 54e2b6a829a221cc3abbff3a39ca7d3cafed3a09)
Pick only unused kill_message.
2020-06-08 14:27:58 +02:00
Marek Bel
5648f3fef0 Fix compiler warning enumeration value 'ONE_TO_FALL' not handled in switch. 2020-06-08 13:07:19 +02:00
DRracer
183b102b6c
Document the RPM condition 2020-06-05 16:37:21 +02:00
Alex Voinea
1bf5635459
Trigger fan error during selftest for altfan 2020-06-05 17:17:33 +03:00
D.R.racer
7e41524101 PC-blend preheat temperatures #define typo
A typo slipped through in PR#2711, not even the compiler caught it
(obviously, it is #define to be stringized):
PCB_PREHEAT... -> PC_PREHEAT
2020-06-03 18:05:37 +02:00
D.R.racer
fe72ba7a9d Add PC-blend preheat preset 2020-06-03 17:45:55 +02:00
3d-gussner
d1865fc59a
MK3s IR sensor improvement (#2698)
* Update EEPROM_FSENSOR_PCB documentation

* Update IR sensor check

* Rename IR messags and add UNKNOWN state

* Update code to use new messages

* To be continued

* Move fsensor related things from ultralcd.h to fsensor.h

* Use defined Thresholds

* IR sensor auto detection "0.3 or older" and "0.4 or newer" when trigger status changes.
Typo fixes
Doxygen documentation

* Cleanup spaces

* Revert PF-build.sh changes

* re-add space in messages

* revert doxygen snytax

* Remove double _Undef

* Fix indentation and doxygen syntax

* Fix indentation

* Better message handling

* Fix indentation

* Fix indentation

* More indentation fixwa

* Extract common code into manage_inactivity_IR_ANALOG_Check

Saves ~60B of code

* Revert indentation changes on fsensor.cpp

* Keep the selftest IR sensor part disabled

Everything shall happen at runtime

* Fix indentation fsensor_update

* Fix another misleading indentation in fsensor_update

Co-authored-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
Co-authored-by: D.R.racer <drracer@drracer.eu>
2020-06-03 16:14:56 +02:00
DRracer
233e66900f
Merge pull request #2670 from wavexx/la10c_jerk_tune
Increase E-jerk LA10->15 flattened zone
2020-06-03 15:50:57 +02:00
Alex Voinea
751f810dd7
ALTFAN implementation (#2692)
* ALTFAN implementation

* Use CRITICAL_SECTION macros

* Use uint16_t instead of unsigned int

* Add forgotten CRITICAL_SECTION

* Documentation
2020-06-01 17:58:15 +02:00
DRracer
eb44ee0f57
Code size optimization: 2KB down (#2687)
* Combine repeated calls into functions with much less parameters -> 2KB
down.

* Save some bytes by removing unnecessary 1-character strings: "x" -> 'x'
used in SERIAL_xxx printing macros.
This is also saves some CPU cycles

* Fix compilation for MK25S and MK3

* Copy surrounding indentation

* Fix compilation for a rare HW setup

* rename mesh_planXX_buffer_line back to mesh_plan_buffer_line

* Remove active_extruder from remaining plan_buffer_line_destinationXYZE
calls and one more fix of indentation
2020-06-01 17:51:28 +02:00
Alex Voinea
c84aef3a28
Handle second serial port correctly 2020-05-27 17:40:14 +03:00
Alex Voinea
b1e446ef97
Remember the serial characters during Optiboot initialization 2020-05-27 13:50:02 +03:00
Alex Voinea
e985d17bd1
Document code 2020-05-27 10:16:44 +03:00
Alex Voinea
f11ab17746
Fix warning 2020-05-27 09:59:17 +03:00
Alex Voinea
4ffa4dd8fd
Fix missing start on MK3/S 2020-05-27 09:44:28 +03:00
odaki
3d979a88a5 Merge remote-tracking branch 'upstream/MK3' into flashair_display_ip 2020-05-20 12:37:07 +09:00
D.R.racer
2447dbc69f Version changed (3.9.0 build 3421) - sync 2020-05-18 16:56:32 +02:00
D.R.racer
285088a715 Version changed (3.9.0 build 3421) 2020-05-18 16:45:18 +02:00
Yuri D'Elia
000f824e39 Increase E-jerk LA10->15 flattened zone
Increase the flattened response in the e-jerk conversion from the 1-4.5
region to 0.3-4.5 (same slope). This brings a 0.3 LA10 e-jerk to a 3.45
LA15 equivalent.

This will better handle the legacy Pretty PETG/CFPETG v3 profiles.
2020-05-18 01:22:49 +02:00
3d-gussner
deff8dcfde
MK3 3 9 0 missing translations (#2646)
* Add and update missing translations
- updated in Firmware/ files the missing `c=xx` column and `r=yy` rows.
- added missing translations to lang/lang_en*.txt

Everyone is developing and adding messages to serial and especially to LCD  PLEASE add `//// c=xx` or `//// c=xx r=yy` comments.
Preparing translations files without that information is a pain in the ... and takes way more time for somebody else
to review to code as it would take you.

* No need to have `MSG_abcde` again in comments `////` in `messages.c`

* German translation

* Missed a space

* Use the same format as somewhere else

* French translation.
I am not a native French speaking person, so please excuse my mistakes I may have done.

* Spanish translation.
I am not a native Spanish speaking person, so please excuse my mistakes I may have done.

* CZ translation

* Fix typos

* Another fix
It is
Dimmwert and not Dim Wert

* Fix issues reported by `lang-check.py`

* Add "difficult" messages containing `%`

* Updated MSG and German translation

* removed a translation as it breaks the language selection

* No need to wait until any-key is pressed

* No need to wait any-key is pressed

* Fixed two LF issues

* Updated PO files
ready to be send to translators

* Add missing italian translations

* Improve some existing italian translations

* More italian fixes

* More italian fixes

* Add exceptions in editorconfig for po files to avoid recoding

* Fix typo
Thanks @DRracer for pointing out

* Italian translation by @wavexx

* Update po/new/*.po files

* Update after merging MK3 branch

* Update French translation and some c=xx comments

Big thanks to @awenelo @carlin57 for helping with the french translations and their comments.

* Update po files after French translation

* Fixed most `lang-check.py` reported translation errors for Czech and German.
Two Czech have to be reviewed as these are too long.
One German is correct as it is shown in c=20 r=2 but is 1 char longer than this to split the message.
One German translation seams to be to long but have to review the actual max length

* Fix `lang-check.py` Spanish translation errors
There have been quite lot TOO long messages,

Can't imagine that nobody every complained about that.

* Fix `lang-check.py` Italian translations errors

* Update not_tran and not_used files after fixing several translations

* Some more error fixes and update of `po` files

* Polish translation

* Czech updated

* Fix typo

* no need to translate `\x00` if it is the same

* Polish: Runouts->Koniec

* Polish: Runouts->Konce f ... hopefully the last change

* Added MK2.5/s auto power mode to eeprom doxygen

* Final updates.

- Compiled all versions with multi-languages
- Compiled all versions with EN_ONLY
- updated all /lang/po/Firmware*.* files

* Add crlf attributes for po files

As done for editorconfig, this similarly forces git to handle
po files consistently in DOS format.

* Further improvent of IT translations

* Updated translation
Added cleanup to PF-build.sh

* remove lang/not_tran* and lang/not_used mistakenly added into the PR

Co-authored-by: DRracer <drracer@seznam.cz>
Co-authored-by: Yuri D'Elia <wavexx@thregr.org>
Co-authored-by: D.R.racer <drracer@drracer.eu>
2020-05-12 22:23:40 +02:00
3d-gussner
127a1790bc Set unknown IR sensor after factory reset as 0.3 or older 2020-05-12 20:15:02 +02:00
odaki
dfd60a843d Merge remote-tracking branch 'upstream/MK3' into flashair_display_ip 2020-05-10 10:25:13 +09:00
DRracer
7079606df3
Merge pull request #2639 from wavexx/la15_adj_threshold
Adjustable Linear Advance limits and thresholds
2020-05-06 15:37:30 +02:00
Yuri D'Elia
2f4f4547c6 Also reset LA10C when disabling LA with K0
As pointed out by @leptun, with MMUs the combination of old/new filament
profiles in the same print is a likely scenario as we transition towards
LA1.5. Reset the detection state also with K0.
2020-04-29 22:56:06 +02:00
Yuri D'Elia
5082f2a36e Move reset LA state from G80 to M84
Move la10c_reset into finishAndDisableStepper, which is called in both
via lcd_print_stop() and indirectly via M84, saving some space.

M84 is checked-for to determine a complete file, so it's a superior
candidate to G80 (which some people avoid due to MBL issues).
2020-04-29 22:51:23 +02:00
odaki
a1254b3a3c Merge branch 'MK3_3.9.0' into flashair_display_ip 2020-04-29 10:19:51 +09:00
Yuri D'Elia
b9ce572559 Reset LA10/15 state also when stopping a print
Based on f22fb2770bb278f71ad162b1abd8108633424f6c by @leptun
2020-04-28 17:35:28 +02:00
Yuri D'Elia
0b666ee733 Parametrize LA limits and threshold values
Allow the LA 1.5 MAX value to be configured in Configuration_adv.h.

Define a customizable LA10<>15 detection threshold in function of the
above limit.

Clamp the result of of the LA10->15 return value to always
respect the new LA_K_MAX.
2020-04-28 17:31:42 +02:00
DRracer
7be713199d Version changed (3.9.0-RC3 build 3401) 2020-04-28 12:06:13 +02:00
DRracer
67e9b4c096
IR fsensor fixes (#2632)
* MK3S IR sensor detection and safe operational range fix
* debug, change of fsensor_IR_check behavior
* more doc + disable debug print voltage
* fix displaying MSG_04_OR_NEWER and MSG_03.... kudos to @ovariludovit
* better handling of fsensor not responding scenario
2020-04-28 10:20:21 +02:00