3

According to this question, MKS 12864OLED Display setup, I need to add a patch to "Marlin_main.cpp" but this a large file with 14789 lines of code! I don't know where I have to put this patch. Please help me.

patch:

/*---------------MKS OLED patch_3-----------------------*/
#if defined (MKS_OLED96_128x64_FULL_GRAPHICS_CONTROLLER)
pinMode(LCD_PINS_DC, OUTPUT);
pinMode(LCD_PINS_RST, OUTPUT);
digitalWrite(LCD_PINS_RST , LOW);
delay(1000);
digitalWrite(LCD_PINS_RST , HIGH);
#endif
/*---------------MKS OLED patch_3-----------------------*/
Greenonline
  • 5,831
  • 7
  • 30
  • 60
2012User
  • 541
  • 4
  • 15
  • The question you refer to has an incorrect answer, I've investigated it but never got the time to post a proper answer. If I recollect correctly, the latest version is not compatible with the suggested fix. Parts are already implemented in the code. When I have the time I will look into the problem again and post an answer. Note that I do not own such a display. – 0scar May 04 '19 at 21:02
  • I did post an [answer](/a/8273/) on [Connecting OLED 128x64 LCD; dogm_lcd_implementation.h is missing for patching](https://3dprinting.stackexchange.com/questions/8272/connecting-oled-128x64-lcd-dogm-lcd-implementation-h-is-missing-for-patching). I guess that is part of the solution. Do note that we are active on [chat]! – 0scar May 04 '19 at 21:11
  • Yes, thank you. but it's not working yet. I guess the patch for "Marlin_main.cpp” is needed too. – 2012User May 04 '19 at 21:16
  • Please join in [chat] to prevent a long comment discussion. I'll be looking into it tomorrow. – 0scar May 07 '19 at 09:51
  • I've seen that kind if ifdef in the .h file, before setup(), in other Arduno programs. I've never had a sketch that used .cpp file, but I suspect if it goes there, it would be after LCD_PINS_DC and LCD_PINS_RST were assigned to pins. – CrossRoads May 21 '19 at 16:47
  • From [your comment](https://3dprinting.stackexchange.com/questions/8256/mks-12864oled-display-setup#comment16240_9887), it seems as if @0scar's answer to the previous question fixed your issue. Therefore, closing this as a duplicate. – Greenonline Oct 28 '21 at 03:31

0 Answers0