Prusa3d Marlin fork
ConfigurationStore.h
1 #ifndef CONFIG_STORE_H
2 #define CONFIG_STORE_H
3 #define EEPROM_SETTINGS
4 
5 #include "Configuration.h"
6 #include <stdint.h>
7 #include <avr/eeprom.h>
8 
9 typedef struct
10 {
11  char version[4];
12  float axis_steps_per_mm[4];
13  float max_feedrate_normal[4];
14  uint32_t max_acceleration_mm_per_s2_normal[4];
15  float acceleration;
17  float minimumfeedrate;
18  float mintravelfeedrate;
20  float max_jerk[4];
21  float add_homing[3];
23  float Kp;
24  float Ki;
25  float Kd;
26  float bedKp;
27  float bedKi;
28  float bedKd;
30  bool autoretract_enabled;
31  float retract_length;
32  float retract_feedrate;
33  float retract_zlift;
34  float retract_recover_length;
35  float retract_recover_feedrate;
36  bool volumetric_enabled;
37  float filament_size[1];
38  float max_feedrate_silent[4];
39  uint32_t max_acceleration_mm_per_s2_silent[4];
40  unsigned char axis_ustep_resolution[4];
42  // Arc Interpolation Settings, configurable via M214
43  float mm_per_arc_segment;
44  float min_mm_per_arc_segment;
45  uint8_t n_arc_correction; // If equal to zero, this is disabled
46  uint16_t min_arc_segments; // If equal to zero, this is disabled
47  uint16_t arc_segments_per_sec; // If equal to zero, this is disabled
48 } M500_conf;
49 
50 extern M500_conf cs;
51 
52 void Config_ResetDefault();
53 
54 #ifndef DISABLE_M503
55 void Config_PrintSettings(uint8_t level = 0);
56 #else
57 FORCE_INLINE void Config_PrintSettings() {}
58 #endif
59 
60 #ifdef EEPROM_SETTINGS
61 void Config_StoreSettings();
63 #else
64 FORCE_INLINE void Config_StoreSettings() {}
65 FORCE_INLINE void Config_RetrieveSettings() { Config_ResetDefault(); Config_PrintSettings(); }
66 #endif
67 
68 #endif//CONFIG_STORE_H
bool Config_RetrieveSettings()
Read M500 configuration.
Definition: ConfigurationStore.cpp:197
Definition: ConfigurationStore.h:10
float zprobe_zoffset
Only used with define ENABLE_AUTO_BED_LEVELING.
Definition: ConfigurationStore.h:22
float acceleration
Normal acceleration mm/s^2 THIS IS THE DEFAULT ACCELERATION for all moves. M204 SXXXX.
Definition: ConfigurationStore.h:15
int lcd_contrast
unused
Definition: ConfigurationStore.h:29
float travel_acceleration
travel acceleration mm/s^2
Definition: ConfigurationStore.h:41
uint32_t min_segment_time_us
(µs) M205 B
Definition: ConfigurationStore.h:19
float retract_acceleration
mm/s^2 filament pull-pack and push-forward while standing still in the other axis M204 TXXXX
Definition: ConfigurationStore.h:16