2016-03-25 07:19:46 +01:00
|
|
|
/**
|
2016-03-24 19:01:20 +01:00
|
|
|
* Marlin 3D Printer Firmware
|
2020-02-03 15:00:57 +01:00
|
|
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
2016-03-24 19:01:20 +01:00
|
|
|
*
|
|
|
|
* Based on Sprinter and grbl.
|
2019-06-28 06:57:50 +02:00
|
|
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
2016-03-24 19:01:20 +01:00
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2020-07-23 05:20:14 +02:00
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
2016-03-24 19:01:20 +01:00
|
|
|
*
|
|
|
|
*/
|
2019-07-05 05:44:12 +02:00
|
|
|
#pragma once
|
2016-03-24 19:01:20 +01:00
|
|
|
|
2016-03-25 07:19:46 +01:00
|
|
|
/**
|
2018-10-28 04:06:25 +01:00
|
|
|
* Standard Marlin Status Screen bitmaps
|
2016-07-19 04:16:30 +02:00
|
|
|
*
|
2018-02-01 01:43:33 +01:00
|
|
|
* Use the Marlin Bitmap Converter to make your own:
|
2020-04-13 00:21:02 +02:00
|
|
|
* https://marlinfw.org/tools/u8glib/converter.html
|
2016-03-24 19:01:20 +01:00
|
|
|
*/
|
|
|
|
|
2018-02-01 01:43:33 +01:00
|
|
|
#include "../../inc/MarlinConfig.h"
|
2020-10-17 02:36:25 +02:00
|
|
|
#include "marlinui_DOGM.h"
|
2015-02-03 09:52:29 +01:00
|
|
|
|
2018-11-28 04:15:52 +01:00
|
|
|
#define BW(N) ((N + 7) / 8)
|
|
|
|
|
2019-09-07 11:52:57 +02:00
|
|
|
#if ENABLED(CUSTOM_STATUS_SCREEN_IMAGE) && DISABLED(STATUS_COMBINE_HEATERS)
|
2018-01-15 10:14:23 +01:00
|
|
|
|
2019-09-07 11:52:57 +02:00
|
|
|
#undef STATUS_HEATERS_X
|
|
|
|
#undef STATUS_BED_X
|
2018-10-28 04:06:25 +01:00
|
|
|
/**
|
2018-11-20 14:36:37 +01:00
|
|
|
* Custom _Statusscreen.h files can define:
|
|
|
|
* - A custom logo image
|
|
|
|
* - A custom heater bitmap
|
|
|
|
* - A custom fan bitmap / animation
|
2018-10-28 04:06:25 +01:00
|
|
|
*
|
2018-11-20 14:36:37 +01:00
|
|
|
* See the included examples for guidance
|
2018-10-28 04:06:25 +01:00
|
|
|
*/
|
2018-02-23 16:06:00 +01:00
|
|
|
#include "../../../_Statusscreen.h"
|
2018-01-15 12:54:44 +01:00
|
|
|
|
2018-11-20 14:36:37 +01:00
|
|
|
#ifdef STATUS_SCREENWIDTH
|
|
|
|
#error "Your custom _Statusscreen.h needs to be converted for Marlin 2.0."
|
|
|
|
#endif
|
|
|
|
|
2018-11-24 06:14:56 +01:00
|
|
|
#endif
|
2018-02-01 01:43:33 +01:00
|
|
|
|
2018-11-20 14:36:37 +01:00
|
|
|
//
|
|
|
|
// Default Status Screen Heater or Hotends bitmaps
|
|
|
|
//
|
|
|
|
#if !STATUS_HEATERS_WIDTH && !STATUS_HOTEND1_WIDTH
|
2018-11-28 04:15:52 +01:00
|
|
|
#if ENABLED(STATUS_COMBINE_HEATERS)
|
2020-11-02 00:44:46 +01:00
|
|
|
#include "status/combined.h"
|
|
|
|
#else
|
2020-04-20 06:56:55 +02:00
|
|
|
#if HAS_HOTEND
|
2020-11-02 00:44:46 +01:00
|
|
|
#include "status/hotend.h"
|
2019-09-10 09:20:49 +02:00
|
|
|
#else
|
|
|
|
#define STATUS_HEATERS_HEIGHT 20
|
2018-11-20 14:36:37 +01:00
|
|
|
#endif
|
|
|
|
#endif
|
2020-11-02 00:44:46 +01:00
|
|
|
#endif
|
2018-11-20 14:36:37 +01:00
|
|
|
|
2020-11-02 00:44:46 +01:00
|
|
|
//
|
|
|
|
// Laser / Spindle
|
|
|
|
//
|
2019-12-02 04:20:15 +01:00
|
|
|
#if !STATUS_CUTTER_WIDTH && HAS_CUTTER
|
2020-11-02 00:44:46 +01:00
|
|
|
#include "status/cutter.h"
|
|
|
|
#endif
|
|
|
|
#ifndef STATUS_CUTTER_WIDTH
|
|
|
|
#define STATUS_CUTTER_WIDTH 0
|
|
|
|
#endif
|
2021-03-29 08:41:56 +02:00
|
|
|
#ifndef STATUS_CUTTER_BYTEWIDTH
|
|
|
|
#define STATUS_CUTTER_BYTEWIDTH BW(STATUS_CUTTER_WIDTH)
|
|
|
|
#endif
|
2019-12-02 04:20:15 +01:00
|
|
|
|
2021-03-06 21:13:28 +01:00
|
|
|
//
|
2021-03-29 08:41:56 +02:00
|
|
|
// Laser cooler
|
2021-03-06 21:13:28 +01:00
|
|
|
//
|
|
|
|
#if !STATUS_COOLER_WIDTH && HAS_COOLER
|
|
|
|
#include "status/cooler.h"
|
|
|
|
#endif
|
|
|
|
#ifndef STATUS_COOLER_WIDTH
|
|
|
|
#define STATUS_COOLER_WIDTH 0
|
|
|
|
#endif
|
2021-03-29 08:41:56 +02:00
|
|
|
#ifndef STATUS_COOLER_BYTEWIDTH
|
|
|
|
#define STATUS_COOLER_BYTEWIDTH BW(STATUS_COOLER_WIDTH)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
//
|
|
|
|
// Laser Flowmeter
|
|
|
|
//
|
2021-04-02 02:29:49 +02:00
|
|
|
#if !STATUS_FLOWMETER_WIDTH && ENABLED(LASER_COOLANT_FLOW_METER)
|
2021-03-29 08:41:56 +02:00
|
|
|
#include "status/cooler.h"
|
|
|
|
#endif
|
|
|
|
#ifndef STATUS_FLOWMETER_WIDTH
|
|
|
|
#define STATUS_FLOWMETER_WIDTH 0
|
|
|
|
#endif
|
|
|
|
#ifndef STATUS_FLOWMETER_BYTEWIDTH
|
|
|
|
#define STATUS_FLOWMETER_BYTEWIDTH BW(STATUS_FLOWMETER_WIDTH)
|
|
|
|
#endif
|
|
|
|
|
2021-06-07 21:15:09 +02:00
|
|
|
//
|
|
|
|
// Laser Ammeter
|
|
|
|
//
|
2021-06-08 14:51:28 +02:00
|
|
|
#if ENABLED(I2C_AMMETER)
|
|
|
|
#if !STATUS_AMMETER_WIDTH
|
|
|
|
#include "status/ammeter.h"
|
|
|
|
#endif
|
|
|
|
#ifndef STATUS_AMMETER_WIDTH
|
|
|
|
#define STATUS_AMMETER_WIDTH 0
|
|
|
|
#endif
|
2021-06-07 21:15:09 +02:00
|
|
|
#endif
|
2021-03-06 21:13:28 +01:00
|
|
|
|
2018-11-20 14:36:37 +01:00
|
|
|
//
|
2020-11-02 00:44:46 +01:00
|
|
|
// Bed
|
2018-11-20 14:36:37 +01:00
|
|
|
//
|
2019-09-07 11:52:57 +02:00
|
|
|
#if !STATUS_BED_WIDTH && HAS_HEATED_BED && DISABLED(STATUS_COMBINE_HEATERS)
|
2020-11-02 00:44:46 +01:00
|
|
|
#include "status/bed.h"
|
2020-02-26 15:09:57 +01:00
|
|
|
#endif
|
|
|
|
#ifndef STATUS_BED_WIDTH
|
2019-09-07 11:52:57 +02:00
|
|
|
#define STATUS_BED_WIDTH 0
|
|
|
|
#endif
|
2018-11-20 14:36:37 +01:00
|
|
|
|
2020-11-02 00:44:46 +01:00
|
|
|
//
|
|
|
|
// Chamber
|
|
|
|
//
|
2019-09-08 09:20:18 +02:00
|
|
|
#if !STATUS_CHAMBER_WIDTH && HAS_TEMP_CHAMBER && ((HOTENDS <= 4 && !HAS_HEATED_BED) || (HOTENDS <= 3 && HAS_HEATED_BED))
|
2020-11-02 00:44:46 +01:00
|
|
|
#include "status/chamber.h"
|
2020-03-02 03:21:30 +01:00
|
|
|
#endif
|
|
|
|
#ifndef STATUS_CHAMBER_WIDTH
|
2019-09-07 11:52:57 +02:00
|
|
|
#define STATUS_CHAMBER_WIDTH 0
|
|
|
|
#endif
|
2019-05-31 01:31:50 +02:00
|
|
|
|
2019-09-07 11:52:57 +02:00
|
|
|
// Can also be overridden in Configuration_adv.h
|
2018-11-20 14:36:37 +01:00
|
|
|
// If you can afford it, try the 3-frame fan animation!
|
|
|
|
// Don't compile in the fan animation with no fan
|
2020-04-24 04:42:38 +02:00
|
|
|
#if !HAS_FAN0 || (HOTENDS == 5 || (HOTENDS == 4 && BED_OR_CHAMBER) || BOTH(STATUS_COMBINE_HEATERS, HAS_HEATED_CHAMBER))
|
2018-11-24 06:14:56 +01:00
|
|
|
#undef STATUS_FAN_FRAMES
|
2019-09-07 11:52:57 +02:00
|
|
|
#elif !STATUS_FAN_FRAMES
|
2018-11-24 06:14:56 +01:00
|
|
|
#define STATUS_FAN_FRAMES 2
|
2019-01-03 13:03:06 +01:00
|
|
|
#elif STATUS_FAN_FRAMES > 4
|
|
|
|
#error "A maximum of 4 fan animation frames is currently supported."
|
2018-02-01 01:43:33 +01:00
|
|
|
#endif
|
2018-11-20 14:36:37 +01:00
|
|
|
|
2019-09-07 11:52:57 +02:00
|
|
|
#if HOTENDS > 4
|
|
|
|
#undef STATUS_LOGO_WIDTH
|
|
|
|
#undef STATUS_HEATERS_XSPACE
|
|
|
|
#define STATUS_HEATERS_XSPACE 24
|
|
|
|
#endif
|
|
|
|
|
2018-11-20 14:36:37 +01:00
|
|
|
//
|
|
|
|
// Provide default Fan Bitmaps
|
|
|
|
//
|
2019-09-07 11:52:57 +02:00
|
|
|
#if !STATUS_FAN_WIDTH && STATUS_FAN_FRAMES > 0
|
2020-11-02 00:44:46 +01:00
|
|
|
#include "status/fan.h"
|
2019-09-07 11:52:57 +02:00
|
|
|
#else
|
|
|
|
#undef STATUS_FAN_FRAMES
|
|
|
|
#define STATUS_FAN_WIDTH 0
|
|
|
|
#endif
|
|
|
|
|
2019-09-18 23:41:43 +02:00
|
|
|
#define _EXTRA_WIDTH (STATUS_FAN_WIDTH + STATUS_CHAMBER_WIDTH + STATUS_BED_WIDTH)
|
|
|
|
|
|
|
|
//
|
|
|
|
// Heater Bitmap X Space Requirements
|
|
|
|
//
|
|
|
|
#if !defined(STATUS_HEATERS_XSPACE) && (STATUS_HOTEND1_WIDTH || STATUS_HEATERS_WIDTH)
|
|
|
|
#if (HOTENDS == 3 || HOTENDS == 4) && ENABLED(STATUS_COMBINE_HEATERS)
|
|
|
|
// If more heaters or they're combined, 3 bytes
|
|
|
|
#define STATUS_HEATERS_XSPACE 24
|
|
|
|
#elif STATUS_LOGO_WIDTH > (LCD_PIXEL_WIDTH - (_EXTRA_WIDTH) - 26 * (HOTENDS)) // 128 - (20 + 24 + 26) == 58
|
|
|
|
// If the logo won't fit at 26 width
|
|
|
|
#define STATUS_HEATERS_XSPACE 24
|
|
|
|
#else
|
|
|
|
#define STATUS_HEATERS_XSPACE 26
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2019-09-07 11:52:57 +02:00
|
|
|
#if ENABLED(CUSTOM_STATUS_SCREEN_IMAGE)
|
2019-09-18 23:41:43 +02:00
|
|
|
//
|
|
|
|
// Disable the logo bitmap if insufficient space
|
|
|
|
//
|
|
|
|
#if STATUS_HEATERS_XSPACE
|
|
|
|
#define _HEATERS_WIDTH (HOTENDS * (STATUS_HEATERS_XSPACE)) // as many hotends as possible
|
2019-09-07 11:52:57 +02:00
|
|
|
#elif STATUS_HEATERS_WIDTH
|
2019-09-18 23:41:43 +02:00
|
|
|
#define _HEATERS_WIDTH STATUS_HEATERS_WIDTH
|
2019-10-04 23:18:18 +02:00
|
|
|
#elif HOTENDS
|
2019-09-18 23:41:43 +02:00
|
|
|
#error "Status screen heaters region was not specified."
|
2019-09-07 11:52:57 +02:00
|
|
|
#endif
|
2019-09-18 23:41:43 +02:00
|
|
|
#if STATUS_LOGO_WIDTH > (LCD_PIXEL_WIDTH - (_EXTRA_WIDTH + _HEATERS_WIDTH))
|
|
|
|
#warning "Unable to fit custom Status Screen logo. Disabling."
|
2019-09-07 11:52:57 +02:00
|
|
|
#undef STATUS_LOGO_WIDTH
|
|
|
|
#endif
|
|
|
|
|
2020-11-02 00:44:46 +01:00
|
|
|
#if !defined(STATUS_HEATERS_X) && ((HAS_HOTEND && STATUS_LOGO_WIDTH && BED_OR_CHAMBER_OR_FAN) || (HOTENDS >= 3 && !BED_OR_CHAMBER_OR_FAN))
|
2019-09-18 23:41:43 +02:00
|
|
|
#define _STATUS_HEATERS_X(H,S,N) ((LCD_PIXEL_WIDTH - (H * (S + N)) - (_EXTRA_WIDTH) + (STATUS_LOGO_WIDTH)) / 2)
|
2019-09-07 11:52:57 +02:00
|
|
|
#if STATUS_HOTEND1_WIDTH
|
|
|
|
#if HOTENDS > 2
|
|
|
|
#define STATUS_HEATERS_X _STATUS_HEATERS_X(HOTENDS, STATUS_HOTEND1_WIDTH, 6)
|
|
|
|
#else
|
|
|
|
#define STATUS_HEATERS_X _STATUS_HEATERS_X(HOTENDS, STATUS_HOTEND1_WIDTH, 4)
|
|
|
|
#endif
|
|
|
|
#else
|
|
|
|
#define STATUS_HEATERS_X _STATUS_HEATERS_X(1, STATUS_HEATERS_WIDTH, 4)
|
|
|
|
#endif
|
|
|
|
#endif
|
2018-02-01 01:43:33 +01:00
|
|
|
#endif
|
2018-11-20 14:36:37 +01:00
|
|
|
|
|
|
|
//
|
|
|
|
// Custom Logo Bitmap Properties
|
|
|
|
//
|
|
|
|
#ifndef STATUS_LOGO_WIDTH
|
|
|
|
#define STATUS_LOGO_WIDTH 0
|
2018-02-01 01:43:33 +01:00
|
|
|
#endif
|
2018-11-20 14:36:37 +01:00
|
|
|
#ifndef STATUS_LOGO_BYTEWIDTH
|
2018-11-28 04:15:52 +01:00
|
|
|
#define STATUS_LOGO_BYTEWIDTH BW(STATUS_LOGO_WIDTH)
|
2018-01-15 10:14:23 +01:00
|
|
|
#endif
|
2018-11-20 14:36:37 +01:00
|
|
|
#if STATUS_LOGO_WIDTH
|
|
|
|
#ifndef STATUS_LOGO_X
|
2020-11-02 00:44:46 +01:00
|
|
|
#ifdef STATUS_HEATERS_X
|
|
|
|
#define STATUS_LOGO_X ((STATUS_HEATERS_X - (STATUS_LOGO_WIDTH) - 1) / 2)
|
|
|
|
#else
|
|
|
|
#define STATUS_LOGO_X 0
|
|
|
|
#endif
|
2018-11-20 14:36:37 +01:00
|
|
|
#endif
|
|
|
|
#ifndef STATUS_LOGO_HEIGHT
|
|
|
|
#define STATUS_LOGO_HEIGHT (sizeof(status_logo_bmp) / (STATUS_LOGO_BYTEWIDTH))
|
|
|
|
#endif
|
2020-11-02 00:44:46 +01:00
|
|
|
#ifndef STATUS_LOGO_Y
|
2021-01-25 08:53:48 +01:00
|
|
|
#define STATUS_LOGO_Y _MAX(0U, (28U - _MIN(28U, STATUS_LOGO_HEIGHT)) / 2U)
|
2020-11-02 00:44:46 +01:00
|
|
|
#endif
|
2018-11-20 14:36:37 +01:00
|
|
|
static_assert(
|
|
|
|
sizeof(status_logo_bmp) == (STATUS_LOGO_BYTEWIDTH) * (STATUS_LOGO_HEIGHT),
|
|
|
|
"Status logo bitmap (status_logo_bmp) dimensions don't match data."
|
|
|
|
);
|
2018-01-15 10:14:23 +01:00
|
|
|
#endif
|
2018-11-20 14:36:37 +01:00
|
|
|
|
|
|
|
//
|
2019-09-18 23:41:43 +02:00
|
|
|
// Hotend Heater Bitmap starting X position
|
2018-11-20 14:36:37 +01:00
|
|
|
//
|
2019-09-18 23:41:43 +02:00
|
|
|
#if !defined(STATUS_HEATERS_X) && (STATUS_HOTEND1_WIDTH || STATUS_HEATERS_WIDTH)
|
|
|
|
#if STATUS_LOGO_BYTEWIDTH
|
|
|
|
#define STATUS_HEATERS_X (STATUS_LOGO_BYTEWIDTH * 8)
|
|
|
|
#elif ((STATUS_CHAMBER_WIDTH || STATUS_FAN_WIDTH) && (STATUS_BED_WIDTH && STATUS_HOTEND_BITMAPS == 3)) || \
|
|
|
|
((STATUS_CHAMBER_WIDTH || STATUS_FAN_WIDTH || STATUS_BED_WIDTH) && STATUS_HOTEND_BITMAPS == 4)
|
|
|
|
#define STATUS_HEATERS_X 5
|
|
|
|
#else
|
2020-04-24 04:42:38 +02:00
|
|
|
#if BOTH(STATUS_COMBINE_HEATERS, HAS_HEATED_BED) && HOTENDS <= 4
|
2019-09-07 11:52:57 +02:00
|
|
|
#define STATUS_HEATERS_X 5
|
2018-11-20 14:36:37 +01:00
|
|
|
#else
|
2019-09-18 23:41:43 +02:00
|
|
|
#define STATUS_HEATERS_X 8 // Like the included bitmaps
|
2018-11-20 14:36:37 +01:00
|
|
|
#endif
|
|
|
|
#endif
|
2018-01-15 10:14:23 +01:00
|
|
|
#endif
|
2018-11-20 14:36:37 +01:00
|
|
|
|
|
|
|
#if STATUS_HOTEND1_WIDTH
|
|
|
|
|
|
|
|
//
|
|
|
|
// Hotend images. A base hotend image and optional "ON" state image.
|
|
|
|
//
|
|
|
|
#ifndef STATUS_HOTEND_BITMAPS
|
|
|
|
#define STATUS_HOTEND_BITMAPS 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef STATUS_HOTEND2_WIDTH
|
|
|
|
#define STATUS_HOTEND2_WIDTH STATUS_HOTEND1_WIDTH
|
|
|
|
#endif
|
|
|
|
#ifndef STATUS_HOTEND3_WIDTH
|
|
|
|
#define STATUS_HOTEND3_WIDTH STATUS_HOTEND2_WIDTH
|
|
|
|
#endif
|
|
|
|
#ifndef STATUS_HOTEND4_WIDTH
|
|
|
|
#define STATUS_HOTEND4_WIDTH STATUS_HOTEND3_WIDTH
|
|
|
|
#endif
|
|
|
|
#ifndef STATUS_HOTEND5_WIDTH
|
2019-08-18 01:40:01 +02:00
|
|
|
#define STATUS_HOTEND5_WIDTH STATUS_HOTEND4_WIDTH
|
2018-11-20 14:36:37 +01:00
|
|
|
#endif
|
|
|
|
#ifndef STATUS_HOTEND6_WIDTH
|
2019-08-18 01:40:01 +02:00
|
|
|
#define STATUS_HOTEND6_WIDTH STATUS_HOTEND5_WIDTH
|
2018-11-20 14:36:37 +01:00
|
|
|
#endif
|
2020-05-25 22:42:31 +02:00
|
|
|
#ifndef STATUS_HOTEND7_WIDTH
|
|
|
|
#define STATUS_HOTEND7_WIDTH STATUS_HOTEND6_WIDTH
|
|
|
|
#endif
|
|
|
|
#ifndef STATUS_HOTEND8_WIDTH
|
|
|
|
#define STATUS_HOTEND8_WIDTH STATUS_HOTEND7_WIDTH
|
|
|
|
#endif
|
2018-11-20 14:36:37 +01:00
|
|
|
|
2021-04-20 07:44:19 +02:00
|
|
|
#define _SHNAME(N,T) STATUS_HOTEND##N##_##T,
|
|
|
|
|
|
|
|
constexpr uint8_t status_hotend_width[HOTENDS] = { REPEAT2_S(1, INCREMENT(HOTENDS), _SHNAME, WIDTH) };
|
2018-11-20 14:36:37 +01:00
|
|
|
#define STATUS_HOTEND_WIDTH(N) status_hotend_width[N]
|
|
|
|
|
|
|
|
#ifndef STATUS_HOTEND1_BYTEWIDTH
|
2018-11-28 04:15:52 +01:00
|
|
|
#define STATUS_HOTEND1_BYTEWIDTH BW(STATUS_HOTEND1_WIDTH)
|
2018-11-20 14:36:37 +01:00
|
|
|
#endif
|
|
|
|
#ifndef STATUS_HOTEND2_BYTEWIDTH
|
2018-11-28 04:15:52 +01:00
|
|
|
#define STATUS_HOTEND2_BYTEWIDTH BW(STATUS_HOTEND2_WIDTH)
|
2018-11-20 14:36:37 +01:00
|
|
|
#endif
|
|
|
|
#ifndef STATUS_HOTEND3_BYTEWIDTH
|
2018-11-28 04:15:52 +01:00
|
|
|
#define STATUS_HOTEND3_BYTEWIDTH BW(STATUS_HOTEND3_WIDTH)
|
2018-11-20 14:36:37 +01:00
|
|
|
#endif
|
|
|
|
#ifndef STATUS_HOTEND4_BYTEWIDTH
|
2018-11-28 04:15:52 +01:00
|
|
|
#define STATUS_HOTEND4_BYTEWIDTH BW(STATUS_HOTEND4_WIDTH)
|
2018-11-20 14:36:37 +01:00
|
|
|
#endif
|
|
|
|
#ifndef STATUS_HOTEND5_BYTEWIDTH
|
2018-11-28 04:15:52 +01:00
|
|
|
#define STATUS_HOTEND5_BYTEWIDTH BW(STATUS_HOTEND5_WIDTH)
|
2018-11-20 14:36:37 +01:00
|
|
|
#endif
|
|
|
|
#ifndef STATUS_HOTEND6_BYTEWIDTH
|
2018-11-28 04:15:52 +01:00
|
|
|
#define STATUS_HOTEND6_BYTEWIDTH BW(STATUS_HOTEND6_WIDTH)
|
2018-11-20 14:36:37 +01:00
|
|
|
#endif
|
2020-05-25 22:42:31 +02:00
|
|
|
#ifndef STATUS_HOTEND7_BYTEWIDTH
|
|
|
|
#define STATUS_HOTEND7_BYTEWIDTH BW(STATUS_HOTEND7_WIDTH)
|
|
|
|
#endif
|
|
|
|
#ifndef STATUS_HOTEND8_BYTEWIDTH
|
|
|
|
#define STATUS_HOTEND8_BYTEWIDTH BW(STATUS_HOTEND8_WIDTH)
|
|
|
|
#endif
|
2018-11-20 14:36:37 +01:00
|
|
|
|
2021-04-20 07:44:19 +02:00
|
|
|
constexpr uint8_t status_hotend_bytewidth[HOTENDS] = { REPEAT2_S(1, INCREMENT(HOTENDS), _SHNAME, BYTEWIDTH) };
|
2018-11-20 14:36:37 +01:00
|
|
|
#define STATUS_HOTEND_BYTEWIDTH(N) status_hotend_bytewidth[N]
|
|
|
|
|
|
|
|
#ifndef STATUS_HOTEND1_X
|
|
|
|
#define STATUS_HOTEND1_X STATUS_HEATERS_X
|
|
|
|
#endif
|
|
|
|
#ifndef STATUS_HOTEND2_X
|
|
|
|
#define STATUS_HOTEND2_X STATUS_HOTEND1_X + STATUS_HEATERS_XSPACE
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if HOTENDS > 2
|
2019-09-07 11:52:57 +02:00
|
|
|
#ifndef STATUS_HOTEND3_X
|
|
|
|
#define STATUS_HOTEND3_X STATUS_HOTEND2_X + STATUS_HEATERS_XSPACE
|
|
|
|
#endif
|
|
|
|
#ifndef STATUS_HOTEND4_X
|
|
|
|
#define STATUS_HOTEND4_X STATUS_HOTEND3_X + STATUS_HEATERS_XSPACE
|
|
|
|
#endif
|
|
|
|
#ifndef STATUS_HOTEND5_X
|
|
|
|
#define STATUS_HOTEND5_X STATUS_HOTEND4_X + STATUS_HEATERS_XSPACE
|
|
|
|
#endif
|
|
|
|
#ifndef STATUS_HOTEND6_X
|
|
|
|
#define STATUS_HOTEND6_X STATUS_HOTEND5_X + STATUS_HEATERS_XSPACE
|
|
|
|
#endif
|
2020-05-25 22:42:31 +02:00
|
|
|
#ifndef STATUS_HOTEND7_X
|
|
|
|
#define STATUS_HOTEND7_X STATUS_HOTEND6_X + STATUS_HEATERS_XSPACE
|
|
|
|
#endif
|
|
|
|
#ifndef STATUS_HOTEND8_X
|
|
|
|
#define STATUS_HOTEND8_X STATUS_HOTEND7_X + STATUS_HEATERS_XSPACE
|
|
|
|
#endif
|
2019-09-07 11:52:57 +02:00
|
|
|
|
2021-04-20 07:44:19 +02:00
|
|
|
constexpr uint8_t status_hotend_x[HOTENDS] = { REPEAT2_S(1, INCREMENT(HOTENDS), _SHNAME, X) };
|
2018-11-20 14:36:37 +01:00
|
|
|
#define STATUS_HOTEND_X(N) status_hotend_x[N]
|
2020-04-20 06:56:55 +02:00
|
|
|
#elif HAS_MULTI_HOTEND
|
2018-11-20 14:36:37 +01:00
|
|
|
#define STATUS_HOTEND_X(N) ((N) ? STATUS_HOTEND2_X : STATUS_HOTEND1_X)
|
|
|
|
#else
|
|
|
|
#define STATUS_HOTEND_X(N) STATUS_HOTEND1_X
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef STATUS_HOTEND_TEXT_X
|
|
|
|
#ifdef STATUS_HOTEND1_TEXT_X
|
|
|
|
#ifndef STATUS_HOTEND2_TEXT_X
|
|
|
|
#define STATUS_HOTEND2_TEXT_X STATUS_HOTEND1_TEXT_X + STATUS_HEATERS_XSPACE
|
|
|
|
#endif
|
|
|
|
#ifndef STATUS_HOTEND3_TEXT_X
|
|
|
|
#define STATUS_HOTEND3_TEXT_X STATUS_HOTEND2_TEXT_X + STATUS_HEATERS_XSPACE
|
|
|
|
#endif
|
|
|
|
#ifndef STATUS_HOTEND4_TEXT_X
|
|
|
|
#define STATUS_HOTEND4_TEXT_X STATUS_HOTEND3_TEXT_X + STATUS_HEATERS_XSPACE
|
|
|
|
#endif
|
|
|
|
#ifndef STATUS_HOTEND5_TEXT_X
|
2019-08-18 01:40:01 +02:00
|
|
|
#define STATUS_HOTEND5_TEXT_X STATUS_HOTEND4_TEXT_X + STATUS_HEATERS_XSPACE
|
2018-11-20 14:36:37 +01:00
|
|
|
#endif
|
|
|
|
#ifndef STATUS_HOTEND6_TEXT_X
|
2019-08-18 01:40:01 +02:00
|
|
|
#define STATUS_HOTEND6_TEXT_X STATUS_HOTEND5_TEXT_X + STATUS_HEATERS_XSPACE
|
2018-11-20 14:36:37 +01:00
|
|
|
#endif
|
2020-05-25 22:42:31 +02:00
|
|
|
#ifndef STATUS_HOTEND7_TEXT_X
|
|
|
|
#define STATUS_HOTEND7_TEXT_X STATUS_HOTEND6_TEXT_X + STATUS_HEATERS_XSPACE
|
|
|
|
#endif
|
|
|
|
#ifndef STATUS_HOTEND8_TEXT_X
|
|
|
|
#define STATUS_HOTEND8_TEXT_X STATUS_HOTEND7_TEXT_X + STATUS_HEATERS_XSPACE
|
2020-05-31 09:13:53 +02:00
|
|
|
#endif
|
2021-04-20 07:44:19 +02:00
|
|
|
constexpr uint8_t status_hotend_text_x[HOTENDS] = { REPEAT2_S(1, INCREMENT(HOTENDS), _SHNAME, TEXT_X) };
|
2018-11-20 14:36:37 +01:00
|
|
|
#define STATUS_HOTEND_TEXT_X(N) status_hotend_text_x[N]
|
|
|
|
#else
|
|
|
|
#define STATUS_HOTEND_TEXT_X(N) (STATUS_HOTEND1_X + 6 + (N) * (STATUS_HEATERS_XSPACE))
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2021-04-20 07:44:19 +02:00
|
|
|
#undef _SHNAME
|
|
|
|
|
2019-09-07 11:52:57 +02:00
|
|
|
#if STATUS_HOTEND_BITMAPS > 1 && DISABLED(STATUS_HOTEND_NUMBERLESS)
|
2018-11-21 07:50:06 +01:00
|
|
|
#define TEST_BITMAP_OFF status_hotend1_a_bmp
|
|
|
|
#define TEST_BITMAP_ON status_hotend1_b_bmp
|
2018-11-20 14:36:37 +01:00
|
|
|
#else
|
2018-11-21 07:50:06 +01:00
|
|
|
#define TEST_BITMAP_OFF status_hotend_a_bmp
|
|
|
|
#define TEST_BITMAP_ON status_hotend_b_bmp
|
2018-11-20 14:36:37 +01:00
|
|
|
#endif
|
|
|
|
#ifndef STATUS_HEATERS_HEIGHT
|
|
|
|
#define STATUS_HEATERS_HEIGHT (sizeof(TEST_BITMAP_OFF) / (STATUS_HOTEND1_BYTEWIDTH))
|
|
|
|
#endif
|
|
|
|
#ifndef STATUS_HEATERS_Y
|
|
|
|
#define STATUS_HEATERS_Y (20 - (STATUS_HEATERS_HEIGHT))
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define HOTEND0_BITMAP_SIZE (STATUS_HOTEND1_BYTEWIDTH) * (STATUS_HEATERS_HEIGHT)
|
|
|
|
static_assert(
|
|
|
|
sizeof(TEST_BITMAP_OFF) == HOTEND0_BITMAP_SIZE,
|
|
|
|
"Status hotend bitmap (" STRINGIFY(TEST_BITMAP_OFF) ") dimensions don't match data."
|
|
|
|
);
|
|
|
|
#ifdef STATUS_HOTEND_ANIM
|
|
|
|
static_assert(
|
|
|
|
sizeof(TEST_BITMAP_ON) == HOTEND0_BITMAP_SIZE,
|
|
|
|
"Status hotend bitmaps (" STRINGIFY(TEST_BITMAP_OFF) " and " STRINGIFY(TEST_BITMAP_ON) ") dimensions don't match."
|
|
|
|
);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#elif STATUS_HEATERS_WIDTH
|
|
|
|
|
2018-11-28 04:15:52 +01:00
|
|
|
#ifndef STATUS_HEATERS_XSPACE
|
|
|
|
#define STATUS_HEATERS_XSPACE 24
|
|
|
|
#endif
|
|
|
|
#ifndef STATUS_HOTEND_WIDTH
|
|
|
|
#define STATUS_HOTEND_WIDTH(N) 10
|
|
|
|
#endif
|
|
|
|
#ifndef STATUS_HOTEND_X
|
|
|
|
#define STATUS_HOTEND_X(N) (STATUS_HEATERS_X + 2 + (N) * (STATUS_HEATERS_XSPACE))
|
|
|
|
#endif
|
2018-11-20 14:36:37 +01:00
|
|
|
#ifndef STATUS_HOTEND_TEXT_X
|
2019-09-07 11:52:57 +02:00
|
|
|
#if HOTENDS == 4 && STATUS_LOGO_WIDTH
|
|
|
|
#define STATUS_HOTEND_TEXT_X(N) (STATUS_HEATERS_X + 6 + (N) * (STATUS_HEATERS_XSPACE))
|
|
|
|
#else
|
|
|
|
#define STATUS_HOTEND_TEXT_X(N) (STATUS_HEATERS_X + 6 + (N) * (STATUS_HEATERS_XSPACE))
|
|
|
|
#endif
|
2018-11-20 14:36:37 +01:00
|
|
|
#endif
|
|
|
|
#ifndef STATUS_HEATERS_BYTEWIDTH
|
2018-11-28 04:15:52 +01:00
|
|
|
#define STATUS_HEATERS_BYTEWIDTH BW(STATUS_HEATERS_WIDTH)
|
2018-11-20 14:36:37 +01:00
|
|
|
#endif
|
|
|
|
#ifndef STATUS_HEATERS_HEIGHT
|
|
|
|
#define STATUS_HEATERS_HEIGHT (sizeof(status_heaters_bmp) / (STATUS_HEATERS_BYTEWIDTH))
|
|
|
|
#endif
|
|
|
|
#ifndef STATUS_HEATERS_Y
|
|
|
|
#define STATUS_HEATERS_Y (20 - (STATUS_HEATERS_HEIGHT))
|
|
|
|
#endif
|
|
|
|
|
|
|
|
static_assert(
|
|
|
|
sizeof(status_heaters_bmp) == (STATUS_HEATERS_BYTEWIDTH) * (STATUS_HEATERS_HEIGHT),
|
|
|
|
"Status heaters bitmap (status_heaters_bmp) dimensions don't match data."
|
|
|
|
);
|
|
|
|
|
2019-09-10 09:20:49 +02:00
|
|
|
#else // HOTENDS == 0
|
|
|
|
|
2019-12-02 03:06:00 +01:00
|
|
|
#define STATUS_HOTEND_TEXT_X(N) 0
|
|
|
|
#define STATUS_HEATERS_Y 0
|
2019-09-10 09:20:49 +02:00
|
|
|
|
2018-01-15 10:14:23 +01:00
|
|
|
#endif
|
2018-11-20 14:36:37 +01:00
|
|
|
|
2019-12-02 04:20:15 +01:00
|
|
|
//
|
|
|
|
// Cutter Bitmap Properties
|
|
|
|
//
|
2021-03-29 08:41:56 +02:00
|
|
|
#if HAS_CUTTER
|
|
|
|
#if STATUS_CUTTER_WIDTH
|
2019-12-02 04:20:15 +01:00
|
|
|
|
2021-03-29 08:41:56 +02:00
|
|
|
#ifndef STATUS_CUTTER_X
|
|
|
|
#define STATUS_CUTTER_X (LCD_PIXEL_WIDTH - (STATUS_CUTTER_BYTEWIDTH + STATUS_CUTTER_BYTEWIDTH) * 8)
|
|
|
|
#endif
|
2019-12-02 04:20:15 +01:00
|
|
|
|
2021-03-29 08:41:56 +02:00
|
|
|
#ifndef STATUS_CUTTER_HEIGHT
|
|
|
|
#ifdef STATUS_CUTTER_ANIM
|
|
|
|
#define STATUS_CUTTER_HEIGHT(S) ((S) ? sizeof(status_cutter_on_bmp) / (STATUS_CUTTER_BYTEWIDTH) : sizeof(status_cutter_bmp) / (STATUS_CUTTER_BYTEWIDTH))
|
|
|
|
#else
|
|
|
|
#define STATUS_CUTTER_HEIGHT(S) (sizeof(status_cutter_bmp) / (STATUS_CUTTER_BYTEWIDTH))
|
|
|
|
#endif
|
2019-12-02 04:20:15 +01:00
|
|
|
#endif
|
|
|
|
|
2021-03-29 08:41:56 +02:00
|
|
|
#ifndef STATUS_CUTTER_Y
|
|
|
|
#define STATUS_CUTTER_Y(S) 4
|
|
|
|
#endif
|
2019-12-02 04:20:15 +01:00
|
|
|
|
2021-03-29 08:41:56 +02:00
|
|
|
#ifndef STATUS_CUTTER_TEXT_X
|
2021-04-13 00:08:57 +02:00
|
|
|
#define STATUS_CUTTER_TEXT_X (STATUS_CUTTER_X - 1)
|
2021-03-29 08:41:56 +02:00
|
|
|
#endif
|
2019-12-02 04:20:15 +01:00
|
|
|
|
2021-03-29 08:41:56 +02:00
|
|
|
#ifndef STATUS_CUTTER_TEXT_Y
|
|
|
|
#define STATUS_CUTTER_TEXT_Y 28
|
|
|
|
#endif
|
2019-12-02 04:20:15 +01:00
|
|
|
|
|
|
|
static_assert(
|
2021-04-13 00:08:57 +02:00
|
|
|
sizeof(status_cutter_bmp) == (STATUS_CUTTER_BYTEWIDTH) * STATUS_CUTTER_HEIGHT(0),
|
2021-03-29 08:41:56 +02:00
|
|
|
"Status cutter bitmap (status_cutter_bmp) dimensions don't match data."
|
2019-12-02 04:20:15 +01:00
|
|
|
);
|
2021-03-29 08:41:56 +02:00
|
|
|
#ifdef STATUS_CUTTER_ANIM
|
|
|
|
static_assert(
|
2021-04-13 00:08:57 +02:00
|
|
|
sizeof(status_cutter_on_bmp) == (STATUS_CUTTER_BYTEWIDTH) * STATUS_CUTTER_HEIGHT(1),
|
2021-03-29 08:41:56 +02:00
|
|
|
"Status cutter bitmap (status_cutter_on_bmp) dimensions don't match data."
|
|
|
|
);
|
|
|
|
#endif
|
2019-12-02 04:20:15 +01:00
|
|
|
|
2021-03-29 08:41:56 +02:00
|
|
|
#endif
|
2019-12-02 04:20:15 +01:00
|
|
|
#endif
|
|
|
|
|
2019-05-31 01:31:50 +02:00
|
|
|
//
|
|
|
|
// Chamber Bitmap Properties
|
|
|
|
//
|
|
|
|
#ifndef STATUS_CHAMBER_BYTEWIDTH
|
|
|
|
#define STATUS_CHAMBER_BYTEWIDTH BW(STATUS_CHAMBER_WIDTH)
|
|
|
|
#endif
|
2019-09-07 11:52:57 +02:00
|
|
|
#if STATUS_CHAMBER_WIDTH
|
2019-05-31 01:31:50 +02:00
|
|
|
|
|
|
|
#ifndef STATUS_CHAMBER_X
|
2019-09-07 11:52:57 +02:00
|
|
|
#define STATUS_CHAMBER_X (LCD_PIXEL_WIDTH - (STATUS_CHAMBER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH) * 8)
|
2019-05-31 01:31:50 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef STATUS_CHAMBER_HEIGHT
|
|
|
|
#ifdef STATUS_CHAMBER_ANIM
|
|
|
|
#define STATUS_CHAMBER_HEIGHT(S) ((S) ? sizeof(status_chamber_on_bmp) / (STATUS_CHAMBER_BYTEWIDTH) : sizeof(status_chamber_bmp) / (STATUS_CHAMBER_BYTEWIDTH))
|
|
|
|
#else
|
|
|
|
#define STATUS_CHAMBER_HEIGHT(S) (sizeof(status_chamber_bmp) / (STATUS_CHAMBER_BYTEWIDTH))
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef STATUS_CHAMBER_Y
|
|
|
|
#define STATUS_CHAMBER_Y(S) (20 - STATUS_CHAMBER_HEIGHT(S))
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef STATUS_CHAMBER_TEXT_X
|
2019-09-07 11:52:57 +02:00
|
|
|
#define STATUS_CHAMBER_TEXT_X (STATUS_CHAMBER_X + 11)
|
2019-05-31 01:31:50 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
static_assert(
|
2021-04-13 00:08:57 +02:00
|
|
|
sizeof(status_chamber_bmp) == (STATUS_CHAMBER_BYTEWIDTH) * STATUS_CHAMBER_HEIGHT(0),
|
2019-05-31 01:31:50 +02:00
|
|
|
"Status chamber bitmap (status_chamber_bmp) dimensions don't match data."
|
|
|
|
);
|
|
|
|
#ifdef STATUS_CHAMBER_ANIM
|
|
|
|
static_assert(
|
2021-04-13 00:08:57 +02:00
|
|
|
sizeof(status_chamber_on_bmp) == (STATUS_CHAMBER_BYTEWIDTH) * STATUS_CHAMBER_HEIGHT(1),
|
2019-05-31 01:31:50 +02:00
|
|
|
"Status chamber bitmap (status_chamber_on_bmp) dimensions don't match data."
|
|
|
|
);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2021-03-06 21:13:28 +01:00
|
|
|
//
|
|
|
|
// Cooler Bitmap Properties
|
|
|
|
//
|
2021-03-29 08:41:56 +02:00
|
|
|
#if HAS_COOLER
|
|
|
|
#if STATUS_COOLER_WIDTH
|
2021-03-06 21:13:28 +01:00
|
|
|
|
2021-03-29 08:41:56 +02:00
|
|
|
#ifndef STATUS_COOLER_X
|
|
|
|
#define STATUS_COOLER_X (LCD_PIXEL_WIDTH - (STATUS_COOLER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH + STATUS_CUTTER_BYTEWIDTH) * 8)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef STATUS_COOLER_HEIGHT
|
|
|
|
#define STATUS_COOLER_HEIGHT(S) (sizeof(status_cooler_bmp1) / (STATUS_COOLER_BYTEWIDTH))
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef STATUS_COOLER_Y
|
|
|
|
#define STATUS_COOLER_Y(S) (18 - STATUS_COOLER_HEIGHT(S))
|
|
|
|
#endif
|
2021-03-06 21:13:28 +01:00
|
|
|
|
2021-03-29 08:41:56 +02:00
|
|
|
#ifndef STATUS_COOLER_TEXT_X
|
2021-04-13 00:52:18 +02:00
|
|
|
#define STATUS_COOLER_TEXT_X (STATUS_COOLER_X + 12)
|
2021-03-29 08:41:56 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
static_assert(
|
2021-04-13 00:08:57 +02:00
|
|
|
sizeof(status_cooler_bmp1) == (STATUS_COOLER_BYTEWIDTH) * STATUS_COOLER_HEIGHT(0),
|
2021-03-29 08:41:56 +02:00
|
|
|
"Status cooler bitmap (status_cooler_bmp1) dimensions don't match data."
|
|
|
|
);
|
2021-03-06 21:13:28 +01:00
|
|
|
#ifdef STATUS_COOLER_ANIM
|
2021-03-29 08:41:56 +02:00
|
|
|
static_assert(
|
2021-04-13 00:08:57 +02:00
|
|
|
sizeof(status_cooler_bmp2) == (STATUS_COOLER_BYTEWIDTH) * STATUS_COOLER_HEIGHT(1),
|
2021-03-29 08:41:56 +02:00
|
|
|
"Status cooler bitmap (status_cooler_bmp2) dimensions don't match data."
|
|
|
|
);
|
2021-03-06 21:13:28 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|
2021-03-29 08:41:56 +02:00
|
|
|
#endif
|
2021-03-06 21:13:28 +01:00
|
|
|
|
2021-03-29 08:41:56 +02:00
|
|
|
//
|
|
|
|
// Flowmeter Bitmap Properties
|
|
|
|
//
|
2021-04-02 02:29:49 +02:00
|
|
|
#if ENABLED(LASER_COOLANT_FLOW_METER)
|
2021-03-29 08:41:56 +02:00
|
|
|
#if STATUS_FLOWMETER_WIDTH
|
|
|
|
|
|
|
|
#ifndef STATUS_FLOWMETER_X
|
|
|
|
#define STATUS_FLOWMETER_X (LCD_PIXEL_WIDTH - (STATUS_FLOWMETER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH + STATUS_CUTTER_BYTEWIDTH + STATUS_COOLER_BYTEWIDTH) * 8)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef STATUS_FLOWMETER_HEIGHT
|
|
|
|
#define STATUS_FLOWMETER_HEIGHT(S) (sizeof(status_flowmeter_bmp1) / (STATUS_FLOWMETER_BYTEWIDTH))
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef STATUS_FLOWMETER_Y
|
|
|
|
#define STATUS_FLOWMETER_Y(S) (20 - STATUS_FLOWMETER_HEIGHT(S))
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef STATUS_FLOWMETER_TEXT_X
|
2021-04-13 00:52:18 +02:00
|
|
|
#define STATUS_FLOWMETER_TEXT_X (STATUS_FLOWMETER_X + 12)
|
2021-03-29 08:41:56 +02:00
|
|
|
#endif
|
2021-03-06 21:13:28 +01:00
|
|
|
|
|
|
|
static_assert(
|
2021-03-29 08:41:56 +02:00
|
|
|
sizeof(status_flowmeter_bmp1) == (STATUS_FLOWMETER_BYTEWIDTH) * STATUS_FLOWMETER_HEIGHT(0),
|
|
|
|
"Status flowmeter bitmap (status_flowmeter_bmp1) dimensions don't match data."
|
2021-03-06 21:13:28 +01:00
|
|
|
);
|
2021-03-29 08:41:56 +02:00
|
|
|
#ifdef STATUS_COOLER_ANIM
|
|
|
|
static_assert(
|
|
|
|
sizeof(status_flowmeter_bmp2) == (STATUS_FLOWMETER_BYTEWIDTH) * STATUS_FLOWMETER_HEIGHT(1),
|
|
|
|
"Status flowmeter bitmap (status_flowmeter_bmp2) dimensions don't match data."
|
|
|
|
);
|
|
|
|
#endif
|
2021-03-06 21:13:28 +01:00
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2021-06-08 14:51:28 +02:00
|
|
|
//
|
|
|
|
// I2C Laser Ammeter
|
|
|
|
//
|
|
|
|
#if ENABLED(I2C_AMMETER) && STATUS_AMMETER_WIDTH
|
|
|
|
#ifndef STATUS_AMMETER_BYTEWIDTH
|
|
|
|
#define STATUS_AMMETER_BYTEWIDTH BW(STATUS_AMMETER_WIDTH)
|
2021-06-07 21:15:09 +02:00
|
|
|
#endif
|
2021-06-08 14:51:28 +02:00
|
|
|
#ifndef STATUS_AMMETER_X
|
|
|
|
#define STATUS_AMMETER_X (LCD_PIXEL_WIDTH - (STATUS_AMMETER_BYTEWIDTH + STATUS_FLOWMETER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH + STATUS_CUTTER_BYTEWIDTH + STATUS_COOLER_BYTEWIDTH) * 8)
|
|
|
|
#endif
|
|
|
|
#ifndef STATUS_AMMETER_HEIGHT
|
2021-07-19 03:11:24 +02:00
|
|
|
#define STATUS_AMMETER_HEIGHT(S) (sizeof(status_ammeter_bmp_mA) / (STATUS_AMMETER_BYTEWIDTH))
|
2021-06-08 14:51:28 +02:00
|
|
|
#endif
|
|
|
|
#ifndef STATUS_AMMETER_Y
|
|
|
|
#define STATUS_AMMETER_Y(S) (18 - STATUS_AMMETER_HEIGHT(S))
|
|
|
|
#endif
|
|
|
|
#ifndef STATUS_AMMETER_TEXT_X
|
|
|
|
#define STATUS_AMMETER_TEXT_X (STATUS_AMMETER_X + 7)
|
|
|
|
#endif
|
|
|
|
static_assert(
|
2021-07-19 03:11:24 +02:00
|
|
|
sizeof(status_ammeter_bmp_mA) == (STATUS_AMMETER_BYTEWIDTH) * STATUS_AMMETER_HEIGHT(0),
|
|
|
|
"Status ammeter bitmap (status_ammeter_bmp_mA) dimensions don't match data."
|
2021-06-08 14:51:28 +02:00
|
|
|
);
|
2021-06-07 21:15:09 +02:00
|
|
|
#endif
|
|
|
|
|
2018-11-20 14:36:37 +01:00
|
|
|
//
|
|
|
|
// Bed Bitmap Properties
|
|
|
|
//
|
|
|
|
#ifndef STATUS_BED_BYTEWIDTH
|
2018-11-28 04:15:52 +01:00
|
|
|
#define STATUS_BED_BYTEWIDTH BW(STATUS_BED_WIDTH)
|
2018-11-20 14:36:37 +01:00
|
|
|
#endif
|
2018-11-28 04:15:52 +01:00
|
|
|
#if STATUS_BED_WIDTH && !STATUS_HEATERS_WIDTH
|
2018-11-20 14:36:37 +01:00
|
|
|
|
|
|
|
#ifndef STATUS_BED_X
|
2021-04-13 00:08:57 +02:00
|
|
|
#define STATUS_BED_X (LCD_PIXEL_WIDTH - (STATUS_CHAMBER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH + STATUS_BED_BYTEWIDTH) * 8 - TERN0(STATUS_HEAT_PERCENT, 4))
|
2018-11-20 14:36:37 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef STATUS_BED_HEIGHT
|
|
|
|
#ifdef STATUS_BED_ANIM
|
|
|
|
#define STATUS_BED_HEIGHT(S) ((S) ? sizeof(status_bed_on_bmp) / (STATUS_BED_BYTEWIDTH) : sizeof(status_bed_bmp) / (STATUS_BED_BYTEWIDTH))
|
|
|
|
#else
|
|
|
|
#define STATUS_BED_HEIGHT(S) (sizeof(status_bed_bmp) / (STATUS_BED_BYTEWIDTH))
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef STATUS_BED_Y
|
|
|
|
#define STATUS_BED_Y(S) (20 - STATUS_BED_HEIGHT(S))
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef STATUS_BED_TEXT_X
|
2019-09-07 11:52:57 +02:00
|
|
|
#define STATUS_BED_TEXT_X (STATUS_BED_X + 9)
|
2018-11-20 14:36:37 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
static_assert(
|
2021-04-13 00:08:57 +02:00
|
|
|
sizeof(status_bed_bmp) == (STATUS_BED_BYTEWIDTH) * STATUS_BED_HEIGHT(0),
|
2018-11-20 14:36:37 +01:00
|
|
|
"Status bed bitmap (status_bed_bmp) dimensions don't match data."
|
|
|
|
);
|
|
|
|
#ifdef STATUS_BED_ANIM
|
|
|
|
static_assert(
|
2021-04-13 00:08:57 +02:00
|
|
|
sizeof(status_bed_on_bmp) == (STATUS_BED_BYTEWIDTH) * STATUS_BED_HEIGHT(1),
|
2018-11-20 14:36:37 +01:00
|
|
|
"Status bed bitmap (status_bed_on_bmp) dimensions don't match data."
|
|
|
|
);
|
|
|
|
#endif
|
2018-02-01 01:43:33 +01:00
|
|
|
#endif
|
|
|
|
|
2018-11-20 14:36:37 +01:00
|
|
|
//
|
|
|
|
// Fan Bitmap Properties
|
|
|
|
//
|
|
|
|
#ifndef STATUS_FAN_BYTEWIDTH
|
2018-11-28 04:15:52 +01:00
|
|
|
#define STATUS_FAN_BYTEWIDTH BW(STATUS_FAN_WIDTH)
|
2018-11-20 14:36:37 +01:00
|
|
|
#endif
|
2018-11-24 06:14:56 +01:00
|
|
|
#if STATUS_FAN_FRAMES
|
2018-11-20 14:36:37 +01:00
|
|
|
#ifndef STATUS_FAN_X
|
2019-09-07 11:52:57 +02:00
|
|
|
#define STATUS_FAN_X (LCD_PIXEL_WIDTH - (STATUS_FAN_BYTEWIDTH) * 8)
|
2018-11-20 14:36:37 +01:00
|
|
|
#endif
|
|
|
|
#ifndef STATUS_FAN_Y
|
|
|
|
#define STATUS_FAN_Y 1
|
|
|
|
#endif
|
|
|
|
#ifndef STATUS_FAN_TEXT_X
|
2019-09-07 11:52:57 +02:00
|
|
|
#define STATUS_FAN_TEXT_X (STATUS_FAN_X - 1)
|
2018-11-20 14:36:37 +01:00
|
|
|
#endif
|
|
|
|
#ifndef STATUS_FAN_TEXT_Y
|
|
|
|
#define STATUS_FAN_TEXT_Y 28
|
|
|
|
#endif
|
|
|
|
#ifndef STATUS_FAN_HEIGHT
|
|
|
|
#define STATUS_FAN_HEIGHT (sizeof(status_fan0_bmp) / (STATUS_FAN_BYTEWIDTH))
|
|
|
|
#endif
|
|
|
|
#define FAN_BMP_SIZE (STATUS_FAN_BYTEWIDTH) * (STATUS_FAN_HEIGHT)
|
|
|
|
static_assert(sizeof(status_fan0_bmp) == FAN_BMP_SIZE, "Status fan bitmap (status_fan0_bmp) dimensions don't match data.");
|
2018-11-24 06:14:56 +01:00
|
|
|
#if STATUS_FAN_FRAMES > 1
|
2018-11-20 14:36:37 +01:00
|
|
|
static_assert(sizeof(status_fan1_bmp) == FAN_BMP_SIZE, "Status fan bitmap (status_fan1_bmp) dimensions don't match data.");
|
2018-11-24 06:14:56 +01:00
|
|
|
#if STATUS_FAN_FRAMES > 2
|
2018-11-20 14:36:37 +01:00
|
|
|
static_assert(sizeof(status_fan2_bmp) == FAN_BMP_SIZE, "Status fan bitmap (status_fan2_bmp) dimensions don't match data.");
|
2018-11-24 06:14:56 +01:00
|
|
|
#if STATUS_FAN_FRAMES > 3
|
2018-11-20 14:36:37 +01:00
|
|
|
static_assert(sizeof(status_fan3_bmp) == FAN_BMP_SIZE, "Status fan bitmap (status_fan3_bmp) dimensions don't match data.");
|
|
|
|
#endif
|
2018-02-01 01:43:33 +01:00
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#endif
|
2019-10-09 04:46:23 +02:00
|
|
|
|
2020-04-22 23:35:03 +02:00
|
|
|
#if STATUS_LOGO_WIDTH && ENABLED(CUSTOM_STATUS_SCREEN_IMAGE)
|
|
|
|
#define DO_DRAW_LOGO 1
|
|
|
|
#endif
|
|
|
|
#if HOTENDS > 0
|
|
|
|
#define DO_DRAW_HOTENDS 1
|
|
|
|
#endif
|
|
|
|
#if HAS_HEATED_BED && HOTENDS <= 4
|
|
|
|
#define DO_DRAW_BED 1
|
|
|
|
#endif
|
|
|
|
#if HAS_CUTTER && !DO_DRAW_BED
|
|
|
|
#define DO_DRAW_CUTTER 1
|
|
|
|
#endif
|
2021-03-06 21:13:28 +01:00
|
|
|
#if HAS_COOLER
|
|
|
|
#define DO_DRAW_COOLER 1
|
|
|
|
#endif
|
2021-04-02 02:29:49 +02:00
|
|
|
#if ENABLED(LASER_COOLANT_FLOW_METER)
|
2021-03-29 08:41:56 +02:00
|
|
|
#define DO_DRAW_FLOWMETER 1
|
|
|
|
#endif
|
2021-06-07 21:15:09 +02:00
|
|
|
#if ENABLED(I2C_AMMETER)
|
|
|
|
#define DO_DRAW_AMMETER 1
|
|
|
|
#endif
|
2021-03-06 21:13:28 +01:00
|
|
|
|
2020-04-22 23:35:03 +02:00
|
|
|
#if HAS_TEMP_CHAMBER && STATUS_CHAMBER_WIDTH && HOTENDS <= 4
|
|
|
|
#define DO_DRAW_CHAMBER 1
|
|
|
|
#endif
|
|
|
|
#if HAS_FAN0 && STATUS_FAN_WIDTH && HOTENDS <= 4 && defined(STATUS_FAN_FRAMES)
|
|
|
|
#define DO_DRAW_FAN 1
|
|
|
|
#endif
|
2020-04-28 05:35:25 +02:00
|
|
|
#if BOTH(HAS_HOTEND, STATUS_HOTEND_ANIM)
|
2020-04-22 23:35:03 +02:00
|
|
|
#define ANIM_HOTEND 1
|
|
|
|
#endif
|
2020-04-24 04:42:38 +02:00
|
|
|
#if BOTH(DO_DRAW_BED, STATUS_BED_ANIM)
|
2020-04-22 23:35:03 +02:00
|
|
|
#define ANIM_BED 1
|
|
|
|
#endif
|
2020-04-24 04:42:38 +02:00
|
|
|
#if BOTH(DO_DRAW_CHAMBER, STATUS_CHAMBER_ANIM)
|
2020-04-22 23:35:03 +02:00
|
|
|
#define ANIM_CHAMBER 1
|
|
|
|
#endif
|
2020-04-24 04:42:38 +02:00
|
|
|
#if BOTH(DO_DRAW_CUTTER, STATUS_CUTTER_ANIM)
|
2020-04-22 23:35:03 +02:00
|
|
|
#define ANIM_CUTTER 1
|
|
|
|
#endif
|
2021-03-06 21:13:28 +01:00
|
|
|
#if BOTH(DO_DRAW_COOLER, STATUS_COOLER_ANIM)
|
|
|
|
#define ANIM_COOLER 1
|
|
|
|
#endif
|
2021-03-29 08:41:56 +02:00
|
|
|
#if BOTH(DO_DRAW_FLOWMETER, STATUS_FLOWMETER_ANIM)
|
|
|
|
#define ANIM_FLOWMETER 1
|
|
|
|
#endif
|
2020-04-22 23:35:03 +02:00
|
|
|
#if ANIM_HOTEND || ANIM_BED || ANIM_CHAMBER || ANIM_CUTTER
|
|
|
|
#define ANIM_HBCC 1
|
|
|
|
#endif
|