Skip to content

Commit

Permalink
✨🔧 Minimal configuration with Config.h (MarlinFirmware#27338)
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead authored Aug 16, 2024
1 parent 69f6960 commit 9863446
Show file tree
Hide file tree
Showing 16 changed files with 4,695 additions and 67 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/update-base-configs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#
# update-base-configs.yml
# Generate new base config files if needed
#

name: Update Base Configs

on:
schedule:
- cron: '0 */6 * * *'

jobs:
bump_date:
name: Update Base Configs
if: github.repository == 'MarlinFirmware/Marlin'

runs-on: ubuntu-latest

steps:

- name: Checkout bugfix-2.1.x
uses: actions/checkout@v4
with:
ref: bugfix-2.1.x

- name: Update Base Configs
run: make base-configs
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ help:
@echo "make marlin : Build marlin for the configured board"
@echo "make format-pins -j : Reformat all pins files (-j for parallel execution)"
@echo "make validate-pins -j : Validate all pins files, fails if any require reformatting"
@echo "make base-configs : Regenerate the base configs in Marlin/src/inc"
@echo "make tests-single-ci : Run a single test from inside the CI"
@echo "make tests-single-local : Run a single test locally"
@echo "make tests-single-local-docker : Run a single test locally, using docker"
Expand Down Expand Up @@ -102,3 +103,9 @@ format-pins: $(PINS)
validate-pins: format-pins
@echo "Validating pins files"
@git diff --exit-code || (git status && echo "\nError: Pins files are not formatted correctly. Run \"make format-pins\" to fix.\n" && exit 1)

base-configs:
@echo "Generating base configs"
@python $(SCRIPTS_DIR)/makeBaseConfigs.py 2>/dev/null \
&& git add Marlin/src/inc/BaseConfiguration.h Marlin/src/inc/BaseConfiguration_adv.h \
&& git commit -m "[cron] Update Base Configurations"
4 changes: 3 additions & 1 deletion Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@
* Use a physical model of the hotend to control temperature. When configured correctly this gives
* better responsiveness and stability than PID and removes the need for PID_EXTRUSION_SCALING
* and PID_FAN_SCALING. Enable MPC_AUTOTUNE and use M306 T to autotune the model.
* @section mpctemp
* @section mpc temp
*/
#if ENABLED(MPCTEMP)
#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
Expand Down Expand Up @@ -849,6 +849,8 @@
// FIND YOUR OWN: "M303 E-2 C8 S50" to run autotune on the chamber at 50 degreesC for 8 cycles.
#endif // PIDTEMPCHAMBER

// @section pid temp

#if ANY(PIDTEMP, PIDTEMPBED, PIDTEMPCHAMBER)
//#define PID_OPENLOOP // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
Expand Down
11 changes: 6 additions & 5 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@
* 2 = config.ini - File format for PlatformIO preprocessing.
* 3 = schema.json - The entire configuration schema. (13 = pattern groups)
* 4 = schema.yml - The entire configuration schema.
* 5 = Config.h - Minimal configuration by popular demand.
*/
//#define CONFIG_EXPORT 2 // :[1:'JSON', 2:'config.ini', 3:'schema.json', 4:'schema.yml']
//#define CONFIG_EXPORT 105 // :[1:'JSON', 2:'config.ini', 3:'schema.json', 4:'schema.yml', 5:'Config.h']

//===========================================================================
//============================= Thermal Settings ============================
Expand Down Expand Up @@ -303,7 +304,7 @@
* If you get false positives for "Thermal Runaway", increase
* THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
*/
#if ENABLED(THERMAL_PROTECTION_HOTENDS)
#if ALL(HAS_HOTEND, THERMAL_PROTECTION_HOTENDS)
#define THERMAL_PROTECTION_PERIOD 40 // (seconds)
#define THERMAL_PROTECTION_HYSTERESIS 4 // (°C)

Expand Down Expand Up @@ -334,7 +335,7 @@
/**
* Thermal Protection parameters for the bed are just as above for hotends.
*/
#if ENABLED(THERMAL_PROTECTION_BED)
#if TEMP_SENSOR_BED && ENABLED(THERMAL_PROTECTION_BED)
#define THERMAL_PROTECTION_BED_PERIOD 20 // (seconds)
#define THERMAL_PROTECTION_BED_HYSTERESIS 2 // (°C)

Expand All @@ -348,7 +349,7 @@
/**
* Thermal Protection parameters for the heated chamber.
*/
#if ENABLED(THERMAL_PROTECTION_CHAMBER)
#if TEMP_SENSOR_CHAMBER && ENABLED(THERMAL_PROTECTION_CHAMBER)
#define THERMAL_PROTECTION_CHAMBER_PERIOD 20 // (seconds)
#define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // (°C)

Expand All @@ -362,7 +363,7 @@
/**
* Thermal Protection parameters for the laser cooler.
*/
#if ENABLED(THERMAL_PROTECTION_COOLER)
#if TEMP_SENSOR_COOLER && ENABLED(THERMAL_PROTECTION_COOLER)
#define THERMAL_PROTECTION_COOLER_PERIOD 10 // (seconds)
#define THERMAL_PROTECTION_COOLER_HYSTERESIS 3 // (°C)

Expand Down
Loading

0 comments on commit 9863446

Please sign in to comment.