diff options
author | Felipe CorrĂȘa da Silva Sanches <juca@members.fsf.org> | 2012-06-26 07:48:05 -0300 |
---|---|---|
committer | Felipe CorrĂȘa da Silva Sanches <juca@members.fsf.org> | 2012-06-27 08:52:22 -0300 |
commit | 16a408af3d15f48bf25564568d8b791b322ba898 (patch) | |
tree | 91b9fb4392d02ab9d0ac257b4a6cfc2ab6b78f5d | |
parent | e0d9840439079a4d9f31f2376f106391e897069e (diff) |
calculate eeprom parameter addresses based on previous param address plus sizeof(type)
-rw-r--r-- | Sprinter/store_eeprom.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/Sprinter/store_eeprom.h b/Sprinter/store_eeprom.h index 4e4414b..f275f3a 100644 --- a/Sprinter/store_eeprom.h +++ b/Sprinter/store_eeprom.h @@ -43,20 +43,20 @@ extern float max_e_jerk; extern unsigned long min_seg_time; extern unsigned int Kp, Ki, Kd; -#define axis_steps_per_unit_address (EEPROM_OFFSET + 4) -#define max_feedrate_address (EEPROM_OFFSET + 20) -#define max_acceleration_units_per_sq_second_address (EEPROM_OFFSET + 36) -#define move_acceleration_address (EEPROM_OFFSET + 52) -#define retract_acceleration_address (EEPROM_OFFSET + 56) -#define mintravelfeedrate_address (EEPROM_OFFSET + 60) -#define minimumfeedrate_address (EEPROM_OFFSET + 64) -#define max_xy_jerk_address (EEPROM_OFFSET + 68) -#define max_z_jerk_address (EEPROM_OFFSET + 72) -#define max_e_jerk_address (EEPROM_OFFSET + 76) -#define min_seg_time_address (EEPROM_OFFSET + 80) -#define Kp_address (EEPROM_OFFSET + 84) -#define Ki_address (EEPROM_OFFSET + 86) -#define Kd_address (EEPROM_OFFSET + 88) +#define axis_steps_per_unit_address (EEPROM_OFFSET + 4*sizeof(char)) +#define max_feedrate_address (axis_steps_per_unit_address + 4*sizeof(float)) +#define max_acceleration_units_per_sq_second_address (max_feedrate_address + 4*sizeof(float)) +#define move_acceleration_address (max_acceleration_units_per_sq_second_address + 4*sizeof(long)) +#define retract_acceleration_address (move_acceleration_address + sizeof(float)) +#define mintravelfeedrate_address (retract_acceleration_address + sizeof(float)) +#define minimumfeedrate_address (mintravelfeedrate_address + sizeof(float)) +#define max_xy_jerk_address (minimumfeedrate_address + sizeof(float)) +#define max_z_jerk_address (max_xy_jerk_address + sizeof(float)) +#define max_e_jerk_address (max_z_jerk_address + sizeof(float)) +#define min_seg_time_address (max_e_jerk_address + sizeof(float)) +#define Kp_address (min_seg_time_address + sizeof(unsigned long)) +#define Ki_address (Kp_address + sizeof(unsigned int)) +#define Kd_address (Ki_address + sizeof(unsigned int)) extern void EEPROM_RetrieveSettings(bool def, bool printout ); extern void EEPROM_printSettings(); |