MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.26k stars 19.23k forks source link

[BUG] Error: "Please select no more than one LCD controller option." Wanhao D6 #16087

Closed Deneteus closed 4 years ago

Deneteus commented 4 years ago

### Bug Description

PlatformIO Build fails due to multiple errors when compiling using the Wanhao D6 Example configuration files included with Marlin 2.0

### My Configurations

I used the stock example configuration files for the Wanhao D6 and they failed to compile. \Marlin\config\examples\Wanhao\Duplicator 6\

Steps to Reproduce

  1. Copy the Wanhao D6 example configuration files to the Marlin project folder.
  2. Open the Marlin project in Atom and confirm the configuration.h file is the correct file.
  3. Under Platform IO Home choose Inspect and make sure the Project Environment is megatmega2560
  4. Choose PlatformIO on the tool bar and select Build.
  5. Watch as the Sanity Check Error occurs and the build fails.

Expected behavior: Example Configuration should compile with no errors.

Actual behavior: Multiple sanity check errors occur related to multiple LCD controller options.

Additional Information

Just to make sure my config had not been corrupted from the previous version I wiped out my Marlin folder and redownloaded it.

The software updates and updates to libraries had already been done before this. The printer is currently running an older version of Marlin 2.0 from earlier this year.

image

image

I am assuming its this line that's causing the issue.

image

thisiskeithb commented 4 years ago

Both ULTIPANEL and U8GLIB_SSD1306 are defined in that config. Comment out ULTIPANEL and see if your LCD still works after updating.

Deneteus commented 4 years ago

Both ULTIPANEL and U8GLIB_SSD1306 are defined in that config. Comment out ULTIPANEL and see if your LCD still works after updating.

Disabling Ultipanel causes this:

image

I disabled advanced_pause in the advanced config file and I was able to complete the build.

There was one error with the LiquidCrystal_SR1W.cpp and one with the DogM.cpp.

I was able to fix the Liquid Crystal and DogM error by changing the slash / in the line to another character. An entire schematic in that file is a bit much. LOL

image

image

image

boelle commented 4 years ago

Configurations, please Please ZIP up your Configuration.h and Configuration_adv.h files (as requested in the Issue template) and drop them into your next reply. We'll check them over and see if anything is amiss.

thisiskeithb commented 4 years ago

Configurations, please Please ZIP up your Configuration.h and Configuration_adv.h files (as requested in the Issue template) and drop them into your next reply. We'll check them over and see if anything is amiss.

They are using the stock D6 configs:

I used the stock example configuration files for the Wanhao D6 and they failed to compile. \Marlin\config\examples\Wanhao\Duplicator 6

boelle commented 4 years ago

They are using the stock D6 configs:

did not read that, just saw a missing zip

Deneteus commented 4 years ago

I figured there would be no point in attaching the stock files. [Uploading Wanhao D6 Marlin 2.0 Stock Example Configs.zip…]()

boelle commented 4 years ago

as said i did not read the post just looked if something was attached

but yeah standard config not working is kind of embarresing,

Deneteus commented 4 years ago

I tested using the firmware as compiled after those two changes and it failed.

shitcreek commented 4 years ago

The problem is line 1991: // #define U8GLIB_SSD1306 I've made the correction. Thanks.

thisiskeithb commented 4 years ago

Does this work with only ULTIPANEL defined? I thought U8GLIB_SSD1306 was required since this printer has an OLED screen.

There are extra options underneath U8GLIB_SSD1306 in the D6 config compared to the stock config which makes me think it's still required: https://github.com/MarlinFirmware/Marlin/blob/f64649933f3a2195df7a2bd3ec95ab6ed3885975/config/examples/Wanhao/Duplicator%206/Configuration.h#L1991-L1994

Stock config: https://github.com/MarlinFirmware/Marlin/blob/f64649933f3a2195df7a2bd3ec95ab6ed3885975/config/default/Configuration.h#L1978-L1982

shitcreek commented 4 years ago

It compiled without issue. @Deneteus mind testing this out to confirm it works with U8GLIB_SSD1306 undefined?

thisiskeithb commented 4 years ago

Digging back into the origins of this config, it came with both those LCD types enabled from the start. I wonder if something changed in SanityCheck.h for this to start throwing errors or if this config ever worked in the first place.

Deneteus commented 4 years ago

@shitcreek I had not tested it with the SSD1306 OLED LCD undefined. @thisiskeithb The motherboard for the D6 is an Ultimaker 2 clone. It is based on the ATMega2560 microcontroller.

image

thisiskeithb commented 4 years ago

If that doesn't work, it seems this Marlin port is popular and they have a different LCD defined:

//
// TinyBoy2 128x64 OLED / Encoder Panel
//
#define OLED_PANEL_TINYBOY2
#define LCD_RESET_PIN 5
Deneteus commented 4 years ago

If that doesn't work, it seems this Marlin port is popular and they have a different LCD defined:

//
// TinyBoy2 128x64 OLED / Encoder Panel
//
#define OLED_PANEL_TINYBOY2
#define LCD_RESET_PIN 5

I'll test that in a minute!

thisiskeithb commented 4 years ago

This config builds with a single LCD defined now (as expected), so we just need confirmation that it works. 😄

Here's the binary I built while testing with OLED_PANEL_TINYBOY2 enabled: Wanhao-D6-Marlin-2.0.x-f646499.hex.zip

Deneteus commented 4 years ago

Got it! Just gonna go flash it!

Deneteus commented 4 years ago

I am waiting on a netbook that I use to update firmware to finish restarting from a Windows Update. It had been going for almost 8hrs. LOL

Deneteus commented 4 years ago

@thisiskeithb Alright it flashed. LCD works. I just need to build it with the Tiny LCD settings and different settings for a Bondtech extruder.

image

image

thisiskeithb commented 4 years ago

Thanks for finding this bug 🙂

PR #16117 will fix the default D6 config.

Edit: OLED screens sure are nice.

Deneteus commented 4 years ago

Do you know if there is an issue related to this?

image

Deneteus commented 4 years ago

I got my printer updated with all of the changes I needed. Rob's config files had some tweaks to the default feed rates, adaptive step smoothing and power loss recovery.

I enabled S_CURVE_acceleration, Bondtech ESTEPS, Tuned A4988 Stepper Defaults, Raised the max temp since I upgraded to Microswiss All Metal.

Deneteus Marlin 2.0 D6 Configs.zip

shitcreek commented 4 years ago

unused variable warnings can be ignored. Ideally we should haveisHeatnested inside a condition.

github-actions[bot] commented 4 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.