From 58af1ae4c4ff60f1b37afdf7b7920d976b0c1004 Mon Sep 17 00:00:00 2001 From: Marek Bel Date: Fri, 21 Sep 2018 20:52:44 +0200 Subject: [PATCH] Add configuration store struct. --- Firmware/ConfigurationStore.cpp | 35 +++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/Firmware/ConfigurationStore.cpp b/Firmware/ConfigurationStore.cpp index 264486b7..25ac5951 100644 --- a/Firmware/ConfigurationStore.cpp +++ b/Firmware/ConfigurationStore.cpp @@ -239,6 +239,41 @@ void Config_PrintSettings(uint8_t level) #ifdef EEPROM_SETTINGS + +static_assert (EXTRUDERS == 1, "ConfigurationStore M500_conf not implemented for more extruders."); +static_assert (NUM_AXIS == 4, "ConfigurationStore M500_conf not implemented for more axis."); +typedef struct +{ + char version[4]; + float axis_steps_per_unit[4]; + float max_feedrate_normal[4]; + unsigned long max_acceleration_units_per_sq_second_normal[4]; + float acceleration; + float retract_acceleration; + float minimumfeedrate; + float mintravelfeedrate; + unsigned long minsegmenttime; + float max_jerk[4]; + float add_homing[3]; + float zprobe_zoffset; + float Kp; + float Ki; + float Kd; + float bedKp; + float bedKi; + float bedKd; + int lcd_contrast; + bool autoretract_enabled; + float retract_length; + float retract_feedrate; + float retract_zlift; + float retract_recover_length; + float retract_recover_feedrate; + bool volumetric_enabled; + float filament_size; + float max_feedrate_silent[4]; + unsigned long max_acceleration_units_per_sq_second_silent[4]; +} __attribute__ ((packed)) M500_conf; bool Config_RetrieveSettings(uint16_t offset) { int i=offset;