bigtreetech / BIGTREETECH-TouchScreenFirmware

support TFT35 V1.0/V1.1/V1.2/V2.0/V3.0, TFT28, TFT24 V1.1, TFT43, TFT50, TFT70
GNU General Public License v3.0
1.3k stars 1.65k forks source link

Bug when printing from Marlin mode. #1058

Closed Neme77 closed 3 years ago

Neme77 commented 4 years ago

Description

When a print is launched from the Marlin mode, the display changes and automatically activates the TFT mode

Steps to reproduce

  1. [Update to latest release]
  2. [launch print from Marlin mode]

Hardware Variant

TFT35 V3

TFT Firmware Version & Main Board Firmware details

Latest Firmware for TFT35 V3 with SKR 1.4 Marlin Bugfix 2.0.6.1

Additional Information

blueeagle69 commented 4 years ago

Question for all. In configuration_adv.h how have SD? Not defined, onboard, LCD, Custom?

In Marlin I have the SD set to ONBOARD. Apologies if I got confused with your comment.

zonalimitatore commented 4 years ago

No problem dude πŸ˜‰

blueeagle69 commented 4 years ago

Okay, on my hard disk, I found. older firmware dated 16/09/2020 (UK date format) ! It was the build that had the fan_ctrl_count bug. I flashed that to the TFT to replace the working Biqu B1 build I had on it. Sure enough as soon as the firmware uploaded I switched to Marlin mode and started a print. And yet again, same thing. Screen switched to TFT mode, no touch sounds and Stop button not working. Getting annoyed by now so I walked away from the printer. When I returned to it, I decided to reset the screen (using the Reset.txt) When the screen booted up and I switched to Marlin mode, I noticed that all of my config.ini changes were wiped out. My custom settings were Marlin Title hidden, Marlin Full screen, and Marlin LCD colours (not relevant, but hey!) But.... I started a print in Marlin mode (again) and this time the screen stayed in Marlin mode! I power cycled the printer to test the screen again, still working. So I then re-flashed my config file. After that was done, the bug returned. Switching to TFT on print confirm in Marlin mode again. Soooo, I then re-uploaded the Reset.txt to reset the screen again. Sure enough all of my config.ini changes were wiped out again, but the bug vanished, and so far I can print from Marlin mode without the screen switching back to TFT. What is weird though, is when the bug does occur, you don't get the small delay like you do with the normal mode change. It's instant. No touch UI sound and a non-working Stop button. And when you hit reset, the screen boots in Marlin mode and not the last mode it was in (TFT). Which could explain why the screen still thinks it's in Marlin mode. Anyway I am uploading an archive of the source files, so the relevant clever people can have a look. https://drive.google.com/file/d/1C8Q1KAyLXV41a4v33ytBFCZDflgZlC6r/view?usp=sharing It would have been so much easier if a TFT firmware upgrade had the version number incremented!

carl1961 commented 4 years ago

your link not good, so posting it here https://drive.google.com/file/d/1C8Q1KAyLXV41a4v33ytBFCZDflgZlC6r/view?usp=sharing

On Sun, Oct 4, 2020 at 7:09 PM blueeagle69 notifications@github.com wrote:

Okay, on my hard disk, I found. older firmware dated 16/09/2020 (UK date format) ! It was the build that had the fan_ctrl_count bug. I flashed that to the TFT to replace the working Biqu B1 build I had on it. Sure enough as soon as the firmware uploaded I switched to Marlin mode and started a print. And yet again, same thing. Screen switched to TFT mode, no touch sounds and Stop button not working. Getting annoyed by now so I walked away from the printer. When I returned to it, I decided to reset the screen (using the Reset.txt) When the screen booted up and I switched to Marlin mode, I noticed that all of my config.ini changes were wiped out. My custom settings were Marlin Title hidden, Marlin Full screen, and Marlin LCD colours (not relevant, but hey!) But.... I started a print in Marlin mode (again) and this time the screen stayed in Marlin mode! I power cycled the printer to test the screen again, still working. So I then re-flashed my config file. After that was done, the bug returned. Switching to TFT on print confirm in Marlin mode again. Soooo, I then re-uploaded the Reset.txt to reset the screen again. Sure enough all of my config.ini changes were wiped out again, but the bug vanished, and so far I can print from Marlin mode without the screen switching back to TFT. What is weird though, is when the bug does occur, you don't get the small delay like you do with the normal mode change. It's instant. No touch UI sound and a non-working Stop button. And when you hit reset, the screen boots in Marlin mode and not the last mode it was in (TFT). Which could explain why the screen still thinks it's in Marlin mode. Anyway I am uploading an archive of the source files, so the relevant clever people can have a look.

https://drive.google.com/file/d/1C8Q1KAyLXV41a4v33ytBFCZDflgZlC6r/view?usp=sharing http://url It would have been so much easier if a TFT firmware upgrade had the version number incremented!

β€” You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bigtreetech/BIGTREETECH-TouchScreenFirmware/issues/1058#issuecomment-703336197, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXKJNM4E3NZE6V2WCGWQMDSJEFCBANCNFSM4QZTP26A .

blueeagle69 commented 4 years ago

your link not good, so posting it here https://drive.google.com/file/d/1C8Q1KAyLXV41a4v33ytBFCZDflgZlC6r/view?usp=sharing

Thank you. Not entirely sure what happened there. It is late here, but I ain't that dopey, Lol. But thanks once-again. At least they have the older source code to inspect.

zonalimitatore commented 4 years ago

It's very late, or too soon here. I'm not sure I've understand all 😁. Anyway...with the firm in the link,the problem vanish?

oldman4U commented 4 years ago

For those compiling their own software using VSC and PIO they can always go back "in time" doing the following:

On the main screen click on "Code" and then on "Commits" like shown here:

Screenshot 2020-10-05 at 11 39 11

This shows all the commits which have been made. Clicking on the "<>" of one of the commits allows you to download this particular build.

Screenshot 2020-10-05 at 11 40 18

It would be important to find out which commit is the last one which is working properly and which is the first one where the reported issue happened. Then we know what has been added and which developer did it.

blueeagle69 commented 4 years ago

It's very late, or too soon here. I'm not sure I've understand all 😁. Anyway...with the firm in the link,the problem vanish?

It appears to (so far). If I flash the Reset.txt and murder all of my config settings. Could it be something in the config file? Will attempt to flash the latest source, without and with Reset.txt

zonalimitatore commented 4 years ago

Honestly I don't know where bump my head. I can't find nothing in source linked. But "something" must be😠. But no,for me isn't in config.ini file

blueeagle69 commented 4 years ago

I just tested the latest source again. The bug is present regardless of running the Reset.txt. So for now I will return to the one I uploaded and run the Reset.txt to get it working. It worked the last two occasions 😐 Cheers!

zonalimitatore commented 4 years ago

Omg....I don't know how/where take the biqu sources

oldman4U commented 4 years ago

Has someone of you a TFT35 E3 v3 and a SKR E3 DIP? Usually I do not print from on board SD card but did so after updating to latest TFT and v2.0.7 Marlin and could not reproduce the problem.

zonalimitatore commented 4 years ago

Not me. But,are you sure that the problem dont appears?

oldman4U commented 4 years ago

I started a print in Marlin mode from an SD Card in the SKR mainboard and it did not switch to touchscreen. Have sd card support turned on in Marlin and tested with different defaults. Even the defaults made no difference I could always print without changing to touchscreen. In TFT firmware I only changed the environment to match the E3 TFT but nothing else. Could make a movie tomorrow to verify I do everything right.

zonalimitatore commented 4 years ago

Amazing....I cant compile last version,because,my printer,have a job to do...and remains 2 days to complete! Or surely i try on the fly!

blueeagle69 commented 4 years ago

Okay I have more news, sure to give you all a nervous breakdown. I'm planning on having one 😜 I flashed back to the older build I had on my hard disk. But because the Reset.txt wipes out all of my custom config settings I decided to change them at source code level in Configuration.h. I also mirrored the settings that are configurable in Config.ini, so if I had to use Reset.txt I would still get my custom settings because I changed them in Configuration.h Sure enough, my screeen switched to TFT mode again. So I placed the Reset.txt file on the SD. This time it didn't fix it. Which was down to the fact I changed settings in configuration.h! Knowing this I re-downloaded the latest source, but this time I didn't change any code, and I left the Config.ini as is. Guess what? So far it's working with the latest build. So a setting I change in source or config.ini is causing it.

The following settings I change in the config.ini and or Configuration.h

Lastly in Selectmode.c I change;

So as far as I can make out, the firmware is fine, just as long as I don't make any changes, configurable or other in source or config.ini. So far because I haven't changed a thing, the screen stays in Marlin mode when starting a print. To say I'm completely flummoxed is an understatement. I would try one setting at a time and flash, but I don't think the screen will like me very much after that.

blueeagle69 commented 4 years ago

Amazing....I cant compile last version,because,my printer,have a job to do...and remains 2 days to complete! Or surely i try on the fly!

You're a braver man than I!

zonalimitatore commented 4 years ago

But why all these mystical mysteries? I can't understand why the screen doesn't stand still! Stay in the mode I choose and stooooop. Omg .... I think there is a lot of work to be done .... we need to find out what causes this. It's strange and i don't know why..... but I'm interested in that "serial always on" (premonition)

UPDATE: This can be intresting.... Under \API\configuration.inc i find this comment:

//after changing/adding/removing a keyword, change the CONFIG_FLASH_SIGN in Settings.h

So in settings.h: // Config version support // change if new elements/keywords are added/removed/changed in the configuration.h Format YYYYMMDD // this number should match the CONFIG_VERSION in configuration.h

define CONFIG_SUPPPORT 20200810

define FONT_FLASH_SIGN 20200908 //(YYYYMMDD) change if fonts require updating

define CONFIG_FLASH_SIGN 20200908 //(YYYYMMDD) change if any keyword(s) in config.ini is added or removed

define LANGUAGE_FLASH_SIGN 20200908 //(YYYYMMDD) change if any keyword(s) in language pack is added or removed

define ICON_FLASH_SIGN 20200908 //(YYYYMMDD) change if any icon(s) is added or removed

define FONT_CHECK_SIGN (FONT_FLASH_SIGN + WORD_UNICODE)

define CONFIG_CHECK_SIGN (CONFIG_FLASH_SIGN + STRINGS_STORE_ADDR)

define LANGUAGE_CHECK_SIGN (LANGUAGE_FLASH_SIGN)

define ICON_CHECK_SIGN (ICON_FLASH_SIGN + ICON_ADDR(0))

So..... if we modify somethings,need to update the version in that file???? WTH?

oldman4U commented 4 years ago

I guess this is the version check which was added by Gurmeet to make sure users update ALL components and not just the firmware. Updating only parts caused several issues incl. crashes.

zonalimitatore commented 4 years ago

Idk...this is code from last one firmw

blueeagle69 commented 4 years ago

Yep it's strange one. Been testing the screen for two days, and so far it's working as expected. Albeit without changing anyting in source or the flashable config.ini. At least I can change Marlin mode to full screen in the menu. I just wish now I could high that "12864 Simulator" banner from the menu too. But for now, as long as I can run the latest firmware I'm content. Even though that banner text triggers me πŸ˜‘ --Off topic-- The upside is, the Bigtreetech Smart Filament Sensor is working in TFT mode when connected to the mainboard. So now I can use it in Marlin mode and TFT! I stumbled upon this when doing a dummy print with no filament. Everything appeared to worked perfectly. Everything Marlin would spit out during runout appeared on the TFT.

zonalimitatore commented 4 years ago

For me the only way,it's try commit by commit

oldman4U commented 4 years ago

Change it Eagle, change it!!!!

blueeagle69 notifications@github.com schrieb am Mi. 7. Okt. 2020 um 01:13:

Yep it's strange one. Been testing the screen for two days, and so far it's working as expected. Albeit without changing anyting in source or the flashable config.ini. At least I can change Marlin mode to full screen in the menu. I just wish now I could high that "12864 Simulator" banner from the menu too. But for now, as long as I can run the latest firmware I'm content. Even though that banner text triggers me πŸ˜‘ --Off topic-- The upside is, the Bigtreetech Smart Filament Sensor is working in TFT mode when connected to the mainboard. So now I can use it in Marlin mode and TFT! I stumbled upon this when doing a dummy print with no filament. Everything appeared to worked perfectly. Everything Marlin would spit out during runout appeared on the TFT.

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bigtreetech/BIGTREETECH-TouchScreenFirmware/issues/1058#issuecomment-704601282, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM6XKZFSLNL6OSMG3F6VCN3SJOQDDANCNFSM4QZTP26A .

blueeagle69 commented 4 years ago

So you want me to see what triggers the bug? 😬

oldman4U commented 4 years ago

I want to see you fly high in the sky. But if this is not possible.... yes. 😁

blueeagle69 commented 4 years ago

LMAO. Will do! Not sure about the flying high though🀣

oldman4U commented 4 years ago

There is always a beginning....... followed by a hard crash😁

blueeagle69 commented 4 years ago

You can say that again 🀣 Will start changing config values one by one (starting with the hide banner option!) and see what happens 😁

oldman4U commented 4 years ago

Should be fast with the config.ini as the only thing you have to change.

oldman4U commented 4 years ago

Btw. The worst case and the most likely is, that you will not find one value. But let's see. Good luck

blueeagle69 commented 4 years ago

True πŸ˜‰ Cheers bud. Will let you know. Just received a Steam call from a friend who realised his mic wasn't plugged in, followed by is mic not working! Oh the fun!

oldman4U commented 4 years ago

Almost an evergreen 🀣

blueeagle69 notifications@github.com schrieb am Do. 8. Okt. 2020 um 00:14:

True πŸ˜‰ Cheers bud. Will let you know. Just received a Steam call from a friend who realised his mic wasn't plugged in, followed by is mic not working! Oh the fun!

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bigtreetech/BIGTREETECH-TouchScreenFirmware/issues/1058#issuecomment-705221674, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM6XKZFAJXT2QTMAHFVXWH3SJTR5DANCNFSM4QZTP26A .

blueeagle69 commented 4 years ago

I found it! I went through the config.ini changing values I normally change one by one and uploading the config each time. The screen worked as normal, staying in Marlin mode, until I got to serial_always_on:0 I normally enable it switching it to "1". After uploading the config change to the screen the problem returned. I put it back to "0" and re-uploaded, and the screen works as normal. Repeated it just to make sure. So in my case at least (can't speak for the others) no matter how silent they are! The problem is caused by putting serial_always_on:1 in the config file! I'll be expecting my gold star in the mail 🀣

zonalimitatore commented 4 years ago

Ddddddude!!!!! I saw was because of that params 😁😁 Give me the gold 🌟 πŸ˜‚

zonalimitatore commented 4 years ago

HereπŸ˜†πŸ˜†πŸ˜†

Omg .... I think there is a lot of work to be done .... we need to find out what causes this. It's strange and i don't know why..... but I'm interested in that "serial always on" (premonition)

oldman4U commented 4 years ago

@blueeagle69 I would love to give you the gold star, but from me you get bronze so far, why?

  1. Even you found it and I can also confirm that changing serial always on activated causes the same issue on my printer, neme77 has to confirm that is also works for him.

  2. Now the work has to be done by finding out which PR caused this. So someone has to go back in time and look for the merge which caused this. neme77 reported this on Sep. 5th, so it has to be before that date.

Once those two things are done, you get all the golden stars of the world - at least from me.

;-)

PS: Whats about your ????.... waiting for an answer from you.

zonalimitatore commented 4 years ago

TODO:

blueeagle69 commented 4 years ago

@blueeagle69 I would love to give you the gold star, but from me you get bronze so far, why?

  1. Even you found it and I can also confirm that changing serial always on activated causes the same issue on my printer, neme77 has to confirm that is also works for him.
  2. Now the work has to be done by finding out which PR caused this. So someone has to go back in time and look for the merge which caused this. neme77 reported this on Sep. 5th, so it has to be before that date.

Once those two things are done, you get all the golden stars of the world - at least from me.

;-)

PS: Whats about your ????.... waiting for an answer from you.

I just replied to your post my other post πŸ˜€

zonalimitatore commented 4 years ago

30may no issues IMG_20201008_220419

oldman4U commented 4 years ago

@zonalimitatore Your firmware is almost as old as I am. Please update. Thank you;-)

zonalimitatore commented 4 years ago

Yes I know....it's for test "back in time"

oldman4U commented 4 years ago

Not sure the EAGLE want the help of a bluish green frog in a red shirt...

blueeagle69 commented 4 years ago

LMAO! I'm not saying a word 🀣 @zonalimitatore Great work. Saves giving me a headache!

oldman4U commented 4 years ago

But he is laughing....

So I would not help him...;-))))))

zonalimitatore commented 4 years ago

13 Jul no problems 19 Aug no problem

oldman4U commented 4 years ago

@zonalimitatore

Whats up! Are you sleeping!!?? No update for 7h!!

πŸ€ͺ

zonalimitatore commented 4 years ago

@zonalimitatore

Whats up! Are you sleeping!!?? No update for 7h!!

πŸ€ͺ

Yyyyyyep! Wake up nowπŸ™ƒ Ready for test in free times😝

zonalimitatore commented 4 years ago

20 Aug no problem

oldman4U commented 4 years ago

zonalimitatore! Fast like a Ferra... ,well, that's a bad comparison these days. Sorry.

;-)

zonalimitatore commented 4 years ago

26 no problem (but in the info it's 19aug) 27 aug problem present 27aug