Skip to content

Commit

Permalink
FB logo bootscreen
Browse files Browse the repository at this point in the history
  • Loading branch information
adequator committed Nov 9, 2022
1 parent 9b4a407 commit 4ebac68
Show file tree
Hide file tree
Showing 12 changed files with 1,393 additions and 32 deletions.
46 changes: 34 additions & 12 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@
*/
#define CONFIGURATION_H_VERSION 02010200


#define DIAG_JUMPERS_REMOVED
//#define MOTHERBOARD BOARD_LINUX_RAMPS



//===========================================================================
//============================= Getting Started =============================
//===========================================================================
Expand All @@ -60,8 +66,8 @@
// @section info

// Author info of this build printed to the host during boot and M115
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
//#define CUSTOM_VERSION_FILE Version.h // Path from the root directory (no quotes)
#define STRING_CONFIG_H_AUTHOR "adequator" // Who made the changes.
#define CUSTOM_VERSION_FILE version.h // Path from the root directory (no quotes)

/**
* *** VENDORS PLEASE READ ***
Expand Down Expand Up @@ -98,7 +104,12 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
#define SERIAL_PORT -1
#define SERIAL_PORT 0

#if MOTHERBOARD == BOARD_MKS_ROBIN_NANO_V3
#define SERIAL_PORT -1
#endif


/**
* Serial Port Baud Rate
Expand Down Expand Up @@ -1773,7 +1784,11 @@
* RAMPS-based boards use SERVO3_PIN for the first runout sensor.
* For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc.
*/
#define FILAMENT_RUNOUT_SENSOR

#if MOTHERBOARD == BOARD_MKS_ROBIN_NANO_V3
#define FILAMENT_RUNOUT_SENSOR
#endif

#if ENABLED(FILAMENT_RUNOUT_SENSOR)
#define FIL_RUNOUT_ENABLED_DEFAULT true // Enable the sensor on startup. Override with M412 followed by M500.
#define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
Expand Down Expand Up @@ -3012,7 +3027,7 @@
// Third-party or vendor-customized controller interfaces.
// Sources should be installed in 'src/lcd/extui'.
//
#define EXTENSIBLE_UI
//#define EXTENSIBLE_UI

#if ENABLED(EXTENSIBLE_UI)
//#define EXTUI_LOCAL_BEEPER // Enables use of local Beeper pin with external display
Expand Down Expand Up @@ -3109,17 +3124,21 @@
//#define TFT_GENERIC
#if ENABLED(TFT_GENERIC)
// :[ 'AUTO', 'ST7735', 'ST7789', 'ST7796', 'R61505', 'ILI9328', 'ILI9341', 'ILI9488' ]
#define TFT_DRIVER AUTO
#define TFT_DRIVER ST7796

// Interface. Enable one of the following options:
//#define TFT_INTERFACE_FSMC
//#define TFT_INTERFACE_SPI
#define TFT_INTERFACE_SPI
// TFT Resolution. Enable one of the following options:
//#define TFT_RES_320x240
//#define TFT_RES_480x272
//#define TFT_RES_480x320
#define TFT_RES_320x480
//#define TFT_RES_1024x600

#define TFT_DEFAULT_ORIENTATION TFT_INVERT_Y

#endif

/**
Expand All @@ -3133,13 +3152,16 @@
* root of your SD card, together with the compiled firmware.
*/
//#define TFT_CLASSIC_UI
//#define TFT_COLOR_UI
#define TFT_LVGL_UI
#define TFT_COLOR_UI
//#define TFT_LVGL_UI

#if ENABLED(TFT_LVGL_UI)
#define MKS_WIFI_MODULE // MKS WiFi module
//#define MKS_WIFI_MODULE // MKS WiFi module
#endif


#define COLOR_BACKGROUND COLOR_BLACK

/**
* TFT Rotation. Set to one of the following values:
*
Expand All @@ -3148,7 +3170,7 @@
* TFT_ROTATE_270, TFT_ROTATE_270_MIRROR_X, TFT_ROTATE_270_MIRROR_Y,
* TFT_MIRROR_X, TFT_MIRROR_Y, TFT_NO_ROTATION
*/
#define TFT_ROTATION TFT_ROTATE_270
//#define TFT_ROTATION TFT_ROTATE_270

//=============================================================================
//============================ Other Controllers ============================
Expand All @@ -3174,7 +3196,7 @@
//#define DISABLE_ENCODER // Disable the click encoder, if any
//#define TOUCH_IDLE_SLEEP_MINS 5 // (minutes) Display Sleep after a period of inactivity. Set with M255 S.

#define TOUCH_SCREEN_CALIBRATION
//#define TOUCH_SCREEN_CALIBRATION

//#define TOUCH_CALIBRATION_X 12316
//#define TOUCH_CALIBRATION_Y -8981
Expand Down
20 changes: 16 additions & 4 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,11 @@
* Multiple extruders can be assigned to the same pin in which case
* the fan will turn on when any selected extruder is above the threshold.
*/
#define E0_AUTO_FAN_PIN PC14

#if MOTHERBOARD == BOARD_MKS_ROBIN_NANO_V3
#define E0_AUTO_FAN_PIN PC14
#endif

#define E1_AUTO_FAN_PIN -1
#define E2_AUTO_FAN_PIN -1
#define E3_AUTO_FAN_PIN -1
Expand Down Expand Up @@ -706,7 +710,11 @@
*/
#define CASE_LIGHT_ENABLE
#if ENABLED(CASE_LIGHT_ENABLE)

#if MOTHERBOARD == BOARD_MKS_ROBIN_NANO_V3
#define CASE_LIGHT_PIN PE6 // Override the default pin if needed
#endif

#define INVERT_CASE_LIGHT true // Set true if Case Light is ON when pin is LOW
#define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on
#define CASE_LIGHT_DEFAULT_BRIGHTNESS 255 // Set default power-up brightness (0-255, requires PWM pin)
Expand Down Expand Up @@ -1477,9 +1485,9 @@
//#define SET_INTERACTION_TIME // Add 'C' parameter to set time until next filament change or other user interaction
#if ENABLED(SET_INTERACTION_TIME)
#define SHOW_INTERACTION_TIME // Display time until next user interaction ('C' = filament change)
#endif
//#define M73_REPORT // Report progress to host with 'M73'
#endif
//#define M73_REPORT // Report progress to host with 'M73'
#endif

// LCD Print Progress options, multiple can be rotated depending on screen layout
#if HAS_DISPLAY && EITHER(SDSUPPORT, SET_PROGRESS_MANUALLY)
Expand Down Expand Up @@ -2622,7 +2630,11 @@
*
* Enable PARK_HEAD_ON_PAUSE to add the G-code M125 Pause and Park.
*/
#define ADVANCED_PAUSE_FEATURE

#if MOTHERBOARD == BOARD_MKS_ROBIN_NANO_V3
#define ADVANCED_PAUSE_FEATURE
#endif

#if ENABLED(ADVANCED_PAUSE_FEATURE)
#define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
#define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
Expand Down
6 changes: 3 additions & 3 deletions Marlin/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
/**
* Marlin release version identifier
*/
//#define SHORT_BUILD_VERSION "bugfix-2.1.x"
#define SHORT_BUILD_VERSION "FBG6-2.1.1"

/**
* Verbose version identifier which should contain a reference to the location
Expand All @@ -46,15 +46,15 @@
/**
* Defines a generic printer name to be output to the LCD after booting Marlin.
*/
//#define MACHINE_NAME "3D Printer"
#define MACHINE_NAME "Flying Bear Ghost 6"

/**
* The SOURCE_CODE_URL is the location where users will find the Marlin Source
* Code which is installed on the device. In most cases —unless the manufacturer
* has a distinct Github fork— the Source Code URL should just be the main
* Marlin repository.
*/
//#define SOURCE_CODE_URL "github.com/MarlinFirmware/Marlin"
#define SOURCE_CODE_URL "github.com/adequator/Marlin-FBG6"

/**
* Default generic printer UUID.
Expand Down
6 changes: 4 additions & 2 deletions Marlin/src/inc/Conditionals_LCD.h
Original file line number Diff line number Diff line change
Expand Up @@ -1523,8 +1523,10 @@
#define TFT_TOUCH_DEVICE_GT911
#endif
#elif ENABLED(TFT_GENERIC)
#define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_X | TFT_INVERT_Y)
#if NONE(TFT_RES_320x240, TFT_RES_480x272, TFT_RES_480x320, TFT_RES_1024x600)
#ifndef TFT_DEFAULT_ORIENTATION
#define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_X | TFT_INVERT_Y)
#endif
#if NONE(TFT_RES_320x240, TFT_RES_480x272, TFT_RES_480x320, TFT_RES_320x480, TFT_RES_1024x600)
#define TFT_RES_320x240
#endif
#if NONE(TFT_INTERFACE_FSMC, TFT_INTERFACE_SPI)
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -3073,7 +3073,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#endif
#endif

#if EITHER(MKS_TS35_V2_0, BTT_TFT35_SPI_V1_0, MKS_TS35_V2_0_VERTICAL) && SD_CONNECTION_IS(LCD)
#if ANY(MKS_TS35_V2_0, BTT_TFT35_SPI_V1_0, MKS_TS35_V2_0_VERTICAL) && SD_CONNECTION_IS(LCD)
#error "SDCARD_CONNECTION cannot be set to LCD for the enabled TFT. No available SD card reader."
#endif

Expand Down
81 changes: 81 additions & 0 deletions Marlin/src/lcd/extui/ui_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1181,6 +1181,87 @@ namespace ExtUI {
#endif
}

void onStartup() {
/* Initialize the display module here. The following
* routines are available for access to the GPIO pins:
*
* SET_OUTPUT(pin)
* SET_INPUT_PULLUP(pin)
* SET_INPUT(pin)
* WRITE(pin,value)
* READ(pin)
*/
}
void onIdle() {}
void onPrinterKilled(FSTR_P const error, FSTR_P const component) {}
void onMediaInserted() {}
void onMediaError() {}
void onMediaRemoved() {}
void onPlayTone(const uint16_t frequency, const uint16_t duration) {}
void onPrintTimerStarted() {}
void onPrintTimerPaused() {}
void onPrintTimerStopped() {}
void onFilamentRunout(const extruder_t extruder) {}
void onUserConfirmRequired(const char * const msg) {}
void onStatusChanged(const char * const msg) {}

void onHomingStart() {}
void onHomingDone() {}
void onPrintDone() {}

void onFactoryReset() {}

void onStoreSettings(char *buff) {
// Called when saving to EEPROM (i.e. M500). If the ExtUI needs
// permanent data to be stored, it can write up to eeprom_data_size bytes
// into buff.

// Example:
// static_assert(sizeof(myDataStruct) <= eeprom_data_size);
// memcpy(buff, &myDataStruct, sizeof(myDataStruct));
}

void onLoadSettings(const char *buff) {
// Called while loading settings from EEPROM. If the ExtUI
// needs to retrieve data, it should copy up to eeprom_data_size bytes
// from buff

// Example:
// static_assert(sizeof(myDataStruct) <= eeprom_data_size);
// memcpy(&myDataStruct, buff, sizeof(myDataStruct));
}

void onPostprocessSettings() {
// Called after loading or resetting stored settings
}

void onSettingsStored(bool success) {
// Called after the entire EEPROM has been written,
// whether successful or not.
}

void onSettingsLoaded(bool success) {
// Called after the entire EEPROM has been read,
// whether successful or not.
}

#if HAS_PID_HEATING
void onPidTuning(const result_t rst) {
// Called for temperature PID tuning result
switch (rst) {
case PID_STARTED: break;
case PID_BAD_EXTRUDER_NUM: break;
case PID_TEMP_TOO_HIGH: break;
case PID_TUNING_TIMEOUT: break;
case PID_DONE: break;
}
}
#endif

void onSteppersDisabled() {}
void onSteppersEnabled() {}


} // namespace ExtUI

// At the moment we hook into MarlinUI methods, but this could be cleaned up in the future
Expand Down
Binary file added Marlin/src/lcd/tft/bitmaps/fb-logo/fb-200x220.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 4ebac68

Please sign in to comment.