_Bootscreen.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
  4. *
  5. * Based on Sprinter and grbl.
  6. * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
  7. *
  8. * This program is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  20. *
  21. */
  22. #pragma once
  23. /**
  24. * Animated boot screen example
  25. *
  26. * Create your own with Marlin Bitmap Converter
  27. * https://marlinfw.org/tools/u8glib/converter.html
  28. */
  29. #define CUSTOM_BOOTSCREEN_ANIMATED
  30. #define CUSTOM_BOOTSCREEN_TIMEOUT 500 // (ms) Extra timeout after the animation
  31. /**
  32. * Enable one of the following two options depending on your needs.
  33. * Also edit the "custom_bootscreen_animation" at the bottom of this file.
  34. */
  35. #define CUSTOM_BOOTSCREEN_FRAME_TIME 100 // (ms) Same time for all frames
  36. //#define CUSTOM_BOOTSCREEN_ANIMATED_FRAME_TIME // Each frame also has a duration
  37. #define CUSTOM_BOOTSCREEN_BMPWIDTH 120
  38. const unsigned char custom_start_bmp[] PROGMEM = {
  39. B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
  40. B01100000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,
  41. B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,
  42. B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111,
  43. B10000011,B11001111,B00000000,B00000000,B00001100,B00110000,B00111111,
  44. B10000111,B11111111,B10000000,B00000000,B00001100,B00110000,B00011111,
  45. B10000110,B01111001,B10000000,B00000000,B00001100,B00000000,B00001111,
  46. B10001100,B00110000,B11000111,B10000011,B10001100,B00110000,B11100111,
  47. B10001100,B00110000,B11001111,B11000111,B11001100,B00110001,B11110011,
  48. B10001100,B00110000,B11011100,B11101100,B11101100,B00110011,B10111001,
  49. B10001100,B00110000,B11011000,B01101100,B01101100,B00110011,B00011001,
  50. B10001100,B00110000,B11010000,B01101100,B00001100,B00110011,B00011001,
  51. B10001100,B00110000,B11011000,B01101100,B00001100,B00110011,B00011001,
  52. B10001100,B00110000,B11011100,B01101100,B00001110,B00111011,B00011001,
  53. B10001100,B00110000,B11001111,B01111100,B00000111,B10011111,B00011001,
  54. B10001100,B00110000,B11000111,B01111100,B00000011,B10001111,B00011001,
  55. B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000010,
  56. B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110,
  57. B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111000
  58. };
  59. const unsigned char custom_start_bmp1[] PROGMEM = {
  60. B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
  61. B01100000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,
  62. B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,
  63. B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111,
  64. B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,
  65. B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011111,
  66. B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001111,
  67. B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,
  68. B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
  69. B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,
  70. B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,
  71. B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,
  72. B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,
  73. B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,
  74. B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,
  75. B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,
  76. B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000010,
  77. B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110,
  78. B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111000
  79. };
  80. const unsigned char custom_start_bmp2[] PROGMEM = {
  81. B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
  82. B01100000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,
  83. B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,
  84. B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111,
  85. B10000011,B11001111,B00000000,B00000000,B00000000,B00000000,B00111111,
  86. B10000111,B11111111,B10000000,B00000000,B00000000,B00000000,B00011111,
  87. B10000110,B01111001,B10000000,B00000000,B00000000,B00000000,B00001111,
  88. B10001100,B00110000,B11000000,B00000000,B00000000,B00000000,B00000111,
  89. B10001100,B00110000,B11000000,B00000000,B00000000,B00000000,B00000011,
  90. B10001100,B00110000,B11000000,B00000000,B00000000,B00000000,B00000001,
  91. B10001100,B00110000,B11000000,B00000000,B00000000,B00000000,B00000001,
  92. B10001100,B00110000,B11000000,B00000000,B00000000,B00000000,B00000001,
  93. B10001100,B00110000,B11000000,B00000000,B00000000,B00000000,B00000001,
  94. B10001100,B00110000,B11000000,B00000000,B00000000,B00000000,B00000001,
  95. B10001100,B00110000,B11000000,B00000000,B00000000,B00000000,B00000001,
  96. B10001100,B00110000,B11000000,B00000000,B00000000,B00000000,B00000001,
  97. B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000010,
  98. B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110,
  99. B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111000
  100. };
  101. const unsigned char custom_start_bmp3[] PROGMEM = {
  102. B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
  103. B01100000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,
  104. B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,
  105. B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111,
  106. B10000011,B11001111,B00000000,B00000000,B00000000,B00000000,B00111111,
  107. B10000111,B11111111,B10000000,B00000000,B00000000,B00000000,B00011111,
  108. B10000110,B01111001,B10000000,B00000000,B00000000,B00000000,B00001111,
  109. B10001100,B00110000,B11000111,B10000000,B00000000,B00000000,B00000111,
  110. B10001100,B00110000,B11001111,B11000000,B00000000,B00000000,B00000011,
  111. B10001100,B00110000,B11011100,B11100000,B00000000,B00000000,B00000001,
  112. B10001100,B00110000,B11011000,B01100000,B00000000,B00000000,B00000001,
  113. B10001100,B00110000,B11010000,B01100000,B00000000,B00000000,B00000001,
  114. B10001100,B00110000,B11011000,B01100000,B00000000,B00000000,B00000001,
  115. B10001100,B00110000,B11011100,B01100000,B00000000,B00000000,B00000001,
  116. B10001100,B00110000,B11001111,B01110000,B00000000,B00000000,B00000001,
  117. B10001100,B00110000,B11000111,B01110000,B00000000,B00000000,B00000001,
  118. B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000010,
  119. B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110,
  120. B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111000
  121. };
  122. const unsigned char custom_start_bmp4[] PROGMEM = {
  123. B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
  124. B01100000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,
  125. B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,
  126. B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111,
  127. B10000011,B11001111,B00000000,B00000000,B00000000,B00000000,B00111111,
  128. B10000111,B11111111,B10000000,B00000000,B00000000,B00000000,B00011111,
  129. B10000110,B01111001,B10000000,B00000000,B00000000,B00000000,B00001111,
  130. B10001100,B00110000,B11000111,B10000011,B10000000,B00000000,B00000111,
  131. B10001100,B00110000,B11001111,B11000111,B11000000,B00000000,B00000011,
  132. B10001100,B00110000,B11011100,B11101100,B11100000,B00000000,B00000001,
  133. B10001100,B00110000,B11011000,B01101100,B01100000,B00000000,B00000001,
  134. B10001100,B00110000,B11010000,B01101100,B00000000,B00000000,B00000001,
  135. B10001100,B00110000,B11011000,B01101100,B00000000,B00000000,B00000001,
  136. B10001100,B00110000,B11011100,B01101100,B00000000,B00000000,B00000001,
  137. B10001100,B00110000,B11001111,B01111100,B00000000,B00000000,B00000001,
  138. B10001100,B00110000,B11000111,B01111100,B00000000,B00000000,B00000001,
  139. B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000010,
  140. B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110,
  141. B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111000
  142. };
  143. const unsigned char custom_start_bmp5[] PROGMEM = {
  144. B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
  145. B01100000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,
  146. B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,
  147. B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111,
  148. B10000011,B11001111,B00000000,B00000000,B00001100,B00000000,B00111111,
  149. B10000111,B11111111,B10000000,B00000000,B00001100,B00000000,B00011111,
  150. B10000110,B01111001,B10000000,B00000000,B00001100,B00000000,B00001111,
  151. B10001100,B00110000,B11000111,B10000011,B10001100,B00000000,B00000111,
  152. B10001100,B00110000,B11001111,B11000111,B11001100,B00000000,B00000011,
  153. B10001100,B00110000,B11011100,B11101100,B11101100,B00000000,B00000001,
  154. B10001100,B00110000,B11011000,B01101100,B01101100,B00000000,B00000001,
  155. B10001100,B00110000,B11010000,B01101100,B00001100,B00000000,B00000001,
  156. B10001100,B00110000,B11011000,B01101100,B00001100,B00000000,B00000001,
  157. B10001100,B00110000,B11011100,B01101100,B00001110,B00000000,B00000001,
  158. B10001100,B00110000,B11001111,B01111100,B00000111,B10000000,B00000001,
  159. B10001100,B00110000,B11000111,B01111100,B00000011,B10000000,B00000001,
  160. B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000010,
  161. B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110,
  162. B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111000
  163. };
  164. const unsigned char custom_start_bmp6[] PROGMEM = {
  165. B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
  166. B01100000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,
  167. B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,
  168. B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111,
  169. B10000011,B11001111,B00000000,B00000000,B00001100,B00110000,B00111111,
  170. B10000111,B11111111,B10000000,B00000000,B00001100,B00110000,B00011111,
  171. B10000110,B01111001,B10000000,B00000000,B00001100,B00000000,B00001111,
  172. B10001100,B00110000,B11000111,B10000011,B10001100,B00110000,B00000111,
  173. B10001100,B00110000,B11001111,B11000111,B11001100,B00110000,B00000011,
  174. B10001100,B00110000,B11011100,B11101100,B11101100,B00110000,B00000001,
  175. B10001100,B00110000,B11011000,B01101100,B01101100,B00110000,B00000001,
  176. B10001100,B00110000,B11010000,B01101100,B00001100,B00110000,B00000001,
  177. B10001100,B00110000,B11011000,B01101100,B00001100,B00110000,B00000001,
  178. B10001100,B00110000,B11011100,B01101100,B00001110,B00111000,B00000001,
  179. B10001100,B00110000,B11001111,B01111100,B00000111,B10011100,B00000001,
  180. B10001100,B00110000,B11000111,B01111100,B00000011,B10001100,B00000001,
  181. B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000010,
  182. B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110,
  183. B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111000
  184. };
  185. #ifdef CUSTOM_BOOTSCREEN_ANIMATED_FRAME_TIME
  186. // Each Frame has its own custom duration
  187. const boot_frame_t custom_bootscreen_animation[] PROGMEM = {
  188. { custom_start_bmp1, 2000 }, // 2.0s
  189. { custom_start_bmp2, 100 }, // 0.1s x 5 frames
  190. { custom_start_bmp3, 100 },
  191. { custom_start_bmp4, 100 },
  192. { custom_start_bmp5, 100 },
  193. { custom_start_bmp6, 100 },
  194. { custom_start_bmp, 500 } // 0.5s
  195. };
  196. #else
  197. // Each frames shows for CUSTOM_BOOTSCREEN_FRAME_TIME
  198. const unsigned char * const custom_bootscreen_animation[] PROGMEM = {
  199. custom_start_bmp1, custom_start_bmp2, custom_start_bmp3,
  200. custom_start_bmp4, custom_start_bmp5, custom_start_bmp6,
  201. custom_start_bmp
  202. };
  203. #endif