Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Splash Screen #4034

Merged
merged 1 commit into from
Jun 15, 2016

Conversation

AnHardt
Copy link
Contributor

@AnHardt AnHardt commented Jun 14, 2016

Custom Splash Screen for full graphic displays.
Too complicated for the hitachis without knowing what exactly to display.

Realisation of an idea from #3996

Used the big Marlin logo as an example.
Custom logo is displayed before the normal Marlin logo. No text. Text can be integrated into the graphic if needed.

@AnHardt
Copy link
Contributor Author

AnHardt commented Jun 14, 2016

Seems to be a problem with LIN_ADVANCE

The command "opt_set MOTHERBOARD BOARD_RUMBA" exited with 0.
0.01s$ opt_set EXTRUDERS 3
The command "opt_set EXTRUDERS 3" exited with 0.
0.01s$ opt_set TEMP_SENSOR_2 1
The command "opt_set TEMP_SENSOR_2 1" exited with 0.
0.01s$ opt_enable_adv LIN_ADVANCE
The command "opt_enable_adv LIN_ADVANCE" exited with 0.
7.62s$ build_marlin
Picked up JAVA_TOOL_OPTIONS: 
Loading configuration...
Xlib:  extension "RANDR" missing on display ":1.0".
Initializing packages...
Preparing boards...
Verifying...
sketch/stepper.cpp: In member function 'void Stepper::advance_M905()':
stepper.cpp:1127: error: 'code_value' was not declared in this scope
     if (code_seen('K')) extruder_advance_k = code_value();
                                                         ^
exit status 1
'code_value' was not declared in this scope
The command "build_marlin" exited with 1.

@thinkyhead
Copy link
Member

Should be ok now. This PR is fine as it is.

}
} while (u8g.nextPage());
delay(CUSTOM_START_BMP_DELAY);
#endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this perhaps be this instead…

#if ENABLED(CUSTOM_START_BMP)
  if (show_bootscreen) {
    u8g.firstPage();
    do {
      u8g.drawBitmapP((128-(CUSTOM_START_BMPWIDTH))/2, (64 - (CUSTOM_START_BMPHEIGHT))/2, CUSTOM_START_BMPBYTEWIDTH, CUSTOM_START_BMPHEIGHT, custom_start_bmp);
    } while (u8g.nextPage());
    delay(CUSTOM_START_BMP_DELAY);
  }
#endif

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of cause.

@AnHardt AnHardt force-pushed the custom-splash-screen branch 2 times, most recently from 4637779 to c534cd1 Compare June 14, 2016 02:04
@thinkyhead
Copy link
Member

Too quick!

@AnHardt
Copy link
Contributor Author

AnHardt commented Jun 14, 2016

Shouldn't all the parsing be done in Marlin_main.cpp?
That would result in better reusable functions and wouldn't spread the parser all over the files.

@thinkyhead
Copy link
Member

thinkyhead commented Jun 14, 2016

all the parsing be done in Marlin_main.cpp

Yes. I tend to agree. This was a matter of style "experimentation" to encapsulate the gcode handler for that command in the class — a thought that we might want to try going that direction for better encapsulation of functionality.

Requiring all the GCode handlers to reside in the same file (or compilation unit) as the GCode parser makes Marlin_main.cpp awfully huge now. But I suppose we could split all the GCode handlers into their own .h files and include them en-masse in Marlin_main.cpp as a way of shrinking the file. It bothers some to have .cpp-style code in .h files, but it's not the worst thing.

It would be cleaner to rename GCode handling functions based on what they do, and then have them take arguments instead of using the GCode parsing functions. But then some of these functions (like the G29 handlers) would end up needing a lot of parameters.

I know we're all still thinking about ways to get the parser to perform better, using tricks like getting all the arguments in advance for each command so the string only ever gets scanned one time. I really like the Matt Roberts' Firmware approach, which should be faster. But it would be a minor overhaul.

Custom Splash Screen for full graphic displays.

Too complicated for the hitachis without knowing what exactly to display.

On top of MarlinFirmware#4032
Realisation of an idea from MarlinFirmware#3996
@AnHardt AnHardt force-pushed the custom-splash-screen branch from c534cd1 to 02b3d6b Compare June 14, 2016 07:40
@AnHardt
Copy link
Contributor Author

AnHardt commented Jun 14, 2016

@thinkyhead

Matt Roberts' Firmware

The A-Z-array will take its space - but i think it would be a good investment for the g-codes with a lot of arguments. G0/G1 will profit a lot. That's what we are looking for. The codes with no, or few, arguments will likely suffer a bit from resetting the big array (26 * 4 byte)

@thinkyhead
Copy link
Member

thinkyhead commented Jun 15, 2016

likely suffer a bit from resetting the big array

I was thinking about that. It could just reset the indices that were found instead, but we'd have to store the found-argument indices in yet another little array.

@thinkyhead thinkyhead merged commit 0ad26d0 into MarlinFirmware:RCBugFix Jun 15, 2016
@thinkyhead
Copy link
Member

So #3996 should be altered to utilize this technique, or…? Not sure where we would set a flag to use his custom bootscreen, and we don't want to supplant this one. So… I guess, that PR should drop the custom boot screen and the custom code calculating the centering… and all that can exist in the Cartesio UI fork, not in the main Marlin.

@AnHardt AnHardt deleted the custom-splash-screen branch June 17, 2016 13:38
@thinkyhead thinkyhead mentioned this pull request Jul 8, 2016
@jbrazio jbrazio modified the milestone: 1.1.0 Jul 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants