Compare commits
31 Commits
09230add3b
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 9588b3fe8c | |||
| f1c385f5dd | |||
| 8d1c96b3ee | |||
| 4e39e68a14 | |||
| 76809106ce | |||
| 5e18e5733c | |||
| 28f352e5f9 | |||
| cbf18e926d | |||
| 7a7fbd1f4e | |||
| edefeee886 | |||
| d4258527b8 | |||
| 2572c7af6e | |||
| f0729d7baf | |||
| 0c33006cff | |||
| d7ac5af9fe | |||
| 56fd9e64d4 | |||
| ce77ff95c3 | |||
| 3adb41c979 | |||
| cb30dd06cc | |||
| 58061fa685 | |||
| 6b1f5aa41b | |||
| a2a36a1ea1 | |||
|
|
f8805b9883 | ||
| 2c2f9e857e | |||
| ef13e277c7 | |||
| c6552c797f | |||
| 83ab29095b | |||
|
|
f51f197417 | ||
| f929ae9488 | |||
| ec52e9703a | |||
| cf524d52a9 |
1
.gitignore
vendored
@@ -1 +0,0 @@
|
|||||||
PrusaSlicer/cache/*
|
|
||||||
|
|||||||
3
PrusaSlicer/.gitignore
vendored
@@ -1,3 +0,0 @@
|
|||||||
/snapshots/*
|
|
||||||
/cache/*
|
|
||||||
/vendor/*
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
# generated by PrusaSlicer 2.3.0+linux-x64 on 2021-05-27 at 05:24:47 UTC
|
|
||||||
bed_temperature = 75
|
|
||||||
bridge_fan_speed = 100
|
|
||||||
compatible_printers =
|
|
||||||
compatible_printers_condition =
|
|
||||||
compatible_prints =
|
|
||||||
compatible_prints_condition =
|
|
||||||
cooling = 1
|
|
||||||
disable_fan_first_layers = 2
|
|
||||||
end_filament_gcode = "; Filament-specific end gcode \n;END gcode for filament\n"
|
|
||||||
extrusion_multiplier = 0.99
|
|
||||||
fan_always_on = 1
|
|
||||||
fan_below_layer_time = 30
|
|
||||||
filament_colour = #1730DD
|
|
||||||
filament_cooling_final_speed = 3.4
|
|
||||||
filament_cooling_initial_speed = 2.2
|
|
||||||
filament_cooling_moves = 4
|
|
||||||
filament_cost = 25
|
|
||||||
filament_density = 1.18
|
|
||||||
filament_deretract_speed = nil
|
|
||||||
filament_diameter = 1.75
|
|
||||||
filament_load_time = 0
|
|
||||||
filament_loading_speed = 28
|
|
||||||
filament_loading_speed_start = 3
|
|
||||||
filament_max_volumetric_speed = 0
|
|
||||||
filament_minimal_purge_on_wipe_tower = 15
|
|
||||||
filament_notes = "Noulei Silk PLA Filaments.\nPrint well on low temps <200°C, but black has far better strength and layer adhesion than the bright colours.\nSuccessfully tested filaments already testet on delta /w e3dv6/0.4:\n#24 Silk Black\n#11Silk Blue\n#14Silk Silver Blue\n\nDasFilament PETG:\nusually good at 230/70°C, but spahipblau prints better at 220.\n\nnext ones to test out:\n#26 antique gold\n#9 red\n#4 white\npetg?"
|
|
||||||
filament_ramming_parameters = "120 100 6.6 6.8 7.2 7.6 7.9 8.2 8.7 9.4 9.9 10.0| 0.05 6.6 0.45 6.8 0.95 7.8 1.45 8.3 1.95 9.7 2.45 10 2.95 7.6 3.45 7.6 3.95 7.6 4.45 7.6 4.95 7.6"
|
|
||||||
filament_retract_before_travel = nil
|
|
||||||
filament_retract_before_wipe = nil
|
|
||||||
filament_retract_layer_change = nil
|
|
||||||
filament_retract_length = nil
|
|
||||||
filament_retract_lift = nil
|
|
||||||
filament_retract_lift_above = nil
|
|
||||||
filament_retract_lift_below = nil
|
|
||||||
filament_retract_restart_extra = nil
|
|
||||||
filament_retract_speed = nil
|
|
||||||
filament_settings_id = PETG-DasFilament_Saphirblau
|
|
||||||
filament_soluble = 0
|
|
||||||
filament_spool_weight = 0
|
|
||||||
filament_toolchange_delay = 0
|
|
||||||
filament_type = PET
|
|
||||||
filament_unload_time = 0
|
|
||||||
filament_unloading_speed = 90
|
|
||||||
filament_unloading_speed_start = 100
|
|
||||||
filament_vendor = (Unknown)
|
|
||||||
filament_wipe = nil
|
|
||||||
first_layer_bed_temperature = 70
|
|
||||||
first_layer_temperature = 235
|
|
||||||
full_fan_speed_layer = 3
|
|
||||||
inherits =
|
|
||||||
max_fan_speed = 100
|
|
||||||
min_fan_speed = 35
|
|
||||||
min_print_speed = 15
|
|
||||||
slowdown_below_layer_time = 10
|
|
||||||
start_filament_gcode = "; Filament gcode\n"
|
|
||||||
temperature = 240
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
# generated by PrusaSlicer 2.2.0+linux-x64 on 2020-11-09 at 06:05:44 UTC
|
|
||||||
bed_temperature = 70
|
|
||||||
bridge_fan_speed = 100
|
|
||||||
compatible_printers =
|
|
||||||
compatible_printers_condition =
|
|
||||||
compatible_prints =
|
|
||||||
compatible_prints_condition =
|
|
||||||
cooling = 1
|
|
||||||
disable_fan_first_layers = 1
|
|
||||||
end_filament_gcode = "; Filament-specific end gcode \n;END gcode for filament\n"
|
|
||||||
extrusion_multiplier = 0.97
|
|
||||||
fan_always_on = 1
|
|
||||||
fan_below_layer_time = 60
|
|
||||||
filament_colour = #000000
|
|
||||||
filament_cooling_final_speed = 3.4
|
|
||||||
filament_cooling_initial_speed = 2.2
|
|
||||||
filament_cooling_moves = 4
|
|
||||||
filament_cost = 20
|
|
||||||
filament_density = 1.18
|
|
||||||
filament_deretract_speed = nil
|
|
||||||
filament_diameter = 1.75
|
|
||||||
filament_load_time = 0
|
|
||||||
filament_loading_speed = 28
|
|
||||||
filament_loading_speed_start = 3
|
|
||||||
filament_max_volumetric_speed = 0
|
|
||||||
filament_minimal_purge_on_wipe_tower = 15
|
|
||||||
filament_notes = "Noulei Silk PLA Filaments.\nPrint well on low temps <200°C, but black has far better strength and layer adhesion than the bright colours.\nSuccessfully tested filaments already testet on delta /w e3dv6/0.4:\n\n#24 Silk Black\n#11Silk Blue\n#14Silk Silver Blue\n\nnext ones to test out:\n#26 antique gold\n#9 red\n#4 white\npetg?"
|
|
||||||
filament_ramming_parameters = "120 100 6.6 6.8 7.2 7.6 7.9 8.2 8.7 9.4 9.9 10.0| 0.05 6.6 0.45 6.8 0.95 7.8 1.45 8.3 1.95 9.7 2.45 10 2.95 7.6 3.45 7.6 3.95 7.6 4.45 7.6 4.95 7.6"
|
|
||||||
filament_retract_before_travel = nil
|
|
||||||
filament_retract_before_wipe = nil
|
|
||||||
filament_retract_layer_change = nil
|
|
||||||
filament_retract_length = nil
|
|
||||||
filament_retract_lift = nil
|
|
||||||
filament_retract_lift_above = nil
|
|
||||||
filament_retract_lift_below = nil
|
|
||||||
filament_retract_restart_extra = nil
|
|
||||||
filament_retract_speed = nil
|
|
||||||
filament_settings_id = ""
|
|
||||||
filament_soluble = 0
|
|
||||||
filament_toolchange_delay = 0
|
|
||||||
filament_type = PET
|
|
||||||
filament_unload_time = 0
|
|
||||||
filament_unloading_speed = 90
|
|
||||||
filament_unloading_speed_start = 100
|
|
||||||
filament_vendor = (Unknown)
|
|
||||||
filament_wipe = nil
|
|
||||||
first_layer_bed_temperature = 72
|
|
||||||
first_layer_temperature = 235
|
|
||||||
inherits =
|
|
||||||
max_fan_speed = 100
|
|
||||||
min_fan_speed = 100
|
|
||||||
min_print_speed = 10
|
|
||||||
slowdown_below_layer_time = 8
|
|
||||||
start_filament_gcode = "; Filament gcode\n"
|
|
||||||
temperature = 230
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
# generated by PrusaSlicer 2.3.0+linux-x64 on 2021-06-23 at 14:26:28 UTC
|
|
||||||
bed_temperature = 65
|
|
||||||
bridge_fan_speed = 100
|
|
||||||
compatible_printers =
|
|
||||||
compatible_printers_condition =
|
|
||||||
compatible_prints =
|
|
||||||
compatible_prints_condition =
|
|
||||||
cooling = 1
|
|
||||||
disable_fan_first_layers = 1
|
|
||||||
end_filament_gcode = "; Filament-specific end gcode \n;END gcode for filament\n"
|
|
||||||
extrusion_multiplier = 0.95
|
|
||||||
fan_always_on = 1
|
|
||||||
fan_below_layer_time = 60
|
|
||||||
filament_colour = #0EFB7C
|
|
||||||
filament_cooling_final_speed = 3.4
|
|
||||||
filament_cooling_initial_speed = 2.2
|
|
||||||
filament_cooling_moves = 4
|
|
||||||
filament_cost = 20
|
|
||||||
filament_density = 1.18
|
|
||||||
filament_deretract_speed = nil
|
|
||||||
filament_diameter = 1.75
|
|
||||||
filament_load_time = 0
|
|
||||||
filament_loading_speed = 28
|
|
||||||
filament_loading_speed_start = 3
|
|
||||||
filament_max_volumetric_speed = 0
|
|
||||||
filament_minimal_purge_on_wipe_tower = 15
|
|
||||||
filament_notes = ""
|
|
||||||
filament_ramming_parameters = "120 100 6.6 6.8 7.2 7.6 7.9 8.2 8.7 9.4 9.9 10.0| 0.05 6.6 0.45 6.8 0.95 7.8 1.45 8.3 1.95 9.7 2.45 10 2.95 7.6 3.45 7.6 3.95 7.6 4.45 7.6 4.95 7.6"
|
|
||||||
filament_retract_before_travel = nil
|
|
||||||
filament_retract_before_wipe = nil
|
|
||||||
filament_retract_layer_change = nil
|
|
||||||
filament_retract_length = nil
|
|
||||||
filament_retract_lift = nil
|
|
||||||
filament_retract_lift_above = nil
|
|
||||||
filament_retract_lift_below = nil
|
|
||||||
filament_retract_restart_extra = nil
|
|
||||||
filament_retract_speed = nil
|
|
||||||
filament_settings_id = ""
|
|
||||||
filament_soluble = 0
|
|
||||||
filament_spool_weight = 0
|
|
||||||
filament_toolchange_delay = 0
|
|
||||||
filament_type = PLA
|
|
||||||
filament_unload_time = 0
|
|
||||||
filament_unloading_speed = 90
|
|
||||||
filament_unloading_speed_start = 100
|
|
||||||
filament_vendor = (Unknown)
|
|
||||||
filament_wipe = nil
|
|
||||||
first_layer_bed_temperature = 65
|
|
||||||
first_layer_temperature = 200
|
|
||||||
full_fan_speed_layer = 0
|
|
||||||
inherits =
|
|
||||||
max_fan_speed = 100
|
|
||||||
min_fan_speed = 35
|
|
||||||
min_print_speed = 10
|
|
||||||
slowdown_below_layer_time = 8
|
|
||||||
start_filament_gcode = "; Filament gcode\n"
|
|
||||||
temperature = 195
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
# generated by PrusaSlicer 2.4.1+linux-x64-GTK2 on 2022-05-15 at 12:12:32 UTC
|
|
||||||
bed_temperature = 55
|
|
||||||
bridge_fan_speed = 100
|
|
||||||
compatible_printers =
|
|
||||||
compatible_printers_condition =
|
|
||||||
compatible_prints =
|
|
||||||
compatible_prints_condition =
|
|
||||||
cooling = 1
|
|
||||||
disable_fan_first_layers = 1
|
|
||||||
end_filament_gcode = "; Filament-specific end gcode \n;END gcode for filament\n"
|
|
||||||
extrusion_multiplier = 0.95
|
|
||||||
fan_always_on = 1
|
|
||||||
fan_below_layer_time = 60
|
|
||||||
filament_colour = #000000
|
|
||||||
filament_cooling_final_speed = 3.4
|
|
||||||
filament_cooling_initial_speed = 2.2
|
|
||||||
filament_cooling_moves = 4
|
|
||||||
filament_cost = 20
|
|
||||||
filament_density = 1.18
|
|
||||||
filament_deretract_speed = nil
|
|
||||||
filament_diameter = 1.75
|
|
||||||
filament_load_time = 0
|
|
||||||
filament_loading_speed = 28
|
|
||||||
filament_loading_speed_start = 3
|
|
||||||
filament_max_volumetric_speed = 0
|
|
||||||
filament_minimal_purge_on_wipe_tower = 15
|
|
||||||
filament_notes = "Noulei Silk PLA Filaments.\nPrint well on low temps <200°C, but black has far better strength and layer adhesion than the bright colours.\nSuccessfully tested filaments already testet on delta /w e3dv6/0.4:\n\n#24 Silk Black\n#11Silk Blue\n#14Silk Silver Blue\n\nnext ones to test out:\n#26 antique gold\n#9 red\n#4 white\npetg?"
|
|
||||||
filament_ramming_parameters = "120 100 6.6 6.8 7.2 7.6 7.9 8.2 8.7 9.4 9.9 10.0| 0.05 6.6 0.45 6.8 0.95 7.8 1.45 8.3 1.95 9.7 2.45 10 2.95 7.6 3.45 7.6 3.95 7.6 4.45 7.6 4.95 7.6"
|
|
||||||
filament_retract_before_travel = nil
|
|
||||||
filament_retract_before_wipe = nil
|
|
||||||
filament_retract_layer_change = nil
|
|
||||||
filament_retract_length = nil
|
|
||||||
filament_retract_lift = nil
|
|
||||||
filament_retract_lift_above = nil
|
|
||||||
filament_retract_lift_below = nil
|
|
||||||
filament_retract_restart_extra = nil
|
|
||||||
filament_retract_speed = nil
|
|
||||||
filament_settings_id = ""
|
|
||||||
filament_soluble = 0
|
|
||||||
filament_spool_weight = 0
|
|
||||||
filament_toolchange_delay = 0
|
|
||||||
filament_type = PLA
|
|
||||||
filament_unload_time = 0
|
|
||||||
filament_unloading_speed = 90
|
|
||||||
filament_unloading_speed_start = 100
|
|
||||||
filament_vendor = (Unknown)
|
|
||||||
filament_wipe = nil
|
|
||||||
first_layer_bed_temperature = 55
|
|
||||||
first_layer_temperature = 200
|
|
||||||
full_fan_speed_layer = 0
|
|
||||||
inherits =
|
|
||||||
max_fan_speed = 100
|
|
||||||
min_fan_speed = 40
|
|
||||||
min_print_speed = 10
|
|
||||||
slowdown_below_layer_time = 8
|
|
||||||
start_filament_gcode = "; Filament gcode\n"
|
|
||||||
temperature = 200
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
# generated by PrusaSlicer 2.5.0+linux-x64-GTK2 on 2022-09-26 at 18:17:08 UTC
|
|
||||||
bed_temperature = 60
|
|
||||||
bridge_fan_speed = 100
|
|
||||||
compatible_printers =
|
|
||||||
compatible_printers_condition =
|
|
||||||
compatible_prints =
|
|
||||||
compatible_prints_condition =
|
|
||||||
cooling = 1
|
|
||||||
disable_fan_first_layers = 2
|
|
||||||
end_filament_gcode = "; Filament-specific end gcode \n;END gcode for filament\n"
|
|
||||||
extrusion_multiplier = 0.98
|
|
||||||
fan_always_on = 1
|
|
||||||
fan_below_layer_time = 60
|
|
||||||
filament_colour = #10AC48
|
|
||||||
filament_cooling_final_speed = 3.4
|
|
||||||
filament_cooling_initial_speed = 2.2
|
|
||||||
filament_cooling_moves = 4
|
|
||||||
filament_cost = 20
|
|
||||||
filament_density = 1.18
|
|
||||||
filament_deretract_speed = nil
|
|
||||||
filament_diameter = 1.75
|
|
||||||
filament_load_time = 0
|
|
||||||
filament_loading_speed = 28
|
|
||||||
filament_loading_speed_start = 3
|
|
||||||
filament_max_volumetric_speed = 0
|
|
||||||
filament_minimal_purge_on_wipe_tower = 15
|
|
||||||
filament_notes = "Noulei Silk PLA Filaments.\nPrint well on low temps <200°C, but black has far better strength and layer adhesion than the bright colours.\nSuccessfully tested filaments already testet on delta /w e3dv6/0.4:\n\n#24 Silk Black\n#11Silk Blue\n#14Silk Silver Blue\n\nnext ones to test out:\n#26 antique gold\n#9 red\n#4 white\npetg?"
|
|
||||||
filament_ramming_parameters = "120 100 6.6 6.8 7.2 7.6 7.9 8.2 8.7 9.4 9.9 10.0| 0.05 6.6 0.45 6.8 0.95 7.8 1.45 8.3 1.95 9.7 2.45 10 2.95 7.6 3.45 7.6 3.95 7.6 4.45 7.6 4.95 7.6"
|
|
||||||
filament_retract_before_travel = nil
|
|
||||||
filament_retract_before_wipe = nil
|
|
||||||
filament_retract_layer_change = nil
|
|
||||||
filament_retract_length = nil
|
|
||||||
filament_retract_lift = nil
|
|
||||||
filament_retract_lift_above = nil
|
|
||||||
filament_retract_lift_below = nil
|
|
||||||
filament_retract_restart_extra = nil
|
|
||||||
filament_retract_speed = nil
|
|
||||||
filament_settings_id = ""
|
|
||||||
filament_soluble = 0
|
|
||||||
filament_spool_weight = 0
|
|
||||||
filament_toolchange_delay = 0
|
|
||||||
filament_type = PLA
|
|
||||||
filament_unload_time = 0
|
|
||||||
filament_unloading_speed = 90
|
|
||||||
filament_unloading_speed_start = 100
|
|
||||||
filament_vendor = (Unknown)
|
|
||||||
filament_wipe = nil
|
|
||||||
first_layer_bed_temperature = 62
|
|
||||||
first_layer_temperature = 210
|
|
||||||
full_fan_speed_layer = 3
|
|
||||||
inherits =
|
|
||||||
max_fan_speed = 100
|
|
||||||
min_fan_speed = 50
|
|
||||||
min_print_speed = 15
|
|
||||||
slowdown_below_layer_time = 15
|
|
||||||
start_filament_gcode = "; Filament gcode\n"
|
|
||||||
temperature = 205
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
# generated by PrusaSlicer 2.3.0+linux-x64 on 2021-06-20 at 21:08:45 UTC
|
|
||||||
bed_temperature = 60
|
|
||||||
bridge_fan_speed = 100
|
|
||||||
compatible_printers =
|
|
||||||
compatible_printers_condition =
|
|
||||||
compatible_prints =
|
|
||||||
compatible_prints_condition =
|
|
||||||
cooling = 1
|
|
||||||
disable_fan_first_layers = 3
|
|
||||||
end_filament_gcode = "; Filament-specific end gcode \n;END gcode for filament\n"
|
|
||||||
extrusion_multiplier = 1
|
|
||||||
fan_always_on = 1
|
|
||||||
fan_below_layer_time = 60
|
|
||||||
filament_colour = #29B2B2
|
|
||||||
filament_cooling_final_speed = 3.4
|
|
||||||
filament_cooling_initial_speed = 2.2
|
|
||||||
filament_cooling_moves = 4
|
|
||||||
filament_cost = 0
|
|
||||||
filament_density = 0
|
|
||||||
filament_deretract_speed = nil
|
|
||||||
filament_diameter = 1.75
|
|
||||||
filament_load_time = 0
|
|
||||||
filament_loading_speed = 28
|
|
||||||
filament_loading_speed_start = 3
|
|
||||||
filament_max_volumetric_speed = 0
|
|
||||||
filament_minimal_purge_on_wipe_tower = 15
|
|
||||||
filament_notes = ""
|
|
||||||
filament_ramming_parameters = "120 100 6.6 6.8 7.2 7.6 7.9 8.2 8.7 9.4 9.9 10.0| 0.05 6.6 0.45 6.8 0.95 7.8 1.45 8.3 1.95 9.7 2.45 10 2.95 7.6 3.45 7.6 3.95 7.6 4.45 7.6 4.95 7.6"
|
|
||||||
filament_retract_before_travel = nil
|
|
||||||
filament_retract_before_wipe = nil
|
|
||||||
filament_retract_layer_change = nil
|
|
||||||
filament_retract_length = nil
|
|
||||||
filament_retract_lift = nil
|
|
||||||
filament_retract_lift_above = nil
|
|
||||||
filament_retract_lift_below = nil
|
|
||||||
filament_retract_restart_extra = nil
|
|
||||||
filament_retract_speed = nil
|
|
||||||
filament_settings_id = ""
|
|
||||||
filament_soluble = 0
|
|
||||||
filament_spool_weight = 0
|
|
||||||
filament_toolchange_delay = 0
|
|
||||||
filament_type = PLA
|
|
||||||
filament_unload_time = 0
|
|
||||||
filament_unloading_speed = 90
|
|
||||||
filament_unloading_speed_start = 100
|
|
||||||
filament_vendor = (Unknown)
|
|
||||||
filament_wipe = nil
|
|
||||||
first_layer_bed_temperature = 65
|
|
||||||
first_layer_temperature = 200
|
|
||||||
full_fan_speed_layer = 0
|
|
||||||
inherits =
|
|
||||||
max_fan_speed = 100
|
|
||||||
min_fan_speed = 35
|
|
||||||
min_print_speed = 10
|
|
||||||
slowdown_below_layer_time = 5
|
|
||||||
start_filament_gcode = "; Filament gcode\n"
|
|
||||||
temperature = 200
|
|
||||||
@@ -1,155 +0,0 @@
|
|||||||
# generated by PrusaSlicer 2.5.0+linux-x64-GTK2 on 2022-09-26 at 18:20:40 UTC
|
|
||||||
avoid_crossing_perimeters = 0
|
|
||||||
avoid_crossing_perimeters_max_detour = 0
|
|
||||||
bottom_fill_pattern = monotonic
|
|
||||||
bottom_solid_layers = 4
|
|
||||||
bottom_solid_min_thickness = 0
|
|
||||||
bridge_acceleration = 0
|
|
||||||
bridge_angle = 0
|
|
||||||
bridge_flow_ratio = 0.95
|
|
||||||
bridge_speed = 60
|
|
||||||
brim_separation = 0
|
|
||||||
brim_type = outer_only
|
|
||||||
brim_width = 0
|
|
||||||
clip_multipart_objects = 1
|
|
||||||
compatible_printers =
|
|
||||||
compatible_printers_condition =
|
|
||||||
complete_objects = 0
|
|
||||||
default_acceleration = 0
|
|
||||||
dont_support_bridges = 1
|
|
||||||
draft_shield = disabled
|
|
||||||
elefant_foot_compensation = 0.1
|
|
||||||
ensure_vertical_shell_thickness = 0
|
|
||||||
external_perimeter_extrusion_width = 0
|
|
||||||
external_perimeter_speed = 40
|
|
||||||
external_perimeters_first = 0
|
|
||||||
extra_perimeters = 1
|
|
||||||
extruder_clearance_height = 20
|
|
||||||
extruder_clearance_radius = 20
|
|
||||||
extrusion_width = 0
|
|
||||||
fill_angle = 45
|
|
||||||
fill_density = 30%
|
|
||||||
fill_pattern = rectilinear
|
|
||||||
first_layer_acceleration = 0
|
|
||||||
first_layer_acceleration_over_raft = 0
|
|
||||||
first_layer_extrusion_width = 200%
|
|
||||||
first_layer_height = 0.4
|
|
||||||
first_layer_speed = 35
|
|
||||||
first_layer_speed_over_raft = 30
|
|
||||||
fuzzy_skin = none
|
|
||||||
fuzzy_skin_point_dist = 0.8
|
|
||||||
fuzzy_skin_thickness = 0.3
|
|
||||||
gap_fill_enabled = 1
|
|
||||||
gap_fill_speed = 40
|
|
||||||
gcode_comments = 0
|
|
||||||
gcode_label_objects = 0
|
|
||||||
gcode_resolution = 0.0125
|
|
||||||
gcode_substitutions =
|
|
||||||
infill_acceleration = 0
|
|
||||||
infill_anchor = 600%
|
|
||||||
infill_anchor_max = 50
|
|
||||||
infill_every_layers = 1
|
|
||||||
infill_extruder = 1
|
|
||||||
infill_extrusion_width = 0
|
|
||||||
infill_first = 0
|
|
||||||
infill_only_where_needed = 0
|
|
||||||
infill_overlap = 25%
|
|
||||||
infill_speed = 60
|
|
||||||
inherits =
|
|
||||||
interface_shells = 0
|
|
||||||
ironing = 0
|
|
||||||
ironing_flowrate = 15%
|
|
||||||
ironing_spacing = 0.1
|
|
||||||
ironing_speed = 20
|
|
||||||
ironing_type = topmost
|
|
||||||
layer_height = 0.4
|
|
||||||
max_print_speed = 200
|
|
||||||
max_volumetric_extrusion_rate_slope_negative = 0
|
|
||||||
max_volumetric_extrusion_rate_slope_positive = 0
|
|
||||||
max_volumetric_speed = 16
|
|
||||||
min_bead_width = 85%
|
|
||||||
min_feature_size = 25%
|
|
||||||
min_skirt_length = 10
|
|
||||||
mmu_segmented_region_max_width = 0
|
|
||||||
notes =
|
|
||||||
only_retract_when_crossing_perimeters = 0
|
|
||||||
ooze_prevention = 0
|
|
||||||
output_filename_format = [input_filename_base].gcode
|
|
||||||
overhangs = 1
|
|
||||||
perimeter_acceleration = 0
|
|
||||||
perimeter_extruder = 1
|
|
||||||
perimeter_extrusion_width = 0
|
|
||||||
perimeter_generator = arachne
|
|
||||||
perimeter_speed = 60
|
|
||||||
perimeters = 4
|
|
||||||
post_process =
|
|
||||||
print_settings_id = delta
|
|
||||||
raft_contact_distance = 0.1
|
|
||||||
raft_expansion = 1.5
|
|
||||||
raft_first_layer_density = 90%
|
|
||||||
raft_first_layer_expansion = 3
|
|
||||||
raft_layers = 0
|
|
||||||
resolution = 0
|
|
||||||
seam_position = rear
|
|
||||||
single_extruder_multi_material_priming = 1
|
|
||||||
skirt_distance = 7
|
|
||||||
skirt_height = 1
|
|
||||||
skirts = 1
|
|
||||||
slice_closing_radius = 0.049
|
|
||||||
slicing_mode = regular
|
|
||||||
small_perimeter_speed = 50%
|
|
||||||
solid_infill_below_area = 70
|
|
||||||
solid_infill_every_layers = 0
|
|
||||||
solid_infill_extruder = 1
|
|
||||||
solid_infill_extrusion_width = 0
|
|
||||||
solid_infill_speed = 60
|
|
||||||
spiral_vase = 0
|
|
||||||
standby_temperature_delta = -5
|
|
||||||
support_material = 0
|
|
||||||
support_material_angle = 0
|
|
||||||
support_material_auto = 1
|
|
||||||
support_material_bottom_contact_distance = 0
|
|
||||||
support_material_bottom_interface_layers = -1
|
|
||||||
support_material_buildplate_only = 0
|
|
||||||
support_material_closing_radius = 2
|
|
||||||
support_material_contact_distance = 0.25
|
|
||||||
support_material_enforce_layers = 0
|
|
||||||
support_material_extruder = 1
|
|
||||||
support_material_extrusion_width = 0
|
|
||||||
support_material_interface_contact_loops = 0
|
|
||||||
support_material_interface_extruder = 1
|
|
||||||
support_material_interface_layers = 3
|
|
||||||
support_material_interface_pattern = rectilinear
|
|
||||||
support_material_interface_spacing = 0
|
|
||||||
support_material_interface_speed = 100%
|
|
||||||
support_material_pattern = rectilinear-grid
|
|
||||||
support_material_spacing = 2.5
|
|
||||||
support_material_speed = 70
|
|
||||||
support_material_style = grid
|
|
||||||
support_material_synchronize_layers = 0
|
|
||||||
support_material_threshold = 45
|
|
||||||
support_material_with_sheath = 0
|
|
||||||
support_material_xy_spacing = 50%
|
|
||||||
thick_bridges = 1
|
|
||||||
thin_walls = 1
|
|
||||||
threads = 4
|
|
||||||
top_fill_pattern = monotonic
|
|
||||||
top_infill_extrusion_width = 0
|
|
||||||
top_solid_infill_speed = 40
|
|
||||||
top_solid_layers = 4
|
|
||||||
top_solid_min_thickness = 0
|
|
||||||
travel_speed = 200
|
|
||||||
travel_speed_z = 0
|
|
||||||
wall_distribution_count = 1
|
|
||||||
wall_transition_angle = 10
|
|
||||||
wall_transition_filter_deviation = 25%
|
|
||||||
wall_transition_length = 100%
|
|
||||||
wipe_tower = 0
|
|
||||||
wipe_tower_bridging = 10
|
|
||||||
wipe_tower_brim_width = 2
|
|
||||||
wipe_tower_no_sparse_layers = 0
|
|
||||||
wipe_tower_rotation_angle = 0
|
|
||||||
wipe_tower_width = 60
|
|
||||||
wipe_tower_x = 180
|
|
||||||
wipe_tower_y = 140
|
|
||||||
xy_size_compensation = 0
|
|
||||||
@@ -1,114 +0,0 @@
|
|||||||
# generated by PrusaSlicer 2.2.0+linux-x64 on 2020-10-09 at 15:48:42 UTC
|
|
||||||
avoid_crossing_perimeters = 0
|
|
||||||
bottom_fill_pattern = rectilinear
|
|
||||||
bottom_solid_layers = 3
|
|
||||||
bottom_solid_min_thickness = 0
|
|
||||||
bridge_acceleration = 0
|
|
||||||
bridge_angle = 0
|
|
||||||
bridge_flow_ratio = 0.91
|
|
||||||
bridge_speed = 100
|
|
||||||
brim_width = 0
|
|
||||||
clip_multipart_objects = 1
|
|
||||||
compatible_printers =
|
|
||||||
compatible_printers_condition =
|
|
||||||
complete_objects = 0
|
|
||||||
default_acceleration = 0
|
|
||||||
dont_support_bridges = 1
|
|
||||||
draft_shield = 0
|
|
||||||
elefant_foot_compensation = 0.1
|
|
||||||
ensure_vertical_shell_thickness = 1
|
|
||||||
external_perimeter_extrusion_width = 0.42
|
|
||||||
external_perimeter_speed = 100
|
|
||||||
external_perimeters_first = 0
|
|
||||||
extra_perimeters = 1
|
|
||||||
extruder_clearance_height = 20
|
|
||||||
extruder_clearance_radius = 20
|
|
||||||
extrusion_width = 0.44
|
|
||||||
fill_angle = 45
|
|
||||||
fill_density = 15%
|
|
||||||
fill_pattern = cubic
|
|
||||||
first_layer_acceleration = 0
|
|
||||||
first_layer_extrusion_width = 0.44
|
|
||||||
first_layer_height = 0.3
|
|
||||||
first_layer_speed = 40
|
|
||||||
gap_fill_speed = 100
|
|
||||||
gcode_comments = 0
|
|
||||||
gcode_label_objects = 0
|
|
||||||
infill_acceleration = 0
|
|
||||||
infill_every_layers = 1
|
|
||||||
infill_extruder = 1
|
|
||||||
infill_extrusion_width = 0.44
|
|
||||||
infill_first = 0
|
|
||||||
infill_only_where_needed = 0
|
|
||||||
infill_overlap = 30%
|
|
||||||
infill_speed = 100
|
|
||||||
inherits =
|
|
||||||
interface_shells = 0
|
|
||||||
layer_height = 0.2
|
|
||||||
max_print_speed = 200
|
|
||||||
max_volumetric_speed = 0
|
|
||||||
min_skirt_length = 10
|
|
||||||
notes =
|
|
||||||
only_retract_when_crossing_perimeters = 0
|
|
||||||
ooze_prevention = 0
|
|
||||||
output_filename_format = [input_filename_base].gcode
|
|
||||||
overhangs = 1
|
|
||||||
perimeter_acceleration = 0
|
|
||||||
perimeter_extruder = 1
|
|
||||||
perimeter_extrusion_width = 0.44
|
|
||||||
perimeter_speed = 100
|
|
||||||
perimeters = 3
|
|
||||||
post_process =
|
|
||||||
print_settings_id =
|
|
||||||
raft_layers = 0
|
|
||||||
resolution = 0
|
|
||||||
seam_position = aligned
|
|
||||||
single_extruder_multi_material_priming = 1
|
|
||||||
skirt_distance = 6
|
|
||||||
skirt_height = 1
|
|
||||||
skirts = 1
|
|
||||||
slice_closing_radius = 0.049
|
|
||||||
small_perimeter_speed = 100
|
|
||||||
solid_infill_below_area = 70
|
|
||||||
solid_infill_every_layers = 0
|
|
||||||
solid_infill_extruder = 1
|
|
||||||
solid_infill_extrusion_width = 0.44
|
|
||||||
solid_infill_speed = 100
|
|
||||||
spiral_vase = 0
|
|
||||||
standby_temperature_delta = -5
|
|
||||||
support_material = 0
|
|
||||||
support_material_angle = 0
|
|
||||||
support_material_auto = 1
|
|
||||||
support_material_buildplate_only = 1
|
|
||||||
support_material_contact_distance = 0.2
|
|
||||||
support_material_enforce_layers = 0
|
|
||||||
support_material_extruder = 1
|
|
||||||
support_material_extrusion_width = 0.45
|
|
||||||
support_material_interface_contact_loops = 0
|
|
||||||
support_material_interface_extruder = 1
|
|
||||||
support_material_interface_layers = 3
|
|
||||||
support_material_interface_spacing = 0
|
|
||||||
support_material_interface_speed = 100%
|
|
||||||
support_material_pattern = rectilinear
|
|
||||||
support_material_spacing = 1.5
|
|
||||||
support_material_speed = 100
|
|
||||||
support_material_synchronize_layers = 0
|
|
||||||
support_material_threshold = 20
|
|
||||||
support_material_with_sheath = 1
|
|
||||||
support_material_xy_spacing = 50%
|
|
||||||
thin_walls = 1
|
|
||||||
threads = 8
|
|
||||||
top_fill_pattern = rectilinear
|
|
||||||
top_infill_extrusion_width = 0.44
|
|
||||||
top_solid_infill_speed = 100
|
|
||||||
top_solid_layers = 3
|
|
||||||
top_solid_min_thickness = 0
|
|
||||||
travel_speed = 250
|
|
||||||
wipe_tower = 0
|
|
||||||
wipe_tower_bridging = 10
|
|
||||||
wipe_tower_no_sparse_layers = 0
|
|
||||||
wipe_tower_rotation_angle = 0
|
|
||||||
wipe_tower_width = 60
|
|
||||||
wipe_tower_x = 180
|
|
||||||
wipe_tower_y = 140
|
|
||||||
xy_size_compensation = 0
|
|
||||||
@@ -1,122 +0,0 @@
|
|||||||
# generated by PrusaSlicer 2.3.0+linux-x64 on 2021-06-23 at 10:26:16 UTC
|
|
||||||
avoid_crossing_perimeters = 0
|
|
||||||
avoid_crossing_perimeters_max_detour = 0
|
|
||||||
bottom_fill_pattern = monotonic
|
|
||||||
bottom_solid_layers = 3
|
|
||||||
bottom_solid_min_thickness = 0
|
|
||||||
bridge_acceleration = 0
|
|
||||||
bridge_angle = 0
|
|
||||||
bridge_flow_ratio = 1
|
|
||||||
bridge_speed = 60
|
|
||||||
brim_width = 0
|
|
||||||
clip_multipart_objects = 1
|
|
||||||
compatible_printers =
|
|
||||||
compatible_printers_condition =
|
|
||||||
complete_objects = 0
|
|
||||||
default_acceleration = 0
|
|
||||||
dont_support_bridges = 1
|
|
||||||
draft_shield = 0
|
|
||||||
elefant_foot_compensation = 0.2
|
|
||||||
ensure_vertical_shell_thickness = 1
|
|
||||||
external_perimeter_extrusion_width = 0.45
|
|
||||||
external_perimeter_speed = 30
|
|
||||||
external_perimeters_first = 0
|
|
||||||
extra_perimeters = 1
|
|
||||||
extruder_clearance_height = 20
|
|
||||||
extruder_clearance_radius = 20
|
|
||||||
extrusion_width = 0.45
|
|
||||||
fill_angle = 45
|
|
||||||
fill_density = 20%
|
|
||||||
fill_pattern = stars
|
|
||||||
first_layer_acceleration = 0
|
|
||||||
first_layer_extrusion_width = 0.42
|
|
||||||
first_layer_height = 0.3
|
|
||||||
first_layer_speed = 30
|
|
||||||
gap_fill_speed = 20
|
|
||||||
gcode_comments = 0
|
|
||||||
gcode_label_objects = 0
|
|
||||||
infill_acceleration = 0
|
|
||||||
infill_anchor = 600%
|
|
||||||
infill_anchor_max = 50
|
|
||||||
infill_every_layers = 1
|
|
||||||
infill_extruder = 1
|
|
||||||
infill_extrusion_width = 0.45
|
|
||||||
infill_first = 0
|
|
||||||
infill_only_where_needed = 0
|
|
||||||
infill_overlap = 25%
|
|
||||||
infill_speed = 80
|
|
||||||
inherits =
|
|
||||||
interface_shells = 0
|
|
||||||
ironing = 0
|
|
||||||
ironing_flowrate = 15%
|
|
||||||
ironing_spacing = 0.1
|
|
||||||
ironing_speed = 15
|
|
||||||
ironing_type = top
|
|
||||||
layer_height = 0.3
|
|
||||||
max_print_speed = 80
|
|
||||||
max_volumetric_speed = 0
|
|
||||||
min_skirt_length = 10
|
|
||||||
notes =
|
|
||||||
only_retract_when_crossing_perimeters = 1
|
|
||||||
ooze_prevention = 0
|
|
||||||
output_filename_format = [input_filename_base].gcode
|
|
||||||
overhangs = 1
|
|
||||||
perimeter_acceleration = 0
|
|
||||||
perimeter_extruder = 1
|
|
||||||
perimeter_extrusion_width = 0.45
|
|
||||||
perimeter_speed = 60
|
|
||||||
perimeters = 3
|
|
||||||
post_process =
|
|
||||||
print_settings_id =
|
|
||||||
raft_layers = 0
|
|
||||||
resolution = 0
|
|
||||||
seam_position = aligned
|
|
||||||
single_extruder_multi_material_priming = 1
|
|
||||||
skirt_distance = 6
|
|
||||||
skirt_height = 1
|
|
||||||
skirts = 1
|
|
||||||
slice_closing_radius = 0.049
|
|
||||||
small_perimeter_speed = 30
|
|
||||||
solid_infill_below_area = 70
|
|
||||||
solid_infill_every_layers = 0
|
|
||||||
solid_infill_extruder = 1
|
|
||||||
solid_infill_extrusion_width = 0.45
|
|
||||||
solid_infill_speed = 60
|
|
||||||
spiral_vase = 0
|
|
||||||
standby_temperature_delta = -5
|
|
||||||
support_material = 0
|
|
||||||
support_material_angle = 0
|
|
||||||
support_material_auto = 1
|
|
||||||
support_material_buildplate_only = 0
|
|
||||||
support_material_contact_distance = 0.2
|
|
||||||
support_material_enforce_layers = 0
|
|
||||||
support_material_extruder = 1
|
|
||||||
support_material_extrusion_width = 0.35
|
|
||||||
support_material_interface_contact_loops = 0
|
|
||||||
support_material_interface_extruder = 1
|
|
||||||
support_material_interface_layers = 3
|
|
||||||
support_material_interface_spacing = 0
|
|
||||||
support_material_interface_speed = 100%
|
|
||||||
support_material_pattern = rectilinear
|
|
||||||
support_material_spacing = 2.5
|
|
||||||
support_material_speed = 60
|
|
||||||
support_material_synchronize_layers = 0
|
|
||||||
support_material_threshold = 0
|
|
||||||
support_material_with_sheath = 1
|
|
||||||
support_material_xy_spacing = 50%
|
|
||||||
thin_walls = 1
|
|
||||||
threads = 8
|
|
||||||
top_fill_pattern = monotonic
|
|
||||||
top_infill_extrusion_width = 0.4
|
|
||||||
top_solid_infill_speed = 20
|
|
||||||
top_solid_layers = 3
|
|
||||||
top_solid_min_thickness = 0
|
|
||||||
travel_speed = 130
|
|
||||||
wipe_tower = 0
|
|
||||||
wipe_tower_bridging = 10
|
|
||||||
wipe_tower_no_sparse_layers = 0
|
|
||||||
wipe_tower_rotation_angle = 0
|
|
||||||
wipe_tower_width = 60
|
|
||||||
wipe_tower_x = 180
|
|
||||||
wipe_tower_y = 140
|
|
||||||
xy_size_compensation = 0
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
# generated by PrusaSlicer 2.3.3+linux-x64 on 2021-11-12 at 23:01:23 UTC
|
|
||||||
absolute_correction = 0
|
|
||||||
area_fill = 50
|
|
||||||
bed_custom_model =
|
|
||||||
bed_custom_texture =
|
|
||||||
bed_shape = 1.48x1.02,119.48x1.02,119.48x67.02,1.48x67.02
|
|
||||||
default_sla_material_profile = Prusa Orange Tough @0.05
|
|
||||||
default_sla_print_profile = 0.05 Normal
|
|
||||||
display_height = 68.04
|
|
||||||
display_mirror_x = 1
|
|
||||||
display_mirror_y = 0
|
|
||||||
display_orientation = portrait
|
|
||||||
display_pixels_x = 2560
|
|
||||||
display_pixels_y = 1440
|
|
||||||
display_width = 120.96
|
|
||||||
elefant_foot_compensation = 0.2
|
|
||||||
elefant_foot_min_width = 0.2
|
|
||||||
fast_tilt_time = 5
|
|
||||||
gamma_correction = 1
|
|
||||||
host_type = octoprint
|
|
||||||
inherits = Original Prusa SL1
|
|
||||||
max_exposure_time = 120
|
|
||||||
max_initial_exposure_time = 300
|
|
||||||
max_print_height = 150
|
|
||||||
min_exposure_time = 1
|
|
||||||
min_initial_exposure_time = 1
|
|
||||||
print_host =
|
|
||||||
printer_model = SL1
|
|
||||||
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_PRUSA3D\nPRINTER_MODEL_SL1\n
|
|
||||||
printer_settings_id =
|
|
||||||
printer_technology = SLA
|
|
||||||
printer_variant = default
|
|
||||||
printer_vendor =
|
|
||||||
printhost_apikey =
|
|
||||||
printhost_cafile =
|
|
||||||
relative_correction = 1,1
|
|
||||||
slow_tilt_time = 8
|
|
||||||
thumbnails = 400x400,800x480
|
|
||||||
@@ -1,79 +0,0 @@
|
|||||||
# generated by PrusaSlicer 2.5.0+linux-x64-GTK2 on 2022-09-26 at 18:16:41 UTC
|
|
||||||
bed_custom_model =
|
|
||||||
bed_custom_texture =
|
|
||||||
bed_shape = 89.6575x7.84402,88.6327x15.6283,86.9333x23.2937,84.5723x30.7818,81.5677x38.0356,77.9423x45,73.7237x51.6219,68.944x57.8509,63.6396x63.6396,57.8509x68.944,51.6219x73.7237,45x77.9423,38.0356x81.5677,30.7818x84.5723,23.2937x86.9333,15.6283x88.6327,7.84402x89.6575,5.51091e-15x90,-7.84402x89.6575,-15.6283x88.6327,-23.2937x86.9333,-30.7818x84.5723,-38.0356x81.5677,-45x77.9423,-51.6219x73.7237,-57.8509x68.944,-63.6396x63.6396,-68.944x57.8509,-73.7237x51.6219,-77.9423x45,-81.5677x38.0356,-84.5723x30.7818,-86.9333x23.2937,-88.6327x15.6283,-89.6575x7.84402,-90x1.10218e-14,-89.6575x-7.84402,-88.6327x-15.6283,-86.9333x-23.2937,-84.5723x-30.7818,-81.5677x-38.0356,-77.9423x-45,-73.7237x-51.6219,-68.944x-57.8509,-63.6396x-63.6396,-57.8509x-68.944,-51.6219x-73.7237,-45x-77.9423,-38.0356x-81.5677,-30.7818x-84.5723,-23.2937x-86.9333,-15.6283x-88.6327,-7.84402x-89.6575,-1.65327e-14x-90,7.84402x-89.6575,15.6283x-88.6327,23.2937x-86.9333,30.7818x-84.5723,38.0356x-81.5677,45x-77.9423,51.6219x-73.7237,57.8509x-68.944,63.6396x-63.6396,68.944x-57.8509,73.7237x-51.6219,77.9423x-45,81.5677x-38.0356,84.5723x-30.7818,86.9333x-23.2937,88.6327x-15.6283,89.6575x-7.84402,90x-2.20436e-14
|
|
||||||
before_layer_gcode = ; Layer change to Layer [layer_num]\n; Z=[layer_z]\n
|
|
||||||
between_objects_gcode =
|
|
||||||
color_change_gcode = M600
|
|
||||||
cooling_tube_length = 5
|
|
||||||
cooling_tube_retraction = 91.5
|
|
||||||
default_filament_profile = ""
|
|
||||||
default_print_profile =
|
|
||||||
deretract_speed = 0
|
|
||||||
end_gcode = M104 S0 ; turn off hotend temperature\nM190 S0; turn off bed temperature\nM106; hotend fan full blast\nG28; home \nM84; disable motors\nG4 S10; wait 10 seconds for hotend cooldown\n; play some tunes:\n;Mission Impossible\nM300 S2349 P75\nM300 S2489 P75\nM300 S2349 P75\nM300 S2489 P75\nM300 S2349 P75\nM300 S2489 P75\nM300 S2349 P75\nM300 S2489 P75\nM300 S2349 P75\nM300 S2349 P75\nM300 S2489 P75\nM300 S2637 P75\nM300 S2793 P75\nM300 S2959 P75\nM300 S3135 P75\nM300 S3135 P150\nM300 S0 P300\nM300 S3135 P150\nM300 S0 P300\nM300 S1864 P150\nM300 S0 P150\nM300 S2093 P150\nM300 S0 P150\nM300 S3135 P150\nM300 S0 P300\nM300 S3135 P150\nM300 S0 P300\nM300 S2793 P150\nM300 S0 P150\nM300 S2959 P150\nM300 S0 P150\nM300 S3135 P150\nM300 S0 P300\nM300 S3135 P150\nM300 S0 P300\nM300 S1864 P150\nM300 S0 P150\nM300 S2093 P150\nM300 S0 P150\nM300 S3135 P150\nM300 S0 P300\nM300 S3135 P150\nM300 S0 P300\nM300 S2793 P150\nM300 S0 P150\nM300 S2959 P150\nM300 S0 P150\nM300 S1864 P150\nM300 S3135 P150\nM300 S2349 P1200\nM300 S0 P75\nM300 S1864 P150\nM300 S3135 P150\nM300 S2217 P1200\nM300 S0 P75\nM300 S1864 P150\nM300 S3135 P150\nM300 S2093 P1200\nM300 S0 P150\nM300 S932 P150\nM300 S2093 P150\n; end of tune\nG4 S120; wait another 2 Minutes for hotend cooldown\nM107; hotend fan off
|
|
||||||
extra_loading_move = -2
|
|
||||||
extruder_colour = #019B9B
|
|
||||||
extruder_offset = 0x0
|
|
||||||
gcode_flavor = marlin2
|
|
||||||
high_current_on_filament_swap = 0
|
|
||||||
host_type = octoprint
|
|
||||||
inherits =
|
|
||||||
layer_gcode =
|
|
||||||
machine_limits_usage = emit_to_gcode
|
|
||||||
machine_max_acceleration_e = 10000,5000
|
|
||||||
machine_max_acceleration_extruding = 1500,1250
|
|
||||||
machine_max_acceleration_retracting = 1500,1250
|
|
||||||
machine_max_acceleration_travel = 1500,1250
|
|
||||||
machine_max_acceleration_x = 9000,9000
|
|
||||||
machine_max_acceleration_y = 9000,9000
|
|
||||||
machine_max_acceleration_z = 9000,9000
|
|
||||||
machine_max_feedrate_e = 250,250
|
|
||||||
machine_max_feedrate_x = 1500,1500
|
|
||||||
machine_max_feedrate_y = 1500,1500
|
|
||||||
machine_max_feedrate_z = 1500,1500
|
|
||||||
machine_max_jerk_e = 2.5,2.5
|
|
||||||
machine_max_jerk_x = 9,9
|
|
||||||
machine_max_jerk_y = 9,9
|
|
||||||
machine_max_jerk_z = 9,9
|
|
||||||
machine_min_extruding_rate = 0,0
|
|
||||||
machine_min_travel_rate = 0,0
|
|
||||||
max_layer_height = 0
|
|
||||||
max_print_height = 190
|
|
||||||
min_layer_height = 0.1
|
|
||||||
nozzle_diameter = 0.6
|
|
||||||
parking_pos_retraction = 92
|
|
||||||
pause_print_gcode = M601
|
|
||||||
print_host =
|
|
||||||
printer_model =
|
|
||||||
printer_notes =
|
|
||||||
printer_settings_id =
|
|
||||||
printer_technology = FFF
|
|
||||||
printer_variant =
|
|
||||||
printer_vendor =
|
|
||||||
printhost_apikey =
|
|
||||||
printhost_cafile =
|
|
||||||
remaining_times = 1
|
|
||||||
retract_before_travel = 2
|
|
||||||
retract_before_wipe = 10%
|
|
||||||
retract_layer_change = 0
|
|
||||||
retract_length = 2
|
|
||||||
retract_length_toolchange = 10
|
|
||||||
retract_lift = 0.15
|
|
||||||
retract_lift_above = 0
|
|
||||||
retract_lift_below = 150
|
|
||||||
retract_restart_extra = 0
|
|
||||||
retract_restart_extra_toolchange = 0
|
|
||||||
retract_speed = 37.5
|
|
||||||
silent_mode = 1
|
|
||||||
single_extruder_multi_material = 0
|
|
||||||
start_gcode = G28 ; home all axes\nM140 S[first_layer_bed_temperature] ; set bed final temp\nG1 X0 Y0 Z100 F4000 ; safe position\nG1 X0 Y-50 Z25 F4000 ; lift nozzle\nM190 S[first_layer_bed_temperature] ; wait for bed final temp\nM104 S[first_layer_temperature] ; set extruder final temp\nM109 S[first_layer_temperature] ; wait for extruder final temp\nG1 X0 Y-45 Z0.3 F3000 ; move down\n;G1 Z0.5; lift\nG92 E0\n;{if perimeter_speed >= 75}M900 K0; Disable LINEAR_ADVANCE for speed's sake!\n;{elsif perimeter_speed >= 60}M900 K0.1; reduced LINEAR_ADVANCE because of medium speeds\n;{else}M900 K0.2; LINEAR_ADVANCE high quality preset\n; qualitywise ideal K would be somewhere around 0.38, but this slows the printer down at a unacceptable rate\nM900 K0 ;disabled linear advance alltogether, because it really hurts the printer and makes very screecy noises\n;{endif}
|
|
||||||
template_custom_gcode =
|
|
||||||
thumbnails =
|
|
||||||
thumbnails_format = PNG
|
|
||||||
toolchange_gcode =
|
|
||||||
use_firmware_retraction = 0
|
|
||||||
use_relative_e_distances = 0
|
|
||||||
use_volumetric_e = 0
|
|
||||||
variable_layer_height = 1
|
|
||||||
wipe = 0
|
|
||||||
z_offset = 0
|
|
||||||
@@ -1,77 +0,0 @@
|
|||||||
# generated by PrusaSlicer 2.3.0+linux-x64 on 2021-06-22 at 23:05:45 UTC
|
|
||||||
bed_custom_model =
|
|
||||||
bed_custom_texture =
|
|
||||||
bed_shape = 0x0,177x0,177x175,0x175
|
|
||||||
before_layer_gcode =
|
|
||||||
between_objects_gcode =
|
|
||||||
color_change_gcode = M600
|
|
||||||
cooling_tube_length = 5
|
|
||||||
cooling_tube_retraction = 91.5
|
|
||||||
default_filament_profile =
|
|
||||||
default_print_profile =
|
|
||||||
deretract_speed = 0
|
|
||||||
end_gcode = M104 S0 ; turn off hotend\nM140 S0 ; turn off bed\nG28 X0 ; home X axis\nM84 ; disable motors\nM106 S255 ; Cooldown Hotend\nG4 S30 ; wait 30secs\nM107 ; turn off Fan \n
|
|
||||||
extra_loading_move = -2
|
|
||||||
extruder_colour = ""
|
|
||||||
extruder_offset = 0x0
|
|
||||||
gcode_flavor = marlin
|
|
||||||
high_current_on_filament_swap = 0
|
|
||||||
host_type = octoprint
|
|
||||||
inherits =
|
|
||||||
layer_gcode =
|
|
||||||
machine_limits_usage = emit_to_gcode
|
|
||||||
machine_max_acceleration_e = 10000,5000
|
|
||||||
machine_max_acceleration_extruding = 1500,1250
|
|
||||||
machine_max_acceleration_retracting = 1500,1250
|
|
||||||
machine_max_acceleration_x = 9000,1000
|
|
||||||
machine_max_acceleration_y = 9000,1000
|
|
||||||
machine_max_acceleration_z = 500,200
|
|
||||||
machine_max_feedrate_e = 120,120
|
|
||||||
machine_max_feedrate_x = 500,200
|
|
||||||
machine_max_feedrate_y = 500,200
|
|
||||||
machine_max_feedrate_z = 5,5
|
|
||||||
machine_max_jerk_e = 2.5,2.5
|
|
||||||
machine_max_jerk_x = 10,10
|
|
||||||
machine_max_jerk_y = 10,10
|
|
||||||
machine_max_jerk_z = 0.2,0.4
|
|
||||||
machine_min_extruding_rate = 0,0
|
|
||||||
machine_min_travel_rate = 0,0
|
|
||||||
max_layer_height = 0
|
|
||||||
max_print_height = 145
|
|
||||||
min_layer_height = 0.07
|
|
||||||
nozzle_diameter = 0.4
|
|
||||||
parking_pos_retraction = 92
|
|
||||||
pause_print_gcode = M601
|
|
||||||
print_host =
|
|
||||||
printer_model =
|
|
||||||
printer_notes =
|
|
||||||
printer_settings_id =
|
|
||||||
printer_technology = FFF
|
|
||||||
printer_variant =
|
|
||||||
printer_vendor =
|
|
||||||
printhost_apikey =
|
|
||||||
printhost_cafile =
|
|
||||||
remaining_times = 0
|
|
||||||
retract_before_travel = 2
|
|
||||||
retract_before_wipe = 0%
|
|
||||||
retract_layer_change = 0
|
|
||||||
retract_length = 2
|
|
||||||
retract_length_toolchange = 10
|
|
||||||
retract_lift = 0.1
|
|
||||||
retract_lift_above = 0
|
|
||||||
retract_lift_below = 0
|
|
||||||
retract_restart_extra = 0
|
|
||||||
retract_restart_extra_toolchange = 0
|
|
||||||
retract_speed = 40
|
|
||||||
silent_mode = 1
|
|
||||||
single_extruder_multi_material = 0
|
|
||||||
start_gcode = G28 ; home all axes\nG1 X0 Y0 Z3 F2500 ; lift nozzle\nG92 E0 ;Reset Extruder\nM140 S[first_layer_bed_temperature]\nM109 S[first_layer_temperature] ; wait for nozzle\nG1 X1 Y0 Z[first_layer_height] F5000.0\nG1 X150 Y0 F1500.0 E12 ; Draw line\nG1 X150 Y5 F5000 ; wipe\nG1 Z1 F2500; lift\nG92 E0; reset Extruder
|
|
||||||
template_custom_gcode =
|
|
||||||
thumbnails =
|
|
||||||
toolchange_gcode =
|
|
||||||
use_firmware_retraction = 0
|
|
||||||
use_relative_e_distances = 0
|
|
||||||
use_volumetric_e = 0
|
|
||||||
variable_layer_height = 1
|
|
||||||
wipe = 0
|
|
||||||
z_offset = 0
|
|
||||||
5
deltazeus/marlin/.gitignore
vendored
@@ -1,5 +0,0 @@
|
|||||||
.pio
|
|
||||||
.vscode/.browse.c_cpp.db*
|
|
||||||
.vscode/c_cpp_properties.json
|
|
||||||
.vscode/launch.json
|
|
||||||
.vscode/ipch
|
|
||||||
10
deltazeus/marlin/.vscode/extensions.json
vendored
@@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
// See http://go.microsoft.com/fwlink/?LinkId=827846
|
|
||||||
// for the documentation about the extensions.json format
|
|
||||||
"recommendations": [
|
|
||||||
"platformio.platformio-ide"
|
|
||||||
],
|
|
||||||
"unwantedRecommendations": [
|
|
||||||
"ms-vscode.cpptools-extension-pack"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
- soft pwm for fans to respect sunon 40mm fans
|
|
||||||
- https://github.com/MarlinFirmware/Marlin/issues/12360
|
|
||||||
- https://github.com/MarlinFirmware/Marlin/issues/19924
|
|
||||||
- https://www.3d-druck-community.de/showthread.php?tid=23057
|
|
||||||
24
filaments.md
@@ -1,24 +0,0 @@
|
|||||||
# Filaments
|
|
||||||
|
|
||||||
| Make | Material | Color/Code | Dia | Price/Volume | Notes | 3dprintingdb |
|
|
||||||
|--- |--- |--- |--- |--: |--- |--- |
|
|
||||||
| Noulei | PLA | Silk Black / #24 | 1.75mm | 26,99€/1kg | 190-200°C, better layer bond as other silk filaments from same vendor, multiplier: 0.95 | N/A |
|
|
||||||
| Noulei | PLA | Silk Blue / #11 | 1.75mm | 26,99€/1kg | 190-200°C, Shiny tortoise/light blue | N/A |
|
|
||||||
| Noulei | PLA | Silk Silver Blue / #14| 1.75mm | 26,99€/1kg | 190-200°C, Shiny purple | N/A |
|
|
||||||
| GEEETECH | PLA | Black / 700-001-0426 / Y2005 | 1.75mm | 24,99€/1kg | | N/A |
|
|
||||||
| GEEETECH | PLA | Silk Silver | 1.75mm | 26,99€/1kg | | N/A |
|
|
||||||
| TINMORRY | PETG | White | 1,75mm | 18,88€/1kg | 235°C/75°C, very strong layer bond | [link](https://3dprintingdb.com/filament/928/tinmorry-petg-white) |
|
|
||||||
| Sunlu | PLA | Grasgruen | 1,75mm | 18,49€/1kg | 210°C/205°C, slightly more dense than noulei (multiplier ~0.98)
|
|
||||||
| DasFilament | PETG | Silber | 1,75mm | 22,37€/850g(refill) | 235°C/75°C, with sparkles | N/A |
|
|
||||||
| DasFilament | PETG | Saphirblau | 1,75mm | 21,41€/800g | 225°C/75°C, needs less temp than others! | [link](https://3dprintingdb.com/filament/662/das-filament-petg-saphirblau) |
|
|
||||||
| DasFilament | PETG | Rubinrot | 1,75mm | 18,88€/850g(refill) | TBD | [link](https://3dprintingdb.com/filament/663/das-filament-petg-rubinrot) |
|
|
||||||
|
|
||||||
## Next Filaments to test out:
|
|
||||||
* Prusa PLA
|
|
||||||
* Galaxy Black
|
|
||||||
* DasFilament PLA
|
|
||||||
* Blue Pearl
|
|
||||||
* DasFilament PETG
|
|
||||||
* [Opalgrün](https://3dprintingdb.com/filament/661/das-filament-petg-opalgrun)
|
|
||||||
* Sturmgrau
|
|
||||||
* Anthrazit V2
|
|
||||||
BIN
openscad/foreign/parametric-helix_haystack-mod/haystack_logo.png
Normal file
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
@@ -0,0 +1,58 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
version="1.1"
|
||||||
|
id="svg1"
|
||||||
|
width="501.33334"
|
||||||
|
height="178.66667"
|
||||||
|
viewBox="0 0 501.33334 178.66667"
|
||||||
|
sodipodi:docname="haystack_logo_final.svg"
|
||||||
|
inkscape:version="1.4.2 (ebf0e940d0, 2025-05-08)"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<defs
|
||||||
|
id="defs1" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="namedview1"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#000000"
|
||||||
|
borderopacity="0.25"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
showguides="true"
|
||||||
|
inkscape:zoom="3.2546641"
|
||||||
|
inkscape:cx="109.84236"
|
||||||
|
inkscape:cy="69.899687"
|
||||||
|
inkscape:window-width="5120"
|
||||||
|
inkscape:window-height="1372"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="g1">
|
||||||
|
<sodipodi:guide
|
||||||
|
position="154.87316,107.74798"
|
||||||
|
orientation="0,-1"
|
||||||
|
id="guide1"
|
||||||
|
inkscape:locked="false" />
|
||||||
|
<sodipodi:guide
|
||||||
|
position="408.0677,50.320605"
|
||||||
|
orientation="0,-1"
|
||||||
|
id="guide3"
|
||||||
|
inkscape:locked="false" />
|
||||||
|
</sodipodi:namedview>
|
||||||
|
<g
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
inkscape:label="Image"
|
||||||
|
id="g1">
|
||||||
|
<path
|
||||||
|
style="fill:#000000"
|
||||||
|
d="m 125.31473,153.15745 c 0.32361,-24.84341 -1.74527,-36.06144 -15.89944,-59.045268 l -8.85996,-14.386967 7.07083,-9.514556 11.98249,18.707475 c 7.74992,12.099446 10.95559,19.597976 13.01655,26.841556 0,0 2.84053,10.88974 3.5787,16.45382 0.94049,7.08905 1.0643,21.42708 1.0643,21.42708 l -0.23925,21.48138 -12,-0.0257 z m 82.26852,-25.32179 c -6.79765,-2.22596 -13.88764,-8.07626 -13.88764,-8.07626 -0.0381,-0.0342 7.06667,-8.68224 7.06667,-8.68224 l 3.97035,2.82714 c 4.76565,3.39344 14.1229,5.58756 17.8505,4.92645 7.75546,-1.37545 11.77629,-9.95953 -6.04897,-13.2625 -8.90014,-1.64917 -18.51381,-7.201061 -20.27411,-13.076441 -1.91807,-6.401928 -0.98605,-10.686611 3.47881,-15.992791 4.2928,-5.101702 11.3218,-5.722837 18.4607,-5.622832 5.37668,0.07532 18.16272,6.300787 18.16272,6.300787 -1.16603,2.619741 -5.57525,9.875482 -5.52415,9.753794 l -5.18481,-2.64509 c -5.38579,-2.747624 -11.35893,-3.054762 -14.85768,-2.011576 -3.63087,1.08258 -4.75459,4.871973 -3.5225,7.684615 1.37813,3.146015 7.67926,3.591052 14.93801,6.045572 6.82697,2.308517 13.24941,4.392612 16.42394,10.862102 1.23243,2.51163 0.96349,9.02362 -0.96472,12.17885 -5.56569,9.10741 -17.21942,13.00406 -30.08712,8.79042 z m 166.0103,-21.46368 c -1.48309,-5.04618 -0.96418,-10.512542 0.0329,-13.776365 2.71295,-8.880641 8.85017,-17.298301 16.66143,-19.951358 10.42808,-3.541848 21.40674,-2.539274 30.4917,2.764525 l 4.96483,2.898471 -8.1308,9.863975 -4.81172,-3.265321 c -11.86273,-8.050262 -27.90952,0.261204 -26.96689,14.611162 1.02816,15.652231 18.50059,21.256421 27.6218,13.634681 l 3.94927,-3.30003 8.74709,8.96434 -3.70726,3.26268 c -7.06847,6.2208 -20.648,8.33008 -30.89871,4.70033 -5.42498,-1.92097 -14.3365,-8.0999 -17.95364,-20.40709 z M 1.6956149,99.640587 V 70.97392 h 6.666667 6.6666671 V 82.307253 93.640587 H 26.362282 37.695616 V 82.307253 70.97392 h 6.666667 6.666666 V 99.640587 128.30725 H 44.362283 37.695616 V 116.97392 105.64059 H 26.362282 15.028949 v 11.33333 11.33333 H 8.3622819 1.6956149 Z M 63.744232,123.30725 C 66.59586,106.25446 72.803233,91.979161 86.155074,71.7683 99.916134,50.938014 102.37972,46.387822 106.4375,34.307252 c 2.60391,-7.752186 3.60534,-13.490071 3.66513,-21.000001 l 0.0823,-10.3333329 h 5.75535 5.75536 V 13.360453 c 0,19.163686 -9.07772,38.383291 -27.068015,65.884254 -5.82228,8.900256 -7.72078,14.126075 -8.14179,14.284256 0,0 10.279841,0.111624 14.992315,0.111624 l 6.36555,11.794273 c -9.122675,0.28357 -18.252151,0.20573 -27.378076,0.20573 l -2.051657,6.90866 c -1.128409,3.79977 -2.231702,9.42558 -2.377543,10.69079 l -0.584097,5.06721 H 62.908115 Z m 87.284718,-5.92984 V 106.44756 L 140.36228,89.560489 C 134.49561,80.272597 129.6413,70.954628 129.6413,70.954628 c 3.02508,0.01727 3.48035,0.01929 14.21082,0.01929 l 6.52282,11.287817 c 3.58755,6.2083 6.78856,11.022071 7.11337,10.697268 4.54102,-6.974921 8.67985,-14.884864 12.95875,-22.024512 0,0 0.0136,-0.09172 14.09563,0.02395 -3.02169,6.848287 -7.33158,12.932566 -11.34972,19.234764 l -10.16402,15.885945 v 11.11405 11.11405 h -6 -6 z M 268.36228,105.64059 V 82.97392 h -8.66666 -8.66667 v -6 -6 h 24 24 v 6 6 h -8.66667 -8.66666 v 22.66667 22.66666 h -6.66667 -6.66667 z m 34.44941,22.64966 c 0,0 24.93638,-57.405468 24.88185,-57.405468 h 10.77302 l 25.05122,57.384868 -13.60161,0.0376 -4.40063,-11.8202 -25.49513,0.10667 -3.88035,11.71353 z m 30.04155,-42.965528 c -2.46505,6.333771 -4.90586,12.677133 -7.44293,18.982528 h 14.91306 c -2.51572,-6.317459 -5.04821,-12.628324 -7.47013,-18.982528 z M 443.02895,70.97392 h 12 l 0.1282,24.666667 23.20512,-24.68097 15.9444,0.0144 -22.50614,25.526067 c -0.008,-0.0046 6.09017,8.557266 12.1859,16.807266 l 11.08313,15 h -15.60774 l -17.09955,-23.8 -7.33334,6.96558 v 16.83432 h -12 z M 85.424934,47.905541 C 81.606985,36.351334 82.045145,35.705457 81.718464,29.562339 l -0.0228,-5.255087 h 6 6 l 0.0158,3.666666 c 0.009,2.016667 0.87911,6.910332 1.93423,10.874812 l 1.9184,7.208145 -8.445544,11.929437 -1.62963,-3.83456 z"
|
||||||
|
id="path1"
|
||||||
|
sodipodi:nodetypes="ssccssacccssccssssssccsssssssssssccsssccsssscccccccccccccccccccccccscsccccssscccssccsccsccssccsccccccccccccccccccccccccccccccccccccccccccccccccccccccccscccsc" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 5.6 KiB |
@@ -0,0 +1,97 @@
|
|||||||
|
// number of fragments | a higher fragment count will result in slower render times '20' is sufficient.
|
||||||
|
fn = 30; // [0:100]
|
||||||
|
// "sugar phosphate backbones" | part of helix_base module | if adjusted also consider adjusting 'post_distance_apart' or 'center_bridge_length'.
|
||||||
|
post_radius = 3.5; // [0:500]
|
||||||
|
post_hole_radius = 1.25; // [0:500]
|
||||||
|
// part of helix_base module | if adjusted also consider adjusting 'center_bridge_length'.
|
||||||
|
post_distance_apart = 15; // [0:500]
|
||||||
|
// "base pairs" length between "sugar phosphate backbones" | part of helix_base module | if adjusted also consider adjusting 'post_distance_apart'.
|
||||||
|
center_bridge_length = 24; // [0:500]
|
||||||
|
// part of helix_base module | thickness of "basepairs" in relevence to the the Y-axis of 'helix_base' before "linear_extrude" is implemented. further explanation is below.
|
||||||
|
center_bridge_width = .8; // [0:0.1:500]
|
||||||
|
// 'helix_height' adjusts the height of the linear_extruded 'helix_base' module | 'helix_height, helix_twists, helix_twists' all work hand in hand and should be experimented to fully understand the linear_extrude's nature.
|
||||||
|
helix_height = 120; // [0:500]
|
||||||
|
// 'helix_twists' adjusts the degree of twist in the linear_extruded 'helix_base' module.
|
||||||
|
helix_twists = 400; // [0:3600]
|
||||||
|
// 'helix_slices' adjusts the number of slices used in the linear_extruded 'helix_base' module | more slices = higher resolution and longer render times, less slices = the contrary | 200 is sufficient.
|
||||||
|
helix_slices = 600; // [0:500]
|
||||||
|
// this is fun try changing from 0-3 to scale 'helix_base' as it reaches its specified height in 'helix_height' | '1' = 1to1 scale, 0 = 1to0, 2 = 1to2 scale and so on in sequential order.
|
||||||
|
helix_scale = 1; // [0:10]
|
||||||
|
// the radius of the differenced circle that creates the spaces between each "base pair" | if adjusted you may also want to adjust 'center_bridge_length' and 'post_distance_apart'.
|
||||||
|
spacer_radius = 11.6; // [0:500]
|
||||||
|
// the height of the differenced circle changing this will result in a visual thickness change, in the Z-axis, of each "basepair".
|
||||||
|
spacer_height = 4; // [0:550]
|
||||||
|
// the point in the Z-axis at which the spacers will start appearing | 'spacer_start, spacer_increment_distance, and spacer_increment_height all work together to create the "base pairs/ bridges" that appear between each "sugar phosphate backbone/post".
|
||||||
|
spacer_start = 0; // [0:550]
|
||||||
|
// the distance between each spacer changing this will result in a visual thickness change, in the Z-axis, of each "basepair".
|
||||||
|
spacer_increment_distance = 6; // [0:500]
|
||||||
|
// the height to which the spacers ascend to and then stop being produced.
|
||||||
|
spacer_increment_height = helix_height; // [0:500]
|
||||||
|
// the radius of the circle where the standing platform is located at the base of the helix.
|
||||||
|
base_platform_radius = 30; // [0:500]
|
||||||
|
base_platform_inner_radius = 25;
|
||||||
|
// the height of the above said platform.
|
||||||
|
base_platform_height = 12; // [0:100]
|
||||||
|
// the controls the number of sides the platform has, 0 defaults to 'fn'. 3, 4, 5, 6 ...
|
||||||
|
base_platform_shape = 6; // [0:50]
|
||||||
|
|
||||||
|
usb_mount_hole_spacing = 15; // 19-(2*2) ?
|
||||||
|
usb_mount_hole_dia = 2.0; // ?
|
||||||
|
usb_height = 4.1;
|
||||||
|
usb_rectangular_width = 11+1; //presumeably this is 19-4-4 = 11 plus one for wiggle room. needs testing.
|
||||||
|
|
||||||
|
module helix_basic(){
|
||||||
|
translate([-post_distance_apart,0,0]){
|
||||||
|
difference(){
|
||||||
|
circle(post_radius,$fn = fn);
|
||||||
|
circle(post_hole_radius,$fn = fn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
translate([post_distance_apart,0,0]){
|
||||||
|
difference(){
|
||||||
|
circle(post_radius, $fn = fn);
|
||||||
|
circle(post_hole_radius, $fn = fn);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
square([center_bridge_length,center_bridge_width],center = true);
|
||||||
|
}
|
||||||
|
// the basic 2D shape that the helix is extruded upon.
|
||||||
|
union(){
|
||||||
|
difference(){
|
||||||
|
linear_extrude(height = helix_height, twist = helix_twists, slices = helix_slices, scale = helix_scale){
|
||||||
|
helix_basic();
|
||||||
|
}
|
||||||
|
for (a = [ spacer_start : spacer_increment_distance : spacer_increment_height])
|
||||||
|
translate([0, 0, a]) {
|
||||||
|
linear_extrude(height = spacer_height, center = true){
|
||||||
|
circle(spacer_radius, $fn = fn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
rotate([0,0,helix_twists+90+3*post_radius-0.5]){
|
||||||
|
translate([post_distance_apart,0,helix_height])scale([1,1,0.25])sphere(r = post_radius, $fn = fn);
|
||||||
|
translate([-post_distance_apart,0,helix_height])scale([1,1,0.25])sphere(r = post_radius, $fn = fn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
translate([0,0,-base_platform_height/2])difference(){
|
||||||
|
hull(){ // base
|
||||||
|
translate([0,0,base_platform_height/3])cylinder(r = base_platform_radius-(base_platform_height/2), h = base_platform_height/3, center = true, $fn = base_platform_shape);
|
||||||
|
translate([0,0,-base_platform_height/4])cylinder(r = base_platform_radius, h = base_platform_height/2, center = true, $fn = base_platform_shape);
|
||||||
|
}
|
||||||
|
translate([post_distance_apart,0,(base_platform_height/2)-(base_platform_height/4)])cylinder(r1 = post_hole_radius*2, r2 = post_hole_radius, h = base_platform_height/2+0.2, center = true, $fn = fn);
|
||||||
|
translate([-post_distance_apart,0,(base_platform_height/2)-(base_platform_height/4)])cylinder(r1 = post_hole_radius*2, r2 = post_hole_radius, h = base_platform_height/2+0.2, center = true, $fn = fn);
|
||||||
|
translate([0,0,-base_platform_height/2+0.01])cylinder(r = base_platform_inner_radius, h = base_platform_height, center = true, $fn = base_platform_shape);
|
||||||
|
translate([0,0,-base_platform_height/2+1-0.01])cylinder(r = base_platform_inner_radius+2, h = 2, center = true, $fn = base_platform_shape);
|
||||||
|
// todo: add cutout through base for filament-leds, because they don't reach to the bottom!
|
||||||
|
// usb-module:
|
||||||
|
translate([0,base_platform_radius*0.75,- base_platform_height/6])rotate([90,0,0])cube([usb_rectangular_width,usb_height,15],center=true); //cylinder(d = usb_height, h = 10, center = true, $fn = fn);
|
||||||
|
translate([usb_mount_hole_spacing/2,base_platform_radius*0.75,- base_platform_height/6])rotate([90,0,0])cylinder(d = usb_mount_hole_dia, h = 10, center = true, $fn = base_platform_shape);
|
||||||
|
translate([-usb_mount_hole_spacing/2,base_platform_radius*0.75,- base_platform_height/6])rotate([90,0,0])cylinder(d = usb_mount_hole_dia, h = 10, center = true, $fn = base_platform_shape);
|
||||||
|
}
|
||||||
|
// baseplate with pry-hole:
|
||||||
|
translate([0,0,-15])difference(){
|
||||||
|
translate([0,0,(-base_platform_height/2+1-0.01)])cylinder(r = base_platform_inner_radius+2, h = 2-0.2, center = true, $fn = base_platform_shape);
|
||||||
|
for (x = [ base_platform_radius*0.75 , -base_platform_radius*0.75 ])translate([0,x,(-base_platform_height/2+1-0.01)])cube([10,2,2+0.01], center=true);
|
||||||
|
}
|
||||||
@@ -0,0 +1,134 @@
|
|||||||
|
// number of fragments | a higher fragment count will result in slower render times '20' is sufficient.
|
||||||
|
fn = 30; // [0:100]
|
||||||
|
// "sugar phosphate backbones" | part of helix_base module | if adjusted also consider adjusting 'post_distance_apart' or 'center_bridge_length'.
|
||||||
|
post_radius = 5; // [0:500]
|
||||||
|
post_hole_radius = 1.75; // [0:500]
|
||||||
|
// part of helix_base module | if adjusted also consider adjusting 'center_bridge_length'.
|
||||||
|
post_distance_apart = 25; // [0:500]
|
||||||
|
// "base pairs" length between "sugar phosphate backbones" | part of helix_base module | if adjusted also consider adjusting 'post_distance_apart'.
|
||||||
|
center_bridge_length = 55; // [0:500]
|
||||||
|
// part of helix_base module | thickness of "basepairs" in relevence to the the Y-axis of 'helix_base' before "linear_extrude" is implemented. further explanation is below.
|
||||||
|
center_bridge_width = 1.6; // [0:0.1:500]
|
||||||
|
// 'helix_height' adjusts the height of the linear_extruded 'helix_base' module | 'helix_height, helix_twists, helix_twists' all work hand in hand and should be experimented to fully understand the linear_extrude's nature.
|
||||||
|
helix_height = 165; // [0:500]
|
||||||
|
// 'helix_twists' adjusts the degree of twist in the linear_extruded 'helix_base' module.
|
||||||
|
helix_twists = 400; // [0:3600]
|
||||||
|
// 'helix_slices' adjusts the number of slices used in the linear_extruded 'helix_base' module | more slices = higher resolution and longer render times, less slices = the contrary | 200 is sufficient.
|
||||||
|
helix_slices = 600; // [0:500]
|
||||||
|
// this is fun try changing from 0-3 to scale 'helix_base' as it reaches its specified height in 'helix_height' | '1' = 1to1 scale, 0 = 1to0, 2 = 1to2 scale and so on in sequential order.
|
||||||
|
helix_scale = 1; // [0:10]
|
||||||
|
// the radius of the differenced circle that creates the spaces between each "base pair" | if adjusted you may also want to adjust 'center_bridge_length' and 'post_distance_apart'.
|
||||||
|
spacer_radius = 20.25; // [0:500]
|
||||||
|
// the height of the differenced circle changing this will result in a visual thickness change, in the Z-axis, of each "basepair".
|
||||||
|
spacer_height = 6; // [0:550]
|
||||||
|
// the point in the Z-axis at which the spacers will start appearing | 'spacer_start, spacer_increment_distance, and spacer_increment_height all work together to create the "base pairs/ bridges" that appear between each "sugar phosphate backbone/post".
|
||||||
|
spacer_start = 0; // [0:550]
|
||||||
|
// the distance between each spacer changing this will result in a visual thickness change, in the Z-axis, of each "basepair".
|
||||||
|
spacer_increment_distance = 9; // [0:500]
|
||||||
|
// the height to which the spacers ascend to and then stop being produced.
|
||||||
|
spacer_increment_height = helix_height; // [0:500]
|
||||||
|
// the radius of the circle where the standing platform is located at the base of the helix.
|
||||||
|
base_platform_radius = 52.5; // [0:500]
|
||||||
|
base_platform_inner_radius = 47.5;
|
||||||
|
// the height of the above said platform.
|
||||||
|
base_platform_height = 20; // [0:100]
|
||||||
|
// the controls the number of sides the platform has, 0 defaults to 'fn'. 3, 4, 5, 6 ...
|
||||||
|
base_platform_shape = 6; // [0:50]
|
||||||
|
|
||||||
|
usb_mount_hole_spacing = 15; // 19-(2*2) ?
|
||||||
|
usb_mount_hole_dia = 2.0; // ?
|
||||||
|
usb_height = 4.1;
|
||||||
|
usb_rectangular_width = 11+1; //presumeably this is 19-4-4 = 11 plus one for wiggle room. needs testing.
|
||||||
|
text=true;
|
||||||
|
textdepth=2;
|
||||||
|
usb=false;
|
||||||
|
|
||||||
|
module logo(path,scale){
|
||||||
|
translate([0,0,0]){
|
||||||
|
scale([scale,scale,1]){
|
||||||
|
linear_extrude(textdepth){
|
||||||
|
import(path,center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module helix_basic(){
|
||||||
|
translate([-post_distance_apart,0,0]){
|
||||||
|
difference(){
|
||||||
|
circle(post_radius,$fn = fn);
|
||||||
|
if(usb){
|
||||||
|
circle(post_hole_radius,$fn = fn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
translate([post_distance_apart,0,0]){
|
||||||
|
difference(){
|
||||||
|
circle(post_radius, $fn = fn);
|
||||||
|
if(usb){
|
||||||
|
circle(post_hole_radius, $fn = fn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
square([center_bridge_length,center_bridge_width],center = true);
|
||||||
|
}
|
||||||
|
// the basic 2D shape that the helix is extruded upon.
|
||||||
|
union(){
|
||||||
|
difference(){
|
||||||
|
linear_extrude(height = helix_height, twist = helix_twists, slices = helix_slices, scale = helix_scale){
|
||||||
|
helix_basic();
|
||||||
|
}
|
||||||
|
for (a = [ spacer_start : spacer_increment_distance : spacer_increment_height])
|
||||||
|
translate([0, 0, a]) {
|
||||||
|
linear_extrude(height = spacer_height, center = true){
|
||||||
|
circle(spacer_radius, $fn = fn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// elipsoids on top to cover up the led-holes:
|
||||||
|
rotate([0,0,helix_twists+90+2.1*post_radius-0.5]){
|
||||||
|
translate([post_distance_apart,0,helix_height])scale([1,1,0.25])sphere(r = post_radius, $fn = fn);
|
||||||
|
translate([-post_distance_apart,0,helix_height])scale([1,1,0.25])sphere(r = post_radius, $fn = fn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
translate([0,0,-base_platform_height/2])difference(){
|
||||||
|
hull(){ // base
|
||||||
|
translate([0,0,base_platform_height/3])cylinder(r = base_platform_radius-(base_platform_height/2), h = base_platform_height/3, center = true, $fn = base_platform_shape);
|
||||||
|
translate([0,0,-base_platform_height/4])cylinder(r = base_platform_radius, h = base_platform_height/2, center = true, $fn = base_platform_shape);
|
||||||
|
}
|
||||||
|
if(usb){
|
||||||
|
translate([post_distance_apart,0,(base_platform_height/2)-(base_platform_height/4)])cylinder(r1 = post_hole_radius*2, r2 = post_hole_radius, h = base_platform_height/2+0.2, center = true, $fn = fn);
|
||||||
|
translate([-post_distance_apart,0,(base_platform_height/2)-(base_platform_height/4)])cylinder(r1 = post_hole_radius*2, r2 = post_hole_radius, h = base_platform_height/2+0.2, center = true, $fn = fn);
|
||||||
|
|
||||||
|
//bottom cutout narrow:
|
||||||
|
translate([0,0,-base_platform_height/2+0.01])cylinder(r = base_platform_inner_radius, h = base_platform_height, center = true, $fn = base_platform_shape);
|
||||||
|
//bottom cutout wide:
|
||||||
|
translate([0,0,-base_platform_height/2+1-0.01])cylinder(r = base_platform_inner_radius+2, h = 2, center = true, $fn = base_platform_shape);
|
||||||
|
// only draw usb-module-cutouts if desired:
|
||||||
|
|
||||||
|
// usb-module:
|
||||||
|
translate([0,base_platform_radius*0.75,- base_platform_height/6])rotate([90,0,0])cube([usb_rectangular_width,usb_height,15],center=true); //cylinder(d = usb_height, h = 10, center = true, $fn = fn);
|
||||||
|
// usb-screw-holes:
|
||||||
|
translate([usb_mount_hole_spacing/2,base_platform_radius*0.75,- base_platform_height/6])rotate([90,0,0])cylinder(d = usb_mount_hole_dia, h = 15, center = true, $fn = base_platform_shape);
|
||||||
|
translate([-usb_mount_hole_spacing/2,base_platform_radius*0.75,- base_platform_height/6])rotate([90,0,0])cylinder(d = usb_mount_hole_dia, h = 15, center = true, $fn = base_platform_shape);
|
||||||
|
}
|
||||||
|
if(text){
|
||||||
|
rotate([49,0,0]){
|
||||||
|
translate([0,-23.25,32.35]){
|
||||||
|
#logo("haystack_logo_final.svg",0.2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// baseplate with pry-hole:
|
||||||
|
if(usb){
|
||||||
|
translate([0,0,-15]){
|
||||||
|
difference(){
|
||||||
|
translate([0,0,(-base_platform_height/2+1-0.01)])cylinder(r = base_platform_inner_radius+2, h = 2-0.2, center = true, $fn = base_platform_shape);
|
||||||
|
for (x = [ base_platform_radius*0.80 , -base_platform_radius*0.80 ])translate([0,x,(-base_platform_height/2+1-0.01)])cube([10,2,2+0.01], center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -3,23 +3,23 @@
|
|||||||
h=3; //height
|
h=3; //height
|
||||||
w=20; //width
|
w=20; //width
|
||||||
l=75; //lenght
|
l=75; //lenght
|
||||||
hd=7.5; //hole_dia
|
hd=w/2.25; //hole_dia
|
||||||
emd=1.25; // embossing depth
|
emd=1.25; // embossing depth
|
||||||
|
q=0.01; // minimal value to avoid visual glitches
|
||||||
$fn=100; //resolution
|
$fn=100; //resolution
|
||||||
// ###############
|
// ###############
|
||||||
difference(){
|
difference(){
|
||||||
translate([0,0,h/2*1]){
|
translate([0,0,h/2]){
|
||||||
hull(){
|
hull(){
|
||||||
translate([+(l-w)/2,0,0])cylinder(h=h,r=w/2,center=true,$fn=100);
|
for(x=[(l-w)/2,-(l-w)/2]){
|
||||||
translate([-(l-w)/2,0,0])cylinder(h=h,r=w/2,center=true,$fn=100);
|
translate([x,0,0])cylinder(h=h,r=w/2,center=true); // body
|
||||||
}
|
}}}
|
||||||
|
translate([-(l/2)+(w/3),0,h/2]){
|
||||||
|
cylinder(h=h+q,r=hd/2,center=true); // keychain-hole
|
||||||
}
|
}
|
||||||
translate([w/4,0,h-emd]){
|
translate([w/4,0,h-emd]){
|
||||||
scale([0.3,0.3,1]){
|
scale([0.4,0.4,1]){
|
||||||
linear_extrude(height = h){
|
linear_extrude(height = emd+q){
|
||||||
import("src/GONICUS-Logo_2022_logo-only.svg",center=true);
|
import("src/GONICUS-Logo_2022_logo-only-new.svg",center=true); // logo
|
||||||
}
|
}}}
|
||||||
}
|
|
||||||
}
|
|
||||||
translate([-(l/2)+(w/3),0,h/2])cylinder(h=h+0.1,r=hd/2,center=true);
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,158 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="143.12636mm"
|
||||||
|
height="25.433369mm"
|
||||||
|
viewBox="0 0 143.12636 25.433369"
|
||||||
|
version="1.1"
|
||||||
|
id="svg1"
|
||||||
|
inkscape:version="1.4.2 (ebf0e940d0, 2025-05-08)"
|
||||||
|
sodipodi:docname="GONICUS-Logo_2022_logo-only-new.svg"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="namedview1"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#000000"
|
||||||
|
borderopacity="0.25"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
inkscape:zoom="1.036062"
|
||||||
|
inkscape:cx="377.87314"
|
||||||
|
inkscape:cy="63.220154"
|
||||||
|
inkscape:window-width="5120"
|
||||||
|
inkscape:window-height="1372"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="layer1" />
|
||||||
|
<defs
|
||||||
|
id="defs1">
|
||||||
|
<clipPath
|
||||||
|
id="SVGID_2_">
|
||||||
|
<rect
|
||||||
|
id="use9"
|
||||||
|
x="148"
|
||||||
|
y="229.71001"
|
||||||
|
width="540.95001"
|
||||||
|
height="136.57001" />
|
||||||
|
|
||||||
|
</clipPath>
|
||||||
|
<clipPath
|
||||||
|
id="clipPath1">
|
||||||
|
<rect
|
||||||
|
id="use1"
|
||||||
|
x="148"
|
||||||
|
y="229.71001"
|
||||||
|
width="540.95001"
|
||||||
|
height="136.57001" />
|
||||||
|
|
||||||
|
</clipPath>
|
||||||
|
<clipPath
|
||||||
|
id="clipPath2">
|
||||||
|
<rect
|
||||||
|
id="use2"
|
||||||
|
x="148"
|
||||||
|
y="229.71001"
|
||||||
|
width="540.95001"
|
||||||
|
height="136.57001" />
|
||||||
|
|
||||||
|
</clipPath>
|
||||||
|
<clipPath
|
||||||
|
id="clipPath3">
|
||||||
|
<rect
|
||||||
|
id="use3"
|
||||||
|
x="148"
|
||||||
|
y="229.71001"
|
||||||
|
width="540.95001"
|
||||||
|
height="136.57001" />
|
||||||
|
|
||||||
|
</clipPath>
|
||||||
|
<clipPath
|
||||||
|
id="clipPath4">
|
||||||
|
<rect
|
||||||
|
id="use4"
|
||||||
|
x="148"
|
||||||
|
y="229.71001"
|
||||||
|
width="540.95001"
|
||||||
|
height="136.57001" />
|
||||||
|
|
||||||
|
</clipPath>
|
||||||
|
<clipPath
|
||||||
|
id="clipPath5">
|
||||||
|
<rect
|
||||||
|
id="use5"
|
||||||
|
x="148"
|
||||||
|
y="229.71001"
|
||||||
|
width="540.95001"
|
||||||
|
height="136.57001" />
|
||||||
|
|
||||||
|
</clipPath>
|
||||||
|
</defs>
|
||||||
|
<g
|
||||||
|
inkscape:label="Ebene 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(-5.0263979,-131.7625)">
|
||||||
|
<g
|
||||||
|
id="g2-1"
|
||||||
|
transform="matrix(0.26458333,0,0,0.26458333,4.9386488,131.58535)"
|
||||||
|
inkscape:highlight-color="#aaaaaa">
|
||||||
|
<path
|
||||||
|
class="st0"
|
||||||
|
d="m 415.1,265.77 -10.5,58.68 h 26.88 l 10.5,-58.68 z m 6.45,-36.06 -4.13,23.06 h 26.87 l 4.13,-23.06 z"
|
||||||
|
id="path4-8"
|
||||||
|
style="display:inline;fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1"
|
||||||
|
transform="translate(-147.66835,-228.54044)" />
|
||||||
|
<path
|
||||||
|
style="display:inline;fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1"
|
||||||
|
id="path12-7"
|
||||||
|
clip-path="url(#SVGID_2_)"
|
||||||
|
d="m 316.76,324.45 17.09,-94.74 h 48.44 c 0,0 8.38,0.03 13.97,4.53 5.59,4.5 7.09,10.56 7.56,13.88 0.47,3.31 0.53,7.13 -0.63,13.56 -1.16,6.44 -11.31,62.78 -11.31,62.78 h -26.81 l 11.56,-64.41 c 0,0 2.03,-7.16 -6.41,-7.22 -8.44,-0.06 -13.69,-0.06 -13.69,-0.06 l -12.88,71.69 h -26.89 z"
|
||||||
|
class="st1"
|
||||||
|
transform="translate(-147.66835,-228.54044)" />
|
||||||
|
<path
|
||||||
|
style="display:inline;fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1"
|
||||||
|
id="path14-9"
|
||||||
|
clip-path="url(#SVGID_2_)"
|
||||||
|
d="m 622.67,229.71 -17.09,94.74 h -48.44 c 0,0 -8.16,-0.31 -13.97,-4.53 -5.85,-4.26 -7.41,-9.26 -7.88,-12.57 -0.47,-3.31 -0.22,-8.43 0.94,-14.87 1.16,-6.44 11.31,-62.78 11.31,-62.78 h 26.81 l -11.56,64.41 c 0,0 -1.04,7.12 6.41,7.22 8.44,0.11 13.69,0.06 13.69,0.06 l 12.88,-71.69 h 26.9 z"
|
||||||
|
class="st1"
|
||||||
|
transform="translate(-147.66835,-228.54044)" />
|
||||||
|
<path
|
||||||
|
style="display:inline;fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1"
|
||||||
|
id="path16-2"
|
||||||
|
clip-path="url(#SVGID_2_)"
|
||||||
|
d="m 637.22,229.71 h 26.94 c 0,0 -4.98,6.61 0.88,15.46 0,0 17.58,28.39 19.41,31.26 8.35,13.12 4.81,29.5 -8.09,38.49 -8.31,5.79 -15.69,8.75 -30.65,9.73 -7.79,0.51 -31.42,-0.2 -31.42,-0.2 l 4.19,-23.16 c 0,0 20.67,-0.04 22.98,-0.17 7.54,-0.42 12.41,-2.54 14.94,-7.95 2.51,-5.38 -1.07,-11.46 -4.07,-15.71 0,0 -15.42,-23.59 -16.17,-24.98 -0.75,-1.39 -3.92,-5.98 -2.92,-12.56 0.95,-6.23 3.98,-10.21 3.98,-10.21"
|
||||||
|
class="st1"
|
||||||
|
transform="translate(-147.66835,-228.54044)" />
|
||||||
|
<path
|
||||||
|
style="display:inline;fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1"
|
||||||
|
id="path18-0"
|
||||||
|
clip-path="url(#SVGID_2_)"
|
||||||
|
d="m 203.5,260.25 c 0,0 2.03,-7.16 -6.41,-7.22 -4.3,-0.03 -7.77,-0.04 -10.15,-0.05 -3.71,0 -4.06,3.56 -4.06,3.56 l -6.78,37.77 c 0,0 -1.04,7.12 6.41,7.22 4.18,0.06 7.59,0.08 9.95,0.08 3.71,0 4.11,-2.82 4.23,-3.47 0.12,-0.66 0.88,-4.88 0.88,-4.88 h -13.15 l 3.14,-18.67 h 13.36 -0.09 26.84 c -1.51,8.37 -3.38,19.27 -5.11,28.85 -3.27,16.35 -15.77,21.21 -26.93,21.21 h -25.18 c 0,0 -8.17,-0.3 -13.97,-4.52 -5.86,-4.26 -7.41,-9.26 -7.88,-12.57 -0.47,-3.31 -0.22,-8.43 0.94,-14.87 0.74,-4.12 4.26,-23.66 7.35,-40.81 3.07,-14.14 12.46,-21.97 28.77,-21.97 h 23.49 c 0,0 8.37,0.02 13.97,4.52 5.59,4.5 7.09,10.57 7.56,13.88 0.45,3.23 0.53,6.93 -0.54,13.08 H 203.3 Z"
|
||||||
|
class="st1"
|
||||||
|
transform="translate(-147.66835,-228.54044)"
|
||||||
|
sodipodi:nodetypes="ccccccsccccccccsccsccscccccc" />
|
||||||
|
<path
|
||||||
|
style="display:inline;fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1"
|
||||||
|
id="path20-2"
|
||||||
|
clip-path="url(#SVGID_2_)"
|
||||||
|
d="m 289.97,260.2 -2.58,14.39 c 0,0 -4.14,23.11 -4.22,23.55 -0.12,0.66 -0.52,3.47 -4.23,3.47 -2.36,0 -5.77,-0.02 -9.95,-0.08 -7.45,-0.1 -6.41,-7.22 -6.41,-7.22 l 6.78,-37.77 c 0,0 0.35,-3.56 4.05,-3.56 2.38,0.01 5.85,0.02 10.15,0.05 8.03,0.06 6.41,7.17 6.41,7.17 m 27.19,-11.89 c -0.47,-3.31 -1.97,-9.38 -7.56,-13.88 -5.6,-4.5 -13.97,-4.52 -13.97,-4.52 h -23.49 c -16.31,0 -25.7,7.83 -28.77,21.97 -3.09,17.15 -6.61,36.69 -7.35,40.81 -1.16,6.44 -1.41,11.56 -0.94,14.87 0.47,3.31 2.02,8.31 7.88,12.57 5.8,4.22 13.97,4.52 13.97,4.52 h 25.18 c 11.17,0 23.67,-4.85 26.93,-21.21 1.24,-6.85 2.54,-14.37 3.74,-21.15 l 4.03,-22.09 c 0.87,-5.45 0.77,-8.87 0.35,-11.89"
|
||||||
|
class="st1"
|
||||||
|
transform="translate(-147.66835,-228.54044)" />
|
||||||
|
<path
|
||||||
|
style="display:inline;fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1"
|
||||||
|
id="path22-3"
|
||||||
|
clip-path="url(#SVGID_2_)"
|
||||||
|
d="m 498.56,287.81 c -0.93,5.18 -1.78,9.94 -1.82,10.14 -0.12,0.66 -0.52,3.47 -4.23,3.47 -2.36,0 -5.77,-0.02 -9.95,-0.08 -7.45,-0.1 -6.41,-7.22 -6.41,-7.22 l 6.78,-37.77 c 0,0 0.35,-3.56 4.05,-3.56 2.38,0.01 5.85,0.02 10.15,0.05 8.03,0.06 6.41,7.17 6.41,7.17 l -1.14,6.36 h 26.82 l 1.16,-6.36 c 0.87,-5.45 0.77,-8.87 0.35,-11.89 -0.47,-3.31 -1.97,-9.38 -7.56,-13.88 -5.6,-4.5 -13.97,-4.52 -13.97,-4.52 h -23.49 c -16.31,0 -25.7,7.83 -28.77,21.97 -3.09,17.15 -6.61,36.69 -7.35,40.81 -1.16,6.44 -1.41,11.56 -0.94,14.87 0.47,3.31 2.02,8.31 7.88,12.57 5.8,4.22 13.97,4.52 13.97,4.52 h 25.18 c 11.17,0 23.67,-4.85 26.93,-21.21 0.9,-4.97 1.83,-10.29 2.73,-15.43 h -26.78 z"
|
||||||
|
class="st1"
|
||||||
|
transform="translate(-147.66835,-228.54044)" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 7.0 KiB |
@@ -1,21 +1,42 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<svg
|
<svg
|
||||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
||||||
xmlns:cc="http://creativecommons.org/ns#"
|
|
||||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
||||||
xml:space="preserve"
|
xml:space="preserve"
|
||||||
style="enable-background:new 0 0 841.89 595.28;"
|
style="enable-background:new 0 0 841.89 595.28;"
|
||||||
viewBox="0 0 841.89 595.28"
|
viewBox="0 0 841.89 595.28"
|
||||||
y="0px"
|
y="0px"
|
||||||
x="0px"
|
x="0px"
|
||||||
id="Ebene_1"
|
id="Ebene_1"
|
||||||
version="1.1"><metadata
|
version="1.1"
|
||||||
|
sodipodi:docname="GONICUS-Logo_2022_logo-only.svg"
|
||||||
|
inkscape:version="1.4.2 (ebf0e940d0, 2025-05-08)"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"><sodipodi:namedview
|
||||||
|
id="namedview1"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#000000"
|
||||||
|
borderopacity="0.25"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
inkscape:zoom="1.9537024"
|
||||||
|
inkscape:cx="420.99555"
|
||||||
|
inkscape:cy="297.64001"
|
||||||
|
inkscape:window-width="5120"
|
||||||
|
inkscape:window-height="1372"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="Ebene_1" /><metadata
|
||||||
id="metadata33"><rdf:RDF><cc:Work
|
id="metadata33"><rdf:RDF><cc:Work
|
||||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
|
||||||
id="defs31">
|
id="defs31">
|
||||||
<defs
|
<defs
|
||||||
id="defs7">
|
id="defs7">
|
||||||
@@ -49,36 +70,38 @@
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<g
|
<g
|
||||||
id="g861"><path
|
id="g861"
|
||||||
|
style="fill:#000000"><path
|
||||||
class="st0"
|
class="st0"
|
||||||
d="M415.1,265.77l-10.5,58.68h26.88l10.5-58.68H415.1z M421.55,229.71l-4.13,23.06h26.87l4.13-23.06H421.55z"
|
d="M415.1,265.77l-10.5,58.68h26.88l10.5-58.68H415.1z M421.55,229.71l-4.13,23.06h26.87l4.13-23.06H421.55z"
|
||||||
id="path4" /><path
|
id="path4"
|
||||||
style="fill:#213a8f"
|
style="fill:#000000" /><path
|
||||||
|
style="fill:#000000"
|
||||||
id="path12"
|
id="path12"
|
||||||
clip-path="url(#SVGID_2_)"
|
clip-path="url(#SVGID_2_)"
|
||||||
d="m 316.76,324.45 17.09,-94.74 h 48.44 c 0,0 8.38,0.03 13.97,4.53 5.59,4.5 7.09,10.56 7.56,13.88 0.47,3.31 0.53,7.13 -0.63,13.56 -1.16,6.44 -11.31,62.78 -11.31,62.78 h -26.81 l 11.56,-64.41 c 0,0 2.03,-7.16 -6.41,-7.22 -8.44,-0.06 -13.69,-0.06 -13.69,-0.06 l -12.88,71.69 h -26.89 z"
|
d="m 316.76,324.45 17.09,-94.74 h 48.44 c 0,0 8.38,0.03 13.97,4.53 5.59,4.5 7.09,10.56 7.56,13.88 0.47,3.31 0.53,7.13 -0.63,13.56 -1.16,6.44 -11.31,62.78 -11.31,62.78 h -26.81 l 11.56,-64.41 c 0,0 2.03,-7.16 -6.41,-7.22 -8.44,-0.06 -13.69,-0.06 -13.69,-0.06 l -12.88,71.69 h -26.89 z"
|
||||||
class="st1" /><path
|
class="st1" /><path
|
||||||
style="fill:#213a8f"
|
style="fill:#000000"
|
||||||
id="path14"
|
id="path14"
|
||||||
clip-path="url(#SVGID_2_)"
|
clip-path="url(#SVGID_2_)"
|
||||||
d="m 622.67,229.71 -17.09,94.74 h -48.44 c 0,0 -8.16,-0.31 -13.97,-4.53 -5.85,-4.26 -7.41,-9.26 -7.88,-12.57 -0.47,-3.31 -0.22,-8.43 0.94,-14.87 1.16,-6.44 11.31,-62.78 11.31,-62.78 h 26.81 l -11.56,64.41 c 0,0 -1.04,7.12 6.41,7.22 8.44,0.11 13.69,0.06 13.69,0.06 l 12.88,-71.69 h 26.9 z"
|
d="m 622.67,229.71 -17.09,94.74 h -48.44 c 0,0 -8.16,-0.31 -13.97,-4.53 -5.85,-4.26 -7.41,-9.26 -7.88,-12.57 -0.47,-3.31 -0.22,-8.43 0.94,-14.87 1.16,-6.44 11.31,-62.78 11.31,-62.78 h 26.81 l -11.56,64.41 c 0,0 -1.04,7.12 6.41,7.22 8.44,0.11 13.69,0.06 13.69,0.06 l 12.88,-71.69 h 26.9 z"
|
||||||
class="st1" /><path
|
class="st1" /><path
|
||||||
style="fill:#213a8f"
|
style="fill:#000000"
|
||||||
id="path16"
|
id="path16"
|
||||||
clip-path="url(#SVGID_2_)"
|
clip-path="url(#SVGID_2_)"
|
||||||
d="m 637.22,229.71 h 26.94 c 0,0 -4.98,6.61 0.88,15.46 0,0 17.58,28.39 19.41,31.26 8.35,13.12 4.81,29.5 -8.09,38.49 -8.31,5.79 -15.69,8.75 -30.65,9.73 -7.79,0.51 -31.42,-0.2 -31.42,-0.2 l 4.19,-23.16 c 0,0 20.67,-0.04 22.98,-0.17 7.54,-0.42 12.41,-2.54 14.94,-7.95 2.51,-5.38 -1.07,-11.46 -4.07,-15.71 0,0 -15.42,-23.59 -16.17,-24.98 -0.75,-1.39 -3.92,-5.98 -2.92,-12.56 0.95,-6.23 3.98,-10.21 3.98,-10.21"
|
d="m 637.22,229.71 h 26.94 c 0,0 -4.98,6.61 0.88,15.46 0,0 17.58,28.39 19.41,31.26 8.35,13.12 4.81,29.5 -8.09,38.49 -8.31,5.79 -15.69,8.75 -30.65,9.73 -7.79,0.51 -31.42,-0.2 -31.42,-0.2 l 4.19,-23.16 c 0,0 20.67,-0.04 22.98,-0.17 7.54,-0.42 12.41,-2.54 14.94,-7.95 2.51,-5.38 -1.07,-11.46 -4.07,-15.71 0,0 -15.42,-23.59 -16.17,-24.98 -0.75,-1.39 -3.92,-5.98 -2.92,-12.56 0.95,-6.23 3.98,-10.21 3.98,-10.21"
|
||||||
class="st1" /><path
|
class="st1" /><path
|
||||||
style="fill:#213a8f"
|
style="fill:#000000"
|
||||||
id="path18"
|
id="path18"
|
||||||
clip-path="url(#SVGID_2_)"
|
clip-path="url(#SVGID_2_)"
|
||||||
d="m 203.5,260.25 c 0,0 2.03,-7.16 -6.41,-7.22 -4.3,-0.03 -7.77,-0.04 -10.15,-0.05 -3.71,0 -4.06,3.56 -4.06,3.56 l -6.78,37.77 c 0,0 -1.04,7.12 6.41,7.22 4.18,0.06 7.59,0.08 9.95,0.08 3.71,0 4.11,-2.82 4.23,-3.47 0.12,-0.66 0.88,-4.88 0.88,-4.88 h -13.15 l 3.14,-18.67 h 13.36 -0.09 26.84 c -1.51,8.37 -3.38,19.27 -5.11,28.85 -3.27,16.35 -15.77,21.21 -26.93,21.21 h -25.18 c 0,0 -8.17,-0.3 -13.97,-4.52 -5.86,-4.26 -7.41,-9.26 -7.88,-12.57 -0.47,-3.31 -0.22,-8.43 0.94,-14.87 0.74,-4.12 4.26,-23.66 7.35,-40.81 3.07,-14.14 12.46,-21.97 28.77,-21.97 h 23.49 c 0,0 8.37,0.02 13.97,4.52 5.59,4.5 7.09,10.57 7.56,13.88 0.45,3.23 0.53,6.93 -0.54,13.08 H 203.3 Z"
|
d="m 203.5,260.25 c 0,0 2.03,-7.16 -6.41,-7.22 -4.3,-0.03 -7.77,-0.04 -10.15,-0.05 -3.71,0 -4.06,3.56 -4.06,3.56 l -6.78,37.77 c 0,0 -1.04,7.12 6.41,7.22 4.18,0.06 7.59,0.08 9.95,0.08 3.71,0 4.11,-2.82 4.23,-3.47 0.12,-0.66 0.88,-4.88 0.88,-4.88 h -13.15 l 3.14,-18.67 h 13.36 -0.09 26.84 c -1.51,8.37 -3.38,19.27 -5.11,28.85 -3.27,16.35 -15.77,21.21 -26.93,21.21 h -25.18 c 0,0 -8.17,-0.3 -13.97,-4.52 -5.86,-4.26 -7.41,-9.26 -7.88,-12.57 -0.47,-3.31 -0.22,-8.43 0.94,-14.87 0.74,-4.12 4.26,-23.66 7.35,-40.81 3.07,-14.14 12.46,-21.97 28.77,-21.97 h 23.49 c 0,0 8.37,0.02 13.97,4.52 5.59,4.5 7.09,10.57 7.56,13.88 0.45,3.23 0.53,6.93 -0.54,13.08 H 203.3 Z"
|
||||||
class="st1" /><path
|
class="st1" /><path
|
||||||
style="fill:#213a8f"
|
style="fill:#000000"
|
||||||
id="path20"
|
id="path20"
|
||||||
clip-path="url(#SVGID_2_)"
|
clip-path="url(#SVGID_2_)"
|
||||||
d="m 289.97,260.2 -2.58,14.39 c 0,0 -4.14,23.11 -4.22,23.55 -0.12,0.66 -0.52,3.47 -4.23,3.47 -2.36,0 -5.77,-0.02 -9.95,-0.08 -7.45,-0.1 -6.41,-7.22 -6.41,-7.22 l 6.78,-37.77 c 0,0 0.35,-3.56 4.05,-3.56 2.38,0.01 5.85,0.02 10.15,0.05 8.03,0.06 6.41,7.17 6.41,7.17 m 27.19,-11.89 c -0.47,-3.31 -1.97,-9.38 -7.56,-13.88 -5.6,-4.5 -13.97,-4.52 -13.97,-4.52 h -23.49 c -16.31,0 -25.7,7.83 -28.77,21.97 -3.09,17.15 -6.61,36.69 -7.35,40.81 -1.16,6.44 -1.41,11.56 -0.94,14.87 0.47,3.31 2.02,8.31 7.88,12.57 5.8,4.22 13.97,4.52 13.97,4.52 h 25.18 c 11.17,0 23.67,-4.85 26.93,-21.21 1.24,-6.85 2.54,-14.37 3.74,-21.15 l 4.03,-22.09 c 0.87,-5.45 0.77,-8.87 0.35,-11.89"
|
d="m 289.97,260.2 -2.58,14.39 c 0,0 -4.14,23.11 -4.22,23.55 -0.12,0.66 -0.52,3.47 -4.23,3.47 -2.36,0 -5.77,-0.02 -9.95,-0.08 -7.45,-0.1 -6.41,-7.22 -6.41,-7.22 l 6.78,-37.77 c 0,0 0.35,-3.56 4.05,-3.56 2.38,0.01 5.85,0.02 10.15,0.05 8.03,0.06 6.41,7.17 6.41,7.17 m 27.19,-11.89 c -0.47,-3.31 -1.97,-9.38 -7.56,-13.88 -5.6,-4.5 -13.97,-4.52 -13.97,-4.52 h -23.49 c -16.31,0 -25.7,7.83 -28.77,21.97 -3.09,17.15 -6.61,36.69 -7.35,40.81 -1.16,6.44 -1.41,11.56 -0.94,14.87 0.47,3.31 2.02,8.31 7.88,12.57 5.8,4.22 13.97,4.52 13.97,4.52 h 25.18 c 11.17,0 23.67,-4.85 26.93,-21.21 1.24,-6.85 2.54,-14.37 3.74,-21.15 l 4.03,-22.09 c 0.87,-5.45 0.77,-8.87 0.35,-11.89"
|
||||||
class="st1" /><path
|
class="st1" /><path
|
||||||
style="fill:#213a8f"
|
style="fill:#000000"
|
||||||
id="path22"
|
id="path22"
|
||||||
clip-path="url(#SVGID_2_)"
|
clip-path="url(#SVGID_2_)"
|
||||||
d="m 498.56,287.81 c -0.93,5.18 -1.78,9.94 -1.82,10.14 -0.12,0.66 -0.52,3.47 -4.23,3.47 -2.36,0 -5.77,-0.02 -9.95,-0.08 -7.45,-0.1 -6.41,-7.22 -6.41,-7.22 l 6.78,-37.77 c 0,0 0.35,-3.56 4.05,-3.56 2.38,0.01 5.85,0.02 10.15,0.05 8.03,0.06 6.41,7.17 6.41,7.17 l -1.14,6.36 h 26.82 l 1.16,-6.36 c 0.87,-5.45 0.77,-8.87 0.35,-11.89 -0.47,-3.31 -1.97,-9.38 -7.56,-13.88 -5.6,-4.5 -13.97,-4.52 -13.97,-4.52 h -23.49 c -16.31,0 -25.7,7.83 -28.77,21.97 -3.09,17.15 -6.61,36.69 -7.35,40.81 -1.16,6.44 -1.41,11.56 -0.94,14.87 0.47,3.31 2.02,8.31 7.88,12.57 5.8,4.22 13.97,4.52 13.97,4.52 h 25.18 c 11.17,0 23.67,-4.85 26.93,-21.21 0.9,-4.97 1.83,-10.29 2.73,-15.43 h -26.78 z"
|
d="m 498.56,287.81 c -0.93,5.18 -1.78,9.94 -1.82,10.14 -0.12,0.66 -0.52,3.47 -4.23,3.47 -2.36,0 -5.77,-0.02 -9.95,-0.08 -7.45,-0.1 -6.41,-7.22 -6.41,-7.22 l 6.78,-37.77 c 0,0 0.35,-3.56 4.05,-3.56 2.38,0.01 5.85,0.02 10.15,0.05 8.03,0.06 6.41,7.17 6.41,7.17 l -1.14,6.36 h 26.82 l 1.16,-6.36 c 0.87,-5.45 0.77,-8.87 0.35,-11.89 -0.47,-3.31 -1.97,-9.38 -7.56,-13.88 -5.6,-4.5 -13.97,-4.52 -13.97,-4.52 h -23.49 c -16.31,0 -25.7,7.83 -28.77,21.97 -3.09,17.15 -6.61,36.69 -7.35,40.81 -1.16,6.44 -1.41,11.56 -0.94,14.87 0.47,3.31 2.02,8.31 7.88,12.57 5.8,4.22 13.97,4.52 13.97,4.52 h 25.18 c 11.17,0 23.67,-4.85 26.93,-21.21 0.9,-4.97 1.83,-10.29 2.73,-15.43 h -26.78 z"
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 5.6 KiB |
BIN
openscad/own/gpu-antisag/IMG/gpu-antisag.png
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
openscad/own/gpu-antisag/STL/gpu-antisag.stl
Normal file
55
openscad/own/gpu-antisag/gpu-antisag.scad
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
// by zeus - zeus@ctdo.de - CC-BY-NC-4.00
|
||||||
|
// -> https://www.thingiverse.com/zeus
|
||||||
|
// -> https://www.printables.com/social/366928-zeus/about
|
||||||
|
// -> https://github.com/zeus86
|
||||||
|
// -> https://blog.tastatursport.de/
|
||||||
|
// 2023-03-28
|
||||||
|
// GPU-antisag-adapter for Lian Li O11D Evo with vertical GPU Kit and 25mm Bottom-Fans (default orientation)
|
||||||
|
//##################
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//##################
|
||||||
|
//
|
||||||
|
// VARS
|
||||||
|
mt=5; // general material thickness
|
||||||
|
cen_w=8; // center bar
|
||||||
|
cen_h=mt; // center bar
|
||||||
|
cen_elev=24; // total center elevation
|
||||||
|
depth=110; // 110 for 120mm fans
|
||||||
|
tri_w=40; // triangular plate
|
||||||
|
tri_x=tri_w/sqrt(2);// nominal side-length of the square-section, the triangular shape is made of
|
||||||
|
tri_h=mt; // triangular plate
|
||||||
|
$fn=100; // general resolution
|
||||||
|
q=0.01; // used to avoid graphical glitches
|
||||||
|
hds=15; // short hole-distance
|
||||||
|
hdl=105; // long hole distance
|
||||||
|
holedia=5; // diameter of the hole for the screw//
|
||||||
|
hole_dist=holedia-0.66; // distance from edge
|
||||||
|
//##################
|
||||||
|
//
|
||||||
|
// MODEL
|
||||||
|
module triangle(){
|
||||||
|
difference(){
|
||||||
|
rotate([0,0,45])cube([tri_x,tri_x,mt],center=true);
|
||||||
|
translate([0,-tri_w/2,0])cube([tri_w,tri_w,5+q],center=true);
|
||||||
|
for (x=[hds/2,-hds/2]){
|
||||||
|
translate([x,hole_dist,0]){
|
||||||
|
cylinder(r=holedia/2,h=mt+q,center=true);
|
||||||
|
translate([0,0,holedia*0.3])cylinder(r1=holedia/2,r2=holedia,h=mt+q,center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
module cen(){
|
||||||
|
hull(){
|
||||||
|
cube([cen_w,hdl-(hole_dist*1.5)-q,cen_h],center=true);
|
||||||
|
translate([0,0,cen_elev-mt])cube([cen_w,hdl/2,cen_h],center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
translate([0,0,mt/2]){
|
||||||
|
triangle();
|
||||||
|
translate([0,hdl/2+hole_dist,0])cen();
|
||||||
|
translate([0,hdl+hole_dist*2,0])rotate([0,0,180])triangle();
|
||||||
|
}
|
||||||
@@ -36,10 +36,10 @@ module panel(){
|
|||||||
translate([0,0,-q])cylinder(d=magnet_dia,h=magnet_h);
|
translate([0,0,-q])cylinder(d=magnet_dia,h=magnet_h);
|
||||||
}
|
}
|
||||||
if (magnet_count>1){
|
if (magnet_count>1){
|
||||||
for (m=[1:360/magnet_count:359]){
|
for (m=[0:360/magnet_count:360]){
|
||||||
rotate([0,0,m]){
|
rotate([0,0,m]){
|
||||||
translate([panel_dia/4,0,-q]){
|
translate([panel_dia/4,0,-q]){
|
||||||
cylinder(d=magnet_dia,h=magnet_h);
|
#cylinder(d=magnet_dia,h=magnet_h);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
133
openscad/own/kitt-matrix/src/kitt-matrix.scad
Normal file
@@ -0,0 +1,133 @@
|
|||||||
|
/*
|
||||||
|
Case for LED-Matrix of the KITT-Voice-Assistant
|
||||||
|
by zeus - 2024-08-17 - CC-BY-SA-NC-4.0
|
||||||
|
https://git.kostianix.de/zeus/3d-stuff/src/branch/main/openscad/own/kitt-matrix
|
||||||
|
*/
|
||||||
|
|
||||||
|
// ##########################################
|
||||||
|
// VARS:
|
||||||
|
$fn=25; // overall render quality
|
||||||
|
q=0.01; // only used to get rid of visual glitches. can be set to 0 for productive exports.
|
||||||
|
mt=10; // material thickness, NOT overall thickness in case of a rim!
|
||||||
|
pt=3; // panel thickness
|
||||||
|
mt_inner=2; // constrained wall thickness for inside-walls between LEDs
|
||||||
|
panel_w=68; // overall width of led panel
|
||||||
|
panel_h=67; // same for height
|
||||||
|
panel_t_pcb=1.5; // height of PCB
|
||||||
|
panel_t_led=1.5; // height of the soldered LED modules
|
||||||
|
panel_t=(panel_t_pcb+panel_t_led); // overall thickness of the PCB+LEDs (~50:50)
|
||||||
|
led_spacing_x=8.5; // center-to-center spacing from LED to next LED, in width/x-axis-direction
|
||||||
|
led_spacing_y=8.3; // same for height/Y-axis
|
||||||
|
led_w=7;
|
||||||
|
led_h=7;
|
||||||
|
led_num_x=8;
|
||||||
|
led_num_y=8;
|
||||||
|
offset_left=((panel_w-((led_num_x*led_w)+((led_num_x-1)*(led_spacing_x-led_w))))/2); // offset on one side (effectively "panel_w-e2e_x/2", but properly calculated)
|
||||||
|
offset_top= ((panel_h-((led_num_y*led_h)+((led_num_y-1)*(led_spacing_y-led_h))))/2); // offset on one side (effectively "panel_h-e2e_y/2", but properly calculated)
|
||||||
|
|
||||||
|
e2e_x=64; // width/x-axis edge-to-edge-distance from beginning of first to end of last LED (LED-Case, not soldering-points). for reference only
|
||||||
|
e2e_y=61.75; // same for height/Y-axis
|
||||||
|
|
||||||
|
conhole_d=4; // connection hole between frame parts
|
||||||
|
conhole_taper_h=2; // is this needed?
|
||||||
|
conhole_i_d=2.75; // should fit M3
|
||||||
|
conhole_offset=3.5; //offset from outer perimeter
|
||||||
|
cutout_w=10;
|
||||||
|
mnthole_d=5;
|
||||||
|
//echo("offset left is ",offset_left);
|
||||||
|
//echo("offset top is ",offset_top);
|
||||||
|
|
||||||
|
|
||||||
|
// ##########################################
|
||||||
|
|
||||||
|
// MODULES:
|
||||||
|
|
||||||
|
module panel(){
|
||||||
|
// PCB:
|
||||||
|
cube([panel_w,panel_h,panel_t_pcb+q],center=true);
|
||||||
|
// overcomplicated "for" to determine the exact positions of the LEDs on the board.
|
||||||
|
// The LEDs themselves are not needed for rendering
|
||||||
|
// LEDs:
|
||||||
|
/*
|
||||||
|
for (num_x=[0:led_spacing_x:led_spacing_x*(led_num_x-1)],num_y=[0:led_spacing_y:led_spacing_y*(led_num_y-1)])
|
||||||
|
translate([-(panel_w/2-led_w/2)+offset_left+num_x,-(panel_h/2-led_h/2)+offset_top+num_y,panel_t_led])color( "#ff0000" )cube([led_w,led_h,panel_t_led],center=true);
|
||||||
|
*/
|
||||||
|
// "lightpipes":
|
||||||
|
// left column (span 2 wide each)
|
||||||
|
for (num_x=[0:led_spacing_x:led_spacing_x*(led_num_x-1)],num_y=[0:led_spacing_y])
|
||||||
|
translate([-(panel_w/2-led_w/2)+offset_left+num_x,-(panel_h/2-led_h/2)+offset_top+num_y,panel_t_pcb+panel_t_led*1.5])color( "#00ff00" )cube([led_w,led_h,panel_t_led*4+q],center=true);
|
||||||
|
// center column (span 2 wide each)
|
||||||
|
for (num_x=[0:led_spacing_x:led_spacing_x*(led_num_x-1)],num_y=[led_spacing_y*3:led_spacing_y*4])
|
||||||
|
translate([-(panel_w/2-led_w/2)+offset_left+num_x,-(panel_h/2-led_h/2)+offset_top+num_y,panel_t_pcb+panel_t_led*1.5])color( "#00ff00" )cube([led_w,led_h,panel_t_led*4+q],center=true);
|
||||||
|
// right column (span 2 wide each)
|
||||||
|
for (num_x=[0:led_spacing_x:led_spacing_x*(led_num_x-1)],num_y=[led_spacing_y*6:led_spacing_y*7])
|
||||||
|
translate([-(panel_w/2-led_w/2)+offset_left+num_x,-(panel_h/2-led_h/2)+offset_top+num_y,panel_t_pcb+panel_t_led*1.5])color( "#00ff00" )cube([led_w,led_h,panel_t_led*4+q],center=true);
|
||||||
|
// smaller inbetween columns (span 1 wide each)
|
||||||
|
for (num_x=[0:led_spacing_x:led_spacing_x*(led_num_x-1)],num_y=[led_spacing_y*2,led_spacing_y*5])
|
||||||
|
translate([-(panel_w/2-led_w/2)+offset_left+num_x,-(panel_h/2-led_h/2)+offset_top+num_y,panel_t_pcb+panel_t_led*1.5])color( "#00ff00" )cube([led_w,led_h,panel_t_led*4+q],center=true);
|
||||||
|
|
||||||
|
}
|
||||||
|
module panelholder(){
|
||||||
|
translate([0,0,panel_t_pcb])difference(){
|
||||||
|
cube([panel_w+mt,panel_h+mt,(panel_t+(panel_t_pcb+panel_t_led*2))],center=true);
|
||||||
|
translate([0,0,-(panel_t_pcb+panel_t_led)])
|
||||||
|
panel();
|
||||||
|
//translate([0,0,-panel_t_led*3])cube([panel_w,panel_h,(panel_t+(panel_t_led*3))],center=true);
|
||||||
|
// screwholes for M3
|
||||||
|
for (
|
||||||
|
pos_x=[-(panel_w+mt)/2+conhole_offset+mt/2,
|
||||||
|
(panel_w+mt)/2-conhole_offset-mt/2],
|
||||||
|
pos_y=[-(panel_h+mt)/2+conhole_offset,
|
||||||
|
(panel_h+mt)/2-conhole_offset]
|
||||||
|
)
|
||||||
|
translate([pos_x,pos_y,-1])
|
||||||
|
cylinder(d=conhole_i_d,h=(panel_t+(panel_t_led*3)+q),center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module panelframe(){
|
||||||
|
translate([0,0,panel_t_pcb])difference(){
|
||||||
|
cube([panel_w+mt,panel_h+mt,(panel_t+(panel_t_led*8))],center=true);
|
||||||
|
translate([0,0,pt])cube([panel_w-(offset_left*2)-q,panel_h-(offset_top*2)-q,(panel_t+(panel_t_led*8))+q],center=true);
|
||||||
|
// mounting-holes for sandwich-ing
|
||||||
|
for (
|
||||||
|
pos_x=[-(panel_w+mt)/2+conhole_offset+mt/2,
|
||||||
|
(panel_w+mt)/2-conhole_offset-mt/2],
|
||||||
|
pos_y=[-(panel_h+mt)/2+conhole_offset,
|
||||||
|
(panel_h+mt)/2-conhole_offset])
|
||||||
|
{
|
||||||
|
translate([pos_x,pos_y,0])cylinder(d=conhole_d,h=(panel_t+(panel_t_led*8))+q,center=true);
|
||||||
|
translate([pos_x,pos_y,-(panel_t+(panel_t_led*8))/2+conhole_taper_h/2])cylinder(d2=conhole_d,d1=conhole_d*1.5,h=conhole_taper_h+q,center=true);
|
||||||
|
}
|
||||||
|
// keyholes for mounting-screws.
|
||||||
|
// mirror([90,0,0])
|
||||||
|
for (
|
||||||
|
pos_x= [-(panel_h/2-mnthole_d*2)],
|
||||||
|
pos_x2=[-(panel_h/2-mnthole_d*5)],
|
||||||
|
pos_y= [-(panel_h/2-mnthole_d*2),0,(panel_h/2-mnthole_d*2)])
|
||||||
|
{
|
||||||
|
hull(){
|
||||||
|
translate([pos_x,pos_y,-mt/2])cylinder(d=mnthole_d,h=mt+q,center=true);
|
||||||
|
translate([pos_x2,pos_y,-mt/2])cylinder(d=mnthole_d,h=mt+q,center=true);
|
||||||
|
}
|
||||||
|
translate([pos_x2,pos_y,-mt/2])cylinder(d=mnthole_d*2,h=mt+q,center=true);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// ##########################################
|
||||||
|
|
||||||
|
// DRAW MODEL:
|
||||||
|
difference(){
|
||||||
|
union(){
|
||||||
|
panelholder();
|
||||||
|
translate([0,0,-(panel_t+(panel_t_led*3))-5])panelframe();
|
||||||
|
translate([panel_h+mt*2,0,0]){
|
||||||
|
panelholder();
|
||||||
|
translate([0,0,-(panel_t+(panel_t_led*3))-5])panelframe();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (x=[-10:1:10])
|
||||||
|
translate([panel_h,x,-12.5])rotate([0,90,0])rotate([0,0,90])cylinder(h=(2.5*panel_h),d=6,center=true,$fn=6);
|
||||||
|
translate([panel_h/2+mt,0,-5])cube([mt*2-1.5,100,30],center=true);
|
||||||
|
}
|
||||||
BIN
openscad/own/kitt-matrix/stl/kitt-matrix_draft1.stl
Normal file
BIN
openscad/own/kitt-matrix/stl/kitt-matrix_draft2.stl
Normal file
BIN
openscad/own/kitt-matrix/stl/kitt-matrix_draft3.stl
Normal file
|
After Width: | Height: | Size: 72 KiB |
63
openscad/own/pipe-cable-wallmount/pipe-cable-wallmount.scad
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
// by zeus - zeus@ctdo.de - CC-BY-NC-4.00
|
||||||
|
// -> https://www.thingiverse.com/zeus
|
||||||
|
// -> https://www.printables.com/social/366928-zeus/about
|
||||||
|
// -> https://github.com/zeus86
|
||||||
|
// -> https://blog.tastatursport.de/
|
||||||
|
// 2023-03-14
|
||||||
|
// Wallmount for Cables in the style of a pipeclamp
|
||||||
|
//##################
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//##################
|
||||||
|
//
|
||||||
|
// VARS
|
||||||
|
mt=4; // general material thickness
|
||||||
|
slack=0.5; // added slack to inner dimensions to allow easier fitment
|
||||||
|
width=20+slack; // outer width + slack
|
||||||
|
height=37.5+slack; // outer height + slack
|
||||||
|
depth=40+slack; // outer depth + slack
|
||||||
|
tab_l=(width-2*mt); // width of the cutout for the cabletie
|
||||||
|
tab_h=2; // height of the cutout for the cabletie
|
||||||
|
cut_d=(depth-2*mt); // diameter of cutout for the cables
|
||||||
|
$fn=100; // general resolution
|
||||||
|
q=0.01; // used to avoid graphical glitches
|
||||||
|
holedia=4.5; // diameter of the hole for the screw
|
||||||
|
rounding_eyeball=3; // not very scientific, add arbitrary amount to refine rounding.
|
||||||
|
//
|
||||||
|
//##################
|
||||||
|
//
|
||||||
|
// MODEL
|
||||||
|
|
||||||
|
module base(){
|
||||||
|
difference(){
|
||||||
|
// base body
|
||||||
|
translate([0,0,height/2])cube([width,depth,height],center=true);
|
||||||
|
// primary cutout
|
||||||
|
translate([0,0,height]){
|
||||||
|
hull(){
|
||||||
|
translate([0,0,-mt*2])rotate([0,90,0])cylinder(d=cut_d,h=width+q,center=true);
|
||||||
|
translate([0,0,-height+cut_d/2+mt])rotate([0,90,0])cylinder(d=cut_d,h=width+q,center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// cable-tie slit
|
||||||
|
translate([0,0,height-(mt*1.5)])cube([tab_l,depth+q,tab_h],center=true);
|
||||||
|
// screwhole
|
||||||
|
translate([0,0,mt-q]){
|
||||||
|
cylinder(d=holedia,h=mt*2,center=true);
|
||||||
|
translate([0,0,0])cylinder(d1=0,d2=holedia*3.14,h=mt*2,center=true);
|
||||||
|
}
|
||||||
|
//cylinder(d1=holedia,d2=holedia*2,h=height,center=true);
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
module rounding(){
|
||||||
|
rotate([0,90,0]){
|
||||||
|
cylinder(d=depth+mt+rounding_eyeball,h=width+q,center=true,$fn=500);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
intersection(){
|
||||||
|
translate([0,0,-height/2])base();
|
||||||
|
rounding();
|
||||||
|
}
|
||||||
BIN
openscad/own/rgb-fanblock/IMG/rgb-fanblock.png
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
openscad/own/rgb-fanblock/IMG/rgb-fanblock_logo.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
openscad/own/rgb-fanblock/SRC/Stencil Gothic - Read Me.pdf
Normal file
BIN
openscad/own/rgb-fanblock/SRC/StencilGothic.ttf
Normal file
BIN
openscad/own/rgb-fanblock/STL/plate1_2mm.stl
Normal file
BIN
openscad/own/rgb-fanblock/STL/plate2_2mm.stl
Normal file
BIN
openscad/own/rgb-fanblock/STL/plate3_3mm.stl
Normal file
BIN
openscad/own/rgb-fanblock/STL/plate4_2mm.stl
Normal file
BIN
openscad/own/rgb-fanblock/STL/plate5_2mm.stl
Normal file
70
openscad/own/rgb-fanblock/rgb-fanblock.scad
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
// by zeus - zeus@ctdo.de - CC-BY-NC-4.00
|
||||||
|
// -> https://www.thingiverse.com/zeus
|
||||||
|
// -> https://www.printables.com/social/366928-zeus/about
|
||||||
|
// -> https://github.com/zeus86
|
||||||
|
// -> https://blog.tastatursport.de/
|
||||||
|
// 2023-04-22
|
||||||
|
// RGB-Fanblock - Block of a 120mm Fan-Cutout with some RGB-Plating
|
||||||
|
//##################
|
||||||
|
//
|
||||||
|
// VARS
|
||||||
|
mt=4;
|
||||||
|
hole_dia=4.5;
|
||||||
|
hole_dist=105; // nominal hole-distance for 120mm-fans: 105mm
|
||||||
|
hole_dist_v=hole_dist-20; // vertical hole-distance (to enable non-square-designs)
|
||||||
|
height=hole_dist_v+hole_dia+(2.5*mt); // overall height
|
||||||
|
width=hole_dist+hole_dia+(2.5*mt); // overall width
|
||||||
|
height_inner=80+1;
|
||||||
|
width_inner=80+1;
|
||||||
|
depth=mt;
|
||||||
|
text_h=10;
|
||||||
|
q=0.01;
|
||||||
|
$fn=100;
|
||||||
|
use <SRC/StencilGothic.ttf>
|
||||||
|
|
||||||
|
// #################
|
||||||
|
// MODULES
|
||||||
|
module baseplate(plate_t=depth){
|
||||||
|
difference(){
|
||||||
|
hull(){ // "complex" basic-cube with rounded edges made from a hull-element
|
||||||
|
for (x=[-(width/2-mt/2),(width/2-mt/2)], z=[-(height/2-mt/2),(height/2-mt/2)]){
|
||||||
|
translate([x,0,z])rotate([90,0,0])cylinder(r=hole_dia/2,h=plate_t,center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//cube([width,depth,height],center=true);
|
||||||
|
for (x=[-hole_dist/2,hole_dist/2], z=[-hole_dist_v/2,hole_dist_v/2]){
|
||||||
|
translate([x,0,z])rotate([90,0,0])#cylinder(r=hole_dia/2,h=plate_t+q,center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module distanceplate(plate_d=depth,cut_w=width_inner,cut_h=height_inner,cableslot=0,cableslot_h=0){
|
||||||
|
plate_t=plate_d;
|
||||||
|
difference(){
|
||||||
|
baseplate(plate_t);
|
||||||
|
cube([cut_w,plate_d+q,cut_h],center=true);
|
||||||
|
if (cableslot==1){
|
||||||
|
translate([width/4,0,0])cube([width/2+1,plate_d+q,cableslot_h],center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module faceplate(plate_d=depth,text_value1,text_value2,fontsize){
|
||||||
|
plate_f=plate_d;
|
||||||
|
difference(){
|
||||||
|
baseplate(plate_f);
|
||||||
|
//cube([width_inner,plate_d+q,height_inner],center=true);
|
||||||
|
translate([0,plate_f/2+q,0])rotate([90,0,0])linear_extrude(plate_f+2*q){
|
||||||
|
translate([0, fontsize*0.7,0])text(text_value1, size=fontsize, font="Stencil Gothic:style=Regular", halign="center",valign="center");
|
||||||
|
translate([0,-fontsize*0.7,0])text(text_value2, size=fontsize, font="Stencil Gothic:style=Regular", halign="center",valign="center");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//
|
||||||
|
// #################
|
||||||
|
// DRAWING
|
||||||
|
translate([0,0,0])baseplate(2); // bottom layer
|
||||||
|
translate([20,-30,0])distanceplate(2,25,25,1,10); // plate for cableruns
|
||||||
|
translate([40,-60,0])distanceplate(3); // plate for the PCB to be resting in
|
||||||
|
%translate([60,-90,0])baseplate(2);// transparent or white layer
|
||||||
|
translate([80,-120,0])faceplate(2,"ZEUS","AQUA",25);// faceplate with text
|
||||||
|
After Width: | Height: | Size: 64 KiB |
|
After Width: | Height: | Size: 73 KiB |
@@ -0,0 +1,272 @@
|
|||||||
|
// supermicro SC808 (and others) extended slider drawers to re-utilize 3.5"-hdd-cages for multiple 2.5" ssds
|
||||||
|
// by zeus - 2023-06-15 - CC-BY-NC-SA-4.0 - https://git.kostianix.de/zeus/3d-stuff/openscad/own/supermicro_sc808t/
|
||||||
|
// #####################################
|
||||||
|
$fn=50;
|
||||||
|
q=0.01;
|
||||||
|
Q=1;
|
||||||
|
slack=0.5;
|
||||||
|
mt=2;
|
||||||
|
layer=0.5; // layer height of the 3d-printer to archieve some very narrow walls or floors without strange rounding errors
|
||||||
|
rod_hole_dia=4.5; // with some slack for m4 threaded bolts
|
||||||
|
slide_base_hole_dia=4; // 4.0 for m3 short inserts from cnc-kitchen
|
||||||
|
disk_w=71; // real measurement more like 69.9
|
||||||
|
disk_l=101; // real measurement more like 100.4/101 (connector overhang). effective length with cables at least 125mm!
|
||||||
|
disk_h=7.25; // unfortunately this is not really standardized. most relevant ssds will have 6.74-7.1mm thickness
|
||||||
|
|
||||||
|
//slider-vars
|
||||||
|
slide_base_l=130;
|
||||||
|
slide_base_w=75;
|
||||||
|
slide_base_h=12;
|
||||||
|
slide_top_h=12;
|
||||||
|
slide_wall_t=7.5;
|
||||||
|
slide_bottom_t=3.3; // for m3 short inserts from cnc-kitchen at least 3mm is needed, regular is 5.7mm
|
||||||
|
slide_wall_hole_dia=slide_base_hole_dia; // same as bottom to accomodate same inserts
|
||||||
|
slide_wall_hole_t=3; // minimal distance of 3mm, because space is tight here
|
||||||
|
slide_wall_z_offset=6.5; // distance from bottom
|
||||||
|
slide_channel_w=17.5;
|
||||||
|
// supermicro 3.5"-hdd-drawer mockup for reference
|
||||||
|
draw_w_inner=101;
|
||||||
|
draw_l_inner=150; // slightly less in reality, but non-critical dimension
|
||||||
|
draw_h_inner=21; // from bottom upwards
|
||||||
|
draw_w_front=107.5;
|
||||||
|
draw_l_front=31.5;
|
||||||
|
draw_h_front=27;
|
||||||
|
draw_t_outer=(draw_w_front-draw_w_inner)/2; //thickness of the rails
|
||||||
|
draw_hole_h=6.5; // height of the center of the mounting hole (from the bottom)
|
||||||
|
draw_hole_dia=slide_base_hole_dia;
|
||||||
|
draw_hole_y1=19; // distance of first sidehole (from front)
|
||||||
|
draw_hole_y2=79;
|
||||||
|
draw_hole_y3=121;
|
||||||
|
filler_w=draw_w_inner-slide_base_w-slack;
|
||||||
|
flange_d=1;
|
||||||
|
flange_h=3;
|
||||||
|
post_h=4;
|
||||||
|
link1_l=slide_base_w/2;
|
||||||
|
link2_l=slide_base_w-(slide_base_hole_dia*3.4);
|
||||||
|
// #####################################
|
||||||
|
module drawer_mockup(){
|
||||||
|
color("brown")translate([0,draw_l_front/2,draw_h_front/2])cube([draw_w_front,draw_l_front,draw_h_front],center=true);
|
||||||
|
difference(){
|
||||||
|
color("brown")translate([0,draw_l_front+draw_l_inner/2,draw_h_inner/2])cube([draw_w_inner+(2*draw_t_outer),draw_l_inner,draw_h_inner],center=true);
|
||||||
|
translate([0,draw_l_front+draw_l_inner/2,draw_h_inner/2])cube([draw_w_inner,draw_l_inner+q,draw_h_inner+q],center=true);
|
||||||
|
// hdd mounting-holes
|
||||||
|
for(x=[-(draw_w_front/2-draw_t_outer/2),(draw_w_front/2-draw_t_outer/2)],y=[draw_hole_y1,draw_hole_y2,draw_hole_y3]){
|
||||||
|
translate([x,draw_l_front+y,draw_hole_h])rotate([0,90,0])cylinder(h=draw_t_outer+q,r=draw_hole_dia/2,center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
module disk_mockup(){
|
||||||
|
color("teal")translate([0,0,disk_h/2])cube([disk_w,disk_l,disk_h],center=true);
|
||||||
|
}
|
||||||
|
|
||||||
|
module slider_base(){
|
||||||
|
translate([0,slide_base_l/2,slide_base_h/2]){
|
||||||
|
difference(){
|
||||||
|
cube([slide_base_w,slide_base_l,slide_base_h],center=true);
|
||||||
|
translate([0,0,slide_bottom_t/2+q])cube([slide_base_w-(2*slide_wall_t),slide_base_l+q,slide_base_h-slide_bottom_t],center=true);
|
||||||
|
for(x=[-(slide_base_w/2-slide_wall_t/2),(slide_base_w/2-slide_wall_t/2)], // used for M4-rods
|
||||||
|
x2=[-slide_channel_w/2:1:slide_channel_w/2], // center cable channel
|
||||||
|
x3=[-(slide_base_w/3+slide_base_w/5)/2,(slide_base_w/3+slide_base_w/5)/2]){ // offset cable channels
|
||||||
|
// M4-Rod-Holes for connecting the trays
|
||||||
|
translate([x,0,-slide_base_h/2+slide_bottom_t/2+rod_hole_dia/4]){
|
||||||
|
rotate([90,0,0])cylinder(h=slide_base_l+q,r=rod_hole_dia/2,center=true);
|
||||||
|
}
|
||||||
|
// center cable-channel cutout
|
||||||
|
hull(){
|
||||||
|
translate([x2,0,-slide_base_h/2+slide_bottom_t/3+rod_hole_dia/2]){
|
||||||
|
rotate([90,0,0])cylinder(h=slide_base_l+q,r=rod_hole_dia/2,center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// offset cable channel cutouts
|
||||||
|
translate([x3,0,-slide_base_h/2+slide_bottom_t/3+rod_hole_dia/2]){
|
||||||
|
rotate([90,0,0])cylinder(h=slide_base_l+q,r=rod_hole_dia/2,center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// base bottom mounting holes
|
||||||
|
for(x=[-slide_base_w/3,-slide_base_w/5,+slide_base_w/3,+slide_base_w/5],y=[-slide_base_l/2.5,-slide_base_l/7.5,+slide_base_l/2.5,+slide_base_l/7.5]){
|
||||||
|
translate([x,y,-(slide_base_h/2)+(slide_bottom_t/2)]){
|
||||||
|
cylinder(h=slide_bottom_t+Q,r=slide_base_hole_dia/2,center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// mounting holes on top of the walls
|
||||||
|
for(x=[-(slide_base_w/2-slide_wall_t/2),(slide_base_w/2-slide_wall_t/2)],y=[-(slide_base_l/2-slide_wall_t/2),(slide_base_l/2-slide_wall_t/2)]){
|
||||||
|
translate([x,y,(slide_base_h/2)-(slide_wall_hole_t/2)]){
|
||||||
|
cylinder(h=slide_wall_hole_t+q,r=slide_wall_hole_dia/2,center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// hdd mounting-holes
|
||||||
|
for(x=[-(slide_base_w/2-slide_wall_hole_t/2),(slide_base_w/2-slide_wall_hole_t/2)],y=[draw_hole_y1,draw_hole_y2,draw_hole_y3]){
|
||||||
|
translate([x,-draw_hole_y3-draw_hole_dia*2.5+y+draw_hole_y3/2,-slide_base_h/2+slide_wall_z_offset])rotate([0,90,0])cylinder(h=slide_wall_hole_t+q,r=draw_hole_dia/2,center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module slider_filler(){
|
||||||
|
difference(){
|
||||||
|
cube([filler_w,draw_hole_y3,draw_hole_dia*2],center=true);
|
||||||
|
for(x=[draw_hole_y1,draw_hole_y2,draw_hole_y3]){
|
||||||
|
translate([0,-(draw_hole_y3+draw_hole_dia)/2-7.5+x,0])rotate([0,90,0])#cylinder(h=filler_w+q,r=(draw_hole_dia/2)+0.5,center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module slider_top(){
|
||||||
|
translate([0,slide_base_l/2,slide_top_h/2+slide_base_h]){
|
||||||
|
difference(){
|
||||||
|
cube([slide_base_w,slide_base_l,slide_top_h],center=true);
|
||||||
|
translate([0,0,0])cube([slide_base_w-(2*slide_wall_t),slide_base_l+q,slide_base_h+q],center=true);
|
||||||
|
for(x=[-(slide_base_w/2-slide_wall_t/2),(slide_base_w/2-slide_wall_t/2)],y=[-(slide_base_l/2-slide_wall_t/2),(slide_base_l/2-slide_wall_t/2)]){
|
||||||
|
translate([x,y,0]){
|
||||||
|
translate([0,0,flange_h])cylinder(h=slide_top_h+q,r=slide_wall_hole_dia/2+flange_d,center=true);
|
||||||
|
cylinder(h=slide_top_h+q,r=slide_wall_hole_dia/2,center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module clip_small(){
|
||||||
|
translate([(slide_base_w/3+slide_base_w/5)/2,slide_base_l/2-slide_base_l/2.5,slide_bottom_t/2+mt*1.5]){
|
||||||
|
difference(){
|
||||||
|
union(){
|
||||||
|
cube([(slide_base_w/3+slide_base_w/5)/2-slide_base_hole_dia,slide_base_hole_dia*2,mt],center=true);
|
||||||
|
translate([0,0,mt/4])rotate([90,0,0])scale([1.25,1,1])cylinder(h=slide_base_hole_dia*2,r=rod_hole_dia/2,center=true);
|
||||||
|
}
|
||||||
|
for(x=[-(((slide_base_w/3+slide_base_w/5)/2-slide_base_hole_dia)/2-slide_base_hole_dia*0.75),(((slide_base_w/3+slide_base_w/5)/2-slide_base_hole_dia)/2-slide_base_hole_dia*0.75)]){
|
||||||
|
translate([x,0,0])cylinder(h=slide_bottom_t+Q,r=slide_base_hole_dia/2-0.5,center=true);
|
||||||
|
}
|
||||||
|
translate([0,0,-mt/2])rotate([90,0,0])cylinder(h=slide_base_hole_dia*2+q,r=rod_hole_dia/2,center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module clip_wide(){
|
||||||
|
translate([0,slide_base_l/2-slide_base_l/2.5,slide_bottom_t/2+mt*1.5]){
|
||||||
|
difference(){
|
||||||
|
union(){
|
||||||
|
hull(){
|
||||||
|
translate([slide_base_w/5,0,0])cylinder(h=mt,r=slide_base_hole_dia*0.66,center=true);
|
||||||
|
translate([-slide_base_w/5,0,0])cylinder(h=mt,r=slide_base_hole_dia*0.66,center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
translate([slide_base_w/5,0,mt/2])cylinder(h=mt*0.75,r=slide_base_hole_dia+q,center=true);
|
||||||
|
translate([-slide_base_w/5,0,mt/2])cylinder(h=mt*0.75,r=slide_base_hole_dia+q,center=true);
|
||||||
|
for(x=[-(slide_base_w/5),(slide_base_w/5)]){
|
||||||
|
translate([x,0,0])cylinder(h=slide_bottom_t+Q,r=slide_base_hole_dia/2-0.5,center=true);
|
||||||
|
}
|
||||||
|
for(x=[-slide_channel_w/2:1:slide_channel_w/2]){
|
||||||
|
hull(){
|
||||||
|
translate([x,0,-slide_base_hole_dia/2+mt/2-layer*2]){
|
||||||
|
rotate([90,0,0])cylinder(h=slide_base_hole_dia*0.66*2+q,r=rod_hole_dia/2,center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
module clip_rear_base(){
|
||||||
|
translate([0,slide_base_l/2-slide_base_l/2.5,slide_bottom_t/2+mt*1.5]){
|
||||||
|
difference(){
|
||||||
|
union(){
|
||||||
|
hull(){
|
||||||
|
translate([slide_base_w/3,0,mt*0.5])cylinder(h=mt*2,r=slide_base_hole_dia*1.15,center=true);
|
||||||
|
translate([-slide_base_w/3,0,mt*0.5])cylinder(h=mt*2,r=slide_base_hole_dia*1.15,center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
translate([slide_base_w/5,0,mt*2])cylinder(h=mt*2,r=slide_base_hole_dia*0.75+q,center=true);
|
||||||
|
translate([-slide_base_w/5,0,mt*2])cylinder(h=mt*2,r=slide_base_hole_dia*0.75+q,center=true);
|
||||||
|
translate([slide_base_w/3,0,mt*2])cylinder(h=mt*2,r=slide_base_hole_dia*0.75+q,center=true);
|
||||||
|
translate([-slide_base_w/3,0,mt*2])cylinder(h=mt*2,r=slide_base_hole_dia*0.75+q,center=true);
|
||||||
|
for(x=[-(slide_base_w/3),(slide_base_w/3),-(slide_base_w/5),(slide_base_w/5)]){
|
||||||
|
translate([x,0,0])cylinder(h=slide_bottom_t+Q,r=slide_base_hole_dia/2-0.5,center=true);
|
||||||
|
}
|
||||||
|
for(x=[-slide_channel_w/2:1:slide_channel_w/2]){
|
||||||
|
hull(){
|
||||||
|
translate([x,0,-slide_base_hole_dia/2+mt/2-layer*2]){
|
||||||
|
rotate([90,0,0])cylinder(h=slide_base_hole_dia*2.3+2*q,r=rod_hole_dia/2,center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
translate([0,0,post_h/2+mt*1.5-q]){
|
||||||
|
difference(){
|
||||||
|
cylinder(r=slide_base_hole_dia+q,h=post_h,center=true,$fn=100);
|
||||||
|
cylinder(r=slide_base_hole_dia/2,h=post_h+q,center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module linkage(){
|
||||||
|
translate([0,slide_base_l/2-slide_base_l/2.5,slide_bottom_t/2+mt*1.5+post_h/2+mt*1.5]){
|
||||||
|
rotate([0,0,55])difference(){
|
||||||
|
union(){
|
||||||
|
translate([0,-(link1_l/2),0])cube([post_h*2,link1_l,post_h-1],center=true);
|
||||||
|
// set1
|
||||||
|
cylinder(h=post_h-1,r=slide_base_hole_dia+3,center=true);
|
||||||
|
// set2
|
||||||
|
translate([0,-link1_l,0])cylinder(h=post_h-1,r=slide_base_hole_dia+3,center=true);
|
||||||
|
}
|
||||||
|
cylinder(h=post_h-1+q,r=slide_base_hole_dia+0.25,center=true);
|
||||||
|
translate([0,-link1_l,0])cylinder(h=post_h-1+q,r=slide_base_hole_dia+0.25,center=true);
|
||||||
|
}
|
||||||
|
translate([0,-21.5,-post_h]){
|
||||||
|
difference(){
|
||||||
|
union(){
|
||||||
|
cube([link2_l,post_h*2,post_h-1],center=true);
|
||||||
|
translate([-(link2_l/2),0,0])cylinder(h=post_h-1,r=slide_base_hole_dia+3,center=true);
|
||||||
|
}
|
||||||
|
translate([-(link2_l/2),0,0])cylinder(h=post_h-1+q,r=slide_base_hole_dia+0.25,center=true);
|
||||||
|
}
|
||||||
|
translate([link2_l/2,0,(post_h)/2]){
|
||||||
|
difference(){
|
||||||
|
cylinder(r=slide_base_hole_dia+q,h=post_h-1+post_h,center=true,$fn=100);
|
||||||
|
translate([0,0,post_h/2])cylinder(r=slide_base_hole_dia/2,h=post_h+q,center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// washer, arbitrary values
|
||||||
|
translate([0,13,13])difference(){
|
||||||
|
cylinder(r=7,h=1.5,center=true,$fn=100);
|
||||||
|
|
||||||
|
cylinder(r=2,h=1.5+q,center=true,$fn=100);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module base_end(){
|
||||||
|
difference(){
|
||||||
|
slider_base();
|
||||||
|
translate([0,slide_base_l/2+slide_base_l/7,0])cube([slide_base_w+q,slide_base_l+q,slide_base_h*2+q],center=true);
|
||||||
|
}
|
||||||
|
clip_rear_base();
|
||||||
|
linkage();
|
||||||
|
};
|
||||||
|
// #####################################
|
||||||
|
//drawer_mockup();
|
||||||
|
difference(){
|
||||||
|
union(){
|
||||||
|
translate([13,draw_l_front+5.5,0]){
|
||||||
|
slider_base();
|
||||||
|
translate([0,0,0.1])slider_top();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
translate([13,draw_l_front+63,8]){
|
||||||
|
disk_mockup();
|
||||||
|
translate([0,0,8])disk_mockup();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//translate([13,draw_l_front+5.5,0])clip_small();
|
||||||
|
//translate([13,draw_l_front+5.5,0])clip_wide();
|
||||||
|
translate([-(draw_w_inner/2-filler_w/2-slack/2),draw_l_front+draw_l_inner/2-5,slide_wall_z_offset])color("pink")slider_filler();
|
||||||
|
|
||||||
|
translate([13,draw_l_front-25.5,0])!base_end();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,283 @@
|
|||||||
|
// supermicro SC808 (and others) extended slider drawers to re-utilize 3.5"-hdd-cages for multiple 2.5" ssds
|
||||||
|
// by zeus - 2023-06-15 - CC-BY-NC-SA-4.0 - https://git.kostianix.de/zeus/3d-stuff/openscad/own/supermicro_sc808t/
|
||||||
|
// #####################################
|
||||||
|
$fn=50;
|
||||||
|
q=0.01;
|
||||||
|
Q=1;
|
||||||
|
slack=0.5;
|
||||||
|
mt=2;
|
||||||
|
layer=0.3; // layer height of the 3d-printer to archieve some very narrow walls or floors without strange rounding errors
|
||||||
|
rod_hole_dia=4.5; // with some slack for m4 threaded bolts
|
||||||
|
slide_base_hole_dia=4; // 4.0 for m3 short inserts from cnc-kitchen
|
||||||
|
disk_w=72; // real measurement more like 69.9
|
||||||
|
disk_l=102; // real measurement more like 100.4/101 (connector overhang). effective length with cables at least 125mm!
|
||||||
|
disk_h=7.25; // unfortunately this is not really standardized. most relevant ssds will have 6.74-7.1mm thickness
|
||||||
|
|
||||||
|
//slider-vars
|
||||||
|
slide_base_l=130;
|
||||||
|
slide_base_w=82.5;
|
||||||
|
slide_base_h=12;
|
||||||
|
slide_top_h=12;
|
||||||
|
slide_wall_t=10;
|
||||||
|
slide_bottom_t=3.3; // for m3 short inserts from cnc-kitchen at least 3mm is needed, regular is 5.7mm
|
||||||
|
slide_wall_hole_dia=slide_base_hole_dia; // same as bottom to accomodate same inserts
|
||||||
|
slide_wall_hole_t=3; // minimal distance of 3mm, because space is tight here
|
||||||
|
slide_wall_z_offset=5; // distance from bottom
|
||||||
|
slide_channel_w=17.5;
|
||||||
|
// supermicro 3.5"-hdd-drawer mockup for reference
|
||||||
|
draw_w_inner=101;
|
||||||
|
draw_l_inner=150; // slightly less in reality, but non-critical dimension
|
||||||
|
draw_h_inner=21; // from bottom upwards
|
||||||
|
draw_w_front=107.5;
|
||||||
|
draw_l_front=31.5;
|
||||||
|
draw_h_front=27;
|
||||||
|
draw_t_outer=(draw_w_front-draw_w_inner)/2; //thickness of the rails
|
||||||
|
draw_hole_h=6.5; // height of the center of the mounting hole (from the bottom)
|
||||||
|
draw_hole_dia=slide_base_hole_dia;
|
||||||
|
draw_hole_y1=19; // distance of first sidehole (from front)
|
||||||
|
draw_hole_y2=79;
|
||||||
|
draw_hole_y3=121;
|
||||||
|
|
||||||
|
filler_w=draw_w_inner-slide_base_w-slack;
|
||||||
|
flange_d=1;
|
||||||
|
flange_h=3;
|
||||||
|
post_h=4;
|
||||||
|
link1_l=slide_base_w/2;
|
||||||
|
link2_l=slide_base_w-(slide_base_hole_dia*3.4);
|
||||||
|
// #####################################
|
||||||
|
module drawer_mockup(){
|
||||||
|
color("brown")translate([0,draw_l_front/2,draw_h_front/2])cube([draw_w_front,draw_l_front,draw_h_front],center=true);
|
||||||
|
difference(){
|
||||||
|
color("brown")translate([0,draw_l_front+draw_l_inner/2,draw_h_inner/2])cube([draw_w_inner+(2*draw_t_outer),draw_l_inner,draw_h_inner],center=true);
|
||||||
|
translate([0,draw_l_front+draw_l_inner/2,draw_h_inner/2])cube([draw_w_inner,draw_l_inner+q,draw_h_inner+q],center=true);
|
||||||
|
// hdd mounting-holes
|
||||||
|
for(x=[-(draw_w_front/2-draw_t_outer/2),(draw_w_front/2-draw_t_outer/2)],y=[draw_hole_y1,draw_hole_y2,draw_hole_y3]){
|
||||||
|
translate([x,draw_l_front+y,draw_hole_h])rotate([0,90,0])cylinder(h=draw_t_outer+q,r=draw_hole_dia/2,center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
module disk_mockup(){
|
||||||
|
color("teal")translate([0,0,disk_h/2])cube([disk_w,disk_l,disk_h],center=true);
|
||||||
|
}
|
||||||
|
|
||||||
|
module slider_base(){
|
||||||
|
translate([0,slide_base_l/2,slide_base_h/2]){
|
||||||
|
difference(){
|
||||||
|
cube([slide_base_w,slide_base_l,slide_base_h],center=true);
|
||||||
|
translate([0,0,slide_bottom_t/2+q])cube([slide_base_w-(2*slide_wall_t),slide_base_l+q,slide_base_h-slide_bottom_t],center=true);
|
||||||
|
for(x=[-(slide_base_w/2-slide_wall_t/2),(slide_base_w/2-slide_wall_t/2)], // used for M4-rods
|
||||||
|
x2=[-slide_channel_w/2:1:slide_channel_w/2], // center cable channel
|
||||||
|
x3=[-(slide_base_w/3+slide_base_w/5)/2,(slide_base_w/3+slide_base_w/5)/2]){ // offset cable channels
|
||||||
|
// M4-Rod-Holes for connecting the trays
|
||||||
|
translate([x,0,-slide_base_h/2+slide_bottom_t/2+rod_hole_dia/2]){
|
||||||
|
rotate([90,0,0])cylinder(h=slide_base_l+q,r=rod_hole_dia/2,center=true);
|
||||||
|
}
|
||||||
|
// center cable-channel cutout
|
||||||
|
hull(){
|
||||||
|
translate([x2,0,-slide_base_h/2+slide_bottom_t/3+rod_hole_dia/2]){
|
||||||
|
rotate([90,0,0])cylinder(h=slide_base_l+q,r=rod_hole_dia/2,center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// offset cable channel cutouts
|
||||||
|
translate([x3,0,-slide_base_h/2+slide_bottom_t/3+rod_hole_dia/2]){
|
||||||
|
rotate([90,0,0])cylinder(h=slide_base_l+q,r=rod_hole_dia/2,center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// base bottom mounting holes
|
||||||
|
for(x=[-slide_base_w/3,-slide_base_w/5,+slide_base_w/3,+slide_base_w/5],y=[-slide_base_l/2.5,-slide_base_l/7.5,+slide_base_l/2.5,+slide_base_l/7.5]){
|
||||||
|
translate([x,y,-(slide_base_h/2)+(slide_bottom_t/2)]){
|
||||||
|
cylinder(h=slide_bottom_t+Q,r=slide_base_hole_dia/2,center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// mounting holes on top of the walls
|
||||||
|
for(x=[-(slide_base_w/2-slide_wall_t/2),(slide_base_w/2-slide_wall_t/2)],y=[-(slide_base_l/2-slide_wall_t/2),(slide_base_l/2-slide_wall_t/2)]){
|
||||||
|
translate([x,y,(slide_base_h/2)-(slide_wall_hole_t/2)]){
|
||||||
|
cylinder(h=slide_wall_hole_t+q,r=slide_wall_hole_dia/2,center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// hdd mounting-holes
|
||||||
|
for(x=[-(slide_base_w/2-slide_wall_hole_t/2),(slide_base_w/2-slide_wall_hole_t/2)],y=[draw_hole_y1,draw_hole_y2,draw_hole_y3]){
|
||||||
|
translate([x,-draw_hole_y3-draw_hole_dia*2.5+y+draw_hole_y3/2,-slide_base_h/2+slide_wall_z_offset])rotate([0,90,0])cylinder(h=slide_wall_hole_t+q,r=draw_hole_dia/2,center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module slider_filler(){
|
||||||
|
difference(){
|
||||||
|
cube([filler_w,draw_hole_y3,draw_hole_dia*2],center=true);
|
||||||
|
for(x=[draw_hole_y1,draw_hole_y2,draw_hole_y3]){
|
||||||
|
translate([0,-(draw_hole_y3+draw_hole_dia)/2-7.5+x,0])rotate([0,90,0])#cylinder(h=filler_w+q,r=(draw_hole_dia/2)+0.5,center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module slider_top(){
|
||||||
|
translate([0,slide_base_l/2,slide_top_h/2+slide_base_h]){
|
||||||
|
difference(){
|
||||||
|
cube([slide_base_w,slide_base_l,slide_top_h],center=true);
|
||||||
|
translate([0,0,0])cube([slide_base_w-(2*slide_wall_t),slide_base_l+q,slide_base_h+q],center=true);
|
||||||
|
for(x=[-(slide_base_w/2-slide_wall_t/2),(slide_base_w/2-slide_wall_t/2)],y=[-(slide_base_l/2-slide_wall_t/2),(slide_base_l/2-slide_wall_t/2)]){
|
||||||
|
translate([x,y,0]){
|
||||||
|
translate([0,0,flange_h])cylinder(h=slide_top_h+q,r=slide_wall_hole_dia/2+flange_d,center=true);
|
||||||
|
cylinder(h=slide_top_h+q,r=slide_wall_hole_dia/2,center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module clip_small(){
|
||||||
|
translate([(slide_base_w/3+slide_base_w/5)/2,slide_base_l/2-slide_base_l/2.5,slide_bottom_t/2+mt*1.5]){
|
||||||
|
difference(){
|
||||||
|
union(){
|
||||||
|
cube([(slide_base_w/3+slide_base_w/5)/2-slide_base_hole_dia,slide_base_hole_dia*2,mt],center=true);
|
||||||
|
translate([0,0,mt/4])rotate([90,0,0])scale([1.25,1,1])cylinder(h=slide_base_hole_dia*2,r=rod_hole_dia/2,center=true);
|
||||||
|
}
|
||||||
|
for(x=[-(((slide_base_w/3+slide_base_w/5)/2-slide_base_hole_dia)/2-slide_base_hole_dia*0.75),(((slide_base_w/3+slide_base_w/5)/2-slide_base_hole_dia)/2-slide_base_hole_dia*0.75)]){
|
||||||
|
translate([x,0,0])cylinder(h=slide_bottom_t+Q,r=slide_base_hole_dia/2-0.5,center=true);
|
||||||
|
}
|
||||||
|
translate([0,0,-mt/2])rotate([90,0,0])cylinder(h=slide_base_hole_dia*2+q,r=rod_hole_dia/2,center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module clip_wide(){
|
||||||
|
translate([0,slide_base_l/2-slide_base_l/2.5,slide_bottom_t/2+mt*1.5]){
|
||||||
|
difference(){
|
||||||
|
union(){
|
||||||
|
hull(){
|
||||||
|
translate([slide_base_w/5,0,0])cylinder(h=mt,r=slide_base_hole_dia,center=true);
|
||||||
|
translate([-slide_base_w/5,0,0])cylinder(h=mt,r=slide_base_hole_dia,center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//translate([slide_base_w/5,0,mt/2])cylinder(h=mt*0.75,r=slide_base_hole_dia+q,center=true);
|
||||||
|
//translate([-slide_base_w/5,0,mt/2])cylinder(h=mt*0.75,r=slide_base_hole_dia+q,center=true);
|
||||||
|
for(x=[-(slide_base_w/5),(slide_base_w/5)]){
|
||||||
|
translate([x,0,0])cylinder(h=slide_bottom_t+Q,r=slide_base_hole_dia/2-0.5,center=true);
|
||||||
|
}
|
||||||
|
for(x=[-slide_channel_w/2:1:slide_channel_w/2]){
|
||||||
|
hull(){ //cutout
|
||||||
|
translate([x,0,-slide_base_hole_dia/2+mt/2-layer*4]){
|
||||||
|
rotate([90,0,0])cylinder(h=slide_base_hole_dia*2+q,r=rod_hole_dia/2,center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
module clip_rear_base(post_h=post_h){
|
||||||
|
translate([0,slide_base_l/2-slide_base_l/2.5,slide_bottom_t/2+mt*1.5]){
|
||||||
|
difference(){
|
||||||
|
union(){
|
||||||
|
hull(){
|
||||||
|
translate([slide_base_w/5,0,mt*0.5])cylinder(h=mt*2,r=slide_base_hole_dia*1.15,center=true);
|
||||||
|
translate([-slide_base_w/5,0,mt*0.5])cylinder(h=mt*2,r=slide_base_hole_dia*1.15,center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
translate([slide_base_w/5,0,mt*2])cylinder(h=mt*2,r=slide_base_hole_dia*0.75+q,center=true);
|
||||||
|
translate([-slide_base_w/5,0,mt*2])cylinder(h=mt*2,r=slide_base_hole_dia*0.75+q,center=true);
|
||||||
|
// translate([slide_base_w/3,0,mt*2])cylinder(h=mt*2,r=slide_base_hole_dia*0.75+q,center=true);
|
||||||
|
// translate([-slide_base_w/3,0,mt*2])cylinder(h=mt*2,r=slide_base_hole_dia*0.75+q,center=true);
|
||||||
|
for(x=[-(slide_base_w/3),(slide_base_w/3),-(slide_base_w/5),(slide_base_w/5)]){
|
||||||
|
translate([x,0,0])cylinder(h=slide_bottom_t+Q,r=slide_base_hole_dia/2-0.5,center=true);
|
||||||
|
}
|
||||||
|
for(x=[-slide_channel_w/2:1:slide_channel_w/2]){
|
||||||
|
hull(){
|
||||||
|
translate([x,0,-slide_base_hole_dia/2+mt/2-layer*2]){
|
||||||
|
rotate([90,0,0])cylinder(h=slide_base_hole_dia*2.3+2*q,r=rod_hole_dia/2,center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
translate([0,0,post_h/2+mt*1.5-q]){
|
||||||
|
difference(){
|
||||||
|
cylinder(r=slide_base_hole_dia+q,h=post_h,center=true,$fn=100);
|
||||||
|
cylinder(r=slide_base_hole_dia/2,h=post_h+q,center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module linkage(){
|
||||||
|
translate([0,slide_base_l/2-slide_base_l/2.5,slide_bottom_t/2+mt*1.5+post_h/2+mt*1.5]){
|
||||||
|
rotate([0,0,55])difference(){
|
||||||
|
union(){
|
||||||
|
translate([0,-(link1_l/2),0])cube([post_h*2,link1_l,post_h-1],center=true);
|
||||||
|
// set1
|
||||||
|
cylinder(h=post_h-1,r=slide_base_hole_dia+3,center=true);
|
||||||
|
// set2
|
||||||
|
translate([0,-link1_l,0])cylinder(h=post_h-1,r=slide_base_hole_dia+3,center=true);
|
||||||
|
}
|
||||||
|
cylinder(h=post_h-1+q,r=slide_base_hole_dia+0.25,center=true);
|
||||||
|
translate([0,-link1_l,0])cylinder(h=post_h-1+q,r=slide_base_hole_dia+0.25,center=true);
|
||||||
|
}
|
||||||
|
translate([-0.66,-23.5,-post_h-5]){
|
||||||
|
difference(){
|
||||||
|
union(){
|
||||||
|
cube([link2_l,post_h*2,post_h-1],center=true);
|
||||||
|
translate([-(link2_l/2),0,0])cylinder(h=post_h-1,r=slide_base_hole_dia+3,center=true);
|
||||||
|
}
|
||||||
|
translate([-(link2_l/2),0,0])cylinder(h=post_h-1+q,r=slide_base_hole_dia+0.25,center=true);
|
||||||
|
}
|
||||||
|
translate([link2_l/2,0,(post_h)/2]){
|
||||||
|
difference(){
|
||||||
|
cylinder(r=slide_base_hole_dia+q,h=post_h-1+post_h,center=true,$fn=100);
|
||||||
|
translate([0,0,post_h/2])cylinder(r=slide_base_hole_dia/2,h=post_h+q,center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// washer, arbitrary values
|
||||||
|
translate([0,13,33])difference(){
|
||||||
|
cylinder(r=7,h=1.5,center=true,$fn=100);
|
||||||
|
|
||||||
|
cylinder(r=2,h=1.5+q,center=true,$fn=100);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
module base_end(){
|
||||||
|
difference(){
|
||||||
|
slider_base();
|
||||||
|
translate([0,slide_base_l/2+slide_base_l/7,0])cube([slide_base_w+q,slide_base_l+q,slide_base_h*2+q],center=true);
|
||||||
|
}
|
||||||
|
clip_rear_base(4);
|
||||||
|
|
||||||
|
translate([0,-35,-3.75])clip_rear_base(10);
|
||||||
|
// stackable washer
|
||||||
|
translate([0,-22,10])difference(){
|
||||||
|
cylinder(r=slide_base_hole_dia+mt,h=2,center=true);
|
||||||
|
cylinder(r=rod_hole_dia,h=3+q,center=true);
|
||||||
|
}
|
||||||
|
|
||||||
|
linkage();
|
||||||
|
};
|
||||||
|
// #####################################
|
||||||
|
//drawer_mockup();
|
||||||
|
/**
|
||||||
|
difference(){
|
||||||
|
union(){
|
||||||
|
translate([13,draw_l_front+5.5,0]){
|
||||||
|
slider_base();
|
||||||
|
translate([0,0,0.1])slider_top();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
translate([13,draw_l_front+65,6.5]){
|
||||||
|
disk_mockup();
|
||||||
|
translate([0,0,9])disk_mockup();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
translate([13,draw_l_front+5.5,5])clip_small();
|
||||||
|
translate([13,draw_l_front+5.5,10])clip_wide();
|
||||||
|
translate([-(draw_w_inner/2-filler_w/2-slack/2),draw_l_front+draw_l_inner/2-5,slide_wall_z_offset])color("pink")slider_filler();
|
||||||
|
**/
|
||||||
|
translate([13,draw_l_front-25.5,0])base_end();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 36 KiB |
64
openscad/own/usb-c-dock-wallmount/usb-c-dock-wallmount.scad
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
// by zeus - zeus@ctdo.de - CC-BY-NC-4.00
|
||||||
|
// -> https://www.thingiverse.com/zeus
|
||||||
|
// -> https://www.printables.com/social/366928-zeus/about
|
||||||
|
// -> https://github.com/zeus86
|
||||||
|
// -> https://blog.tastatursport.de/
|
||||||
|
// 2023-03-14
|
||||||
|
// USB-C-Dock-Wallmount
|
||||||
|
//##################
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//##################
|
||||||
|
//
|
||||||
|
// VARS
|
||||||
|
mt=4; // general material thickness
|
||||||
|
slack=0.5; // added slack to inner dimensions to allow easier fitment
|
||||||
|
width=85.5+slack; // inner width + slack
|
||||||
|
height=96+slack; // inner height + slack
|
||||||
|
depth=31+slack; // inner depth + slack
|
||||||
|
tab=5; // width of the tabbed section on the sides, that wraps around corners
|
||||||
|
tab_b=10; // width of the tabbed section on the bottom, that wraps around corners
|
||||||
|
tab_bf=tab; // width of the tabbed section on the bottom, front only
|
||||||
|
$fn=100; // general resolution
|
||||||
|
q=0.01; // used to avoid graphical glitches
|
||||||
|
percentage=0.20; // how many % of the overall height (from the bottom) should be generated (default: 40%)
|
||||||
|
hole_offset=15; // hole-distance from bottom
|
||||||
|
holedia=4.5; // diameter of the hole for the screw
|
||||||
|
dual_hole_spacing=width/1.75; // set to 0 if you want to use a single hole
|
||||||
|
//
|
||||||
|
//##################
|
||||||
|
//
|
||||||
|
// MODEL
|
||||||
|
|
||||||
|
module base(){
|
||||||
|
difference(){
|
||||||
|
// outer cube
|
||||||
|
translate([0,0,height/2+mt])cube([width+2*mt,depth+2*mt,height+2*mt],center=true);
|
||||||
|
// inner cube
|
||||||
|
translate([0,0,height/2+mt])cube([width,depth,height],center=true);
|
||||||
|
// front cutout
|
||||||
|
translate([0,-(depth/2+mt/2),height/2+mt])cube([width-tab*2,mt+q,height-tab_bf*2],center=true);
|
||||||
|
// side cutout right
|
||||||
|
translate([+(width/2+mt/2),0,height/2+mt])cube([mt+q,depth-tab*2,height-tab_b*2],center=true);
|
||||||
|
// side cutout left
|
||||||
|
translate([-(width/2+mt/2),0,height/2+mt])cube([mt+q,depth-tab*2,height-tab_b*2],center=true);
|
||||||
|
// screwpost
|
||||||
|
for(x=[dual_hole_spacing/2,-dual_hole_spacing/2]){
|
||||||
|
translate([x,depth/2+mt/2,hole_offset]){
|
||||||
|
rotate([90,0,0]){
|
||||||
|
cylinder(r=holedia/2,h=mt+q,center=true);
|
||||||
|
translate([0,0,0.5])cylinder(r1=holedia/2,r2=holedia,h=3+q,center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
difference(){
|
||||||
|
base();
|
||||||
|
translate([0,0,(height+2*mt)/2+(height+2*mt)*percentage])cube([width+2*mt+q,depth+2*mt+q,height+2*mt],center=true);
|
||||||
|
};
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
# editorconfig.org
|
|
||||||
root = true
|
|
||||||
|
|
||||||
[{*.patch,syntax_test_*}]
|
|
||||||
trim_trailing_whitespace = false
|
|
||||||
|
|
||||||
[{*.c,*.cpp,*.h,*.ino}]
|
|
||||||
charset = utf-8
|
|
||||||
|
|
||||||
[{*.c,*.cpp,*.h,*.ino,Makefile}]
|
|
||||||
trim_trailing_whitespace = true
|
|
||||||
insert_final_newline = true
|
|
||||||
end_of_line = lf
|
|
||||||
indent_style = space
|
|
||||||
indent_size = 2
|
|
||||||
|
|
||||||
[{*.py,*.conf,*.sublime-project}]
|
|
||||||
indent_style = tab
|
|
||||||
indent_size = 4
|
|
||||||
21
sparky/Marlin-bugfix-2.0.x/.gitattributes
vendored
@@ -1,21 +0,0 @@
|
|||||||
# Set the default behavior, in case people don't have core.autocrlf set.
|
|
||||||
* text=auto
|
|
||||||
|
|
||||||
# Files with Unix line endings
|
|
||||||
*.c text eol=lf
|
|
||||||
*.cpp text eol=lf
|
|
||||||
*.h text eol=lf
|
|
||||||
*.ino text eol=lf
|
|
||||||
*.py text eol=lf
|
|
||||||
*.sh text eol=lf
|
|
||||||
*.scad text eol=lf
|
|
||||||
|
|
||||||
# Files with native line endings
|
|
||||||
# *.sln text
|
|
||||||
|
|
||||||
# Binary files
|
|
||||||
*.png binary
|
|
||||||
*.jpg binary
|
|
||||||
*.fon binary
|
|
||||||
*.bin binary
|
|
||||||
*.woff binary
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
github: [thinkyhead]
|
|
||||||
patreon: thinkyhead
|
|
||||||
custom: ["https://www.thinkyhead.com/donate-to-marlin"]
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
# Contributor Covenant Code of Conduct
|
|
||||||
|
|
||||||
## Our Pledge
|
|
||||||
|
|
||||||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
|
||||||
|
|
||||||
## Our Standards
|
|
||||||
|
|
||||||
Examples of behavior that contributes to creating a positive environment include:
|
|
||||||
|
|
||||||
* Using welcoming and inclusive language
|
|
||||||
* Being respectful of differing viewpoints and experiences
|
|
||||||
* Gracefully accepting constructive criticism
|
|
||||||
* Focusing on what is best for the community
|
|
||||||
* Showing empathy towards other community members
|
|
||||||
|
|
||||||
Examples of unacceptable behavior by participants include:
|
|
||||||
|
|
||||||
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
|
||||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
|
||||||
* Public or private harassment
|
|
||||||
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
|
||||||
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
|
||||||
|
|
||||||
## Our Responsibilities
|
|
||||||
|
|
||||||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
|
||||||
|
|
||||||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
|
||||||
|
|
||||||
## Scope
|
|
||||||
|
|
||||||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
|
||||||
|
|
||||||
## Enforcement
|
|
||||||
|
|
||||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [marlinfirmware@github.com](mailto:marlinfirmware@github.com). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
|
||||||
|
|
||||||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
|
||||||
|
|
||||||
## Attribution
|
|
||||||
|
|
||||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [https://contributor-covenant.org/version/1/4][version]
|
|
||||||
|
|
||||||
[homepage]: https://contributor-covenant.org
|
|
||||||
[version]: https://contributor-covenant.org/version/1/4/
|
|
||||||
143
sparky/Marlin-bugfix-2.0.x/.github/contributing.md
vendored
@@ -1,143 +0,0 @@
|
|||||||
# Contributing to Marlin
|
|
||||||
|
|
||||||
Thanks for your interest in contributing to Marlin Firmware!
|
|
||||||
|
|
||||||
The following is a set of guidelines for contributing to Marlin, hosted by the [MarlinFirmware Organization](https://github.com/MarlinFirmware) on GitHub. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a Pull Request.
|
|
||||||
|
|
||||||
#### Table Of Contents
|
|
||||||
|
|
||||||
[Code of Conduct](#code-of-conduct)
|
|
||||||
|
|
||||||
[I don't want to read this whole thing, I just have a question!!!](#i-dont-want-to-read-this-whole-thing-i-just-have-a-question)
|
|
||||||
|
|
||||||
[How Can I Contribute?](#how-can-i-contribute)
|
|
||||||
* [Reporting Bugs](#reporting-bugs)
|
|
||||||
* [Suggesting Features or Changes](#suggesting-features-or-changes)
|
|
||||||
* [Your First Code Contribution](#your-first-code-contribution)
|
|
||||||
* [Pull Requests](#pull-requests)
|
|
||||||
|
|
||||||
[Styleguides](#styleguides)
|
|
||||||
* [Git Commit Messages](#git-commit-messages)
|
|
||||||
* [C++ Coding Standards](#c++-coding-standards)
|
|
||||||
* [Documentation Styleguide](#documentation)
|
|
||||||
|
|
||||||
[Additional Notes](#additional-notes)
|
|
||||||
* [Issue and Pull Request Labels](#issue-and-pull-request-labels)
|
|
||||||
|
|
||||||
## Code of Conduct
|
|
||||||
|
|
||||||
This project and everyone participating in it is governed by the [Marlin Code of Conduct](code_of_conduct.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [marlinfirmware@github.com](mailto:marlinfirmware@github.com).
|
|
||||||
|
|
||||||
## I don't want to read this whole thing I just have a question!!!
|
|
||||||
|
|
||||||
> **Note:** Please don't file an issue to ask a question. You'll get faster results by using the resources below.
|
|
||||||
|
|
||||||
We have a Message Board and a Facebook group where our knowledgable user community can provide helpful advice if you have questions.
|
|
||||||
|
|
||||||
* [Marlin RepRap forum](https://reprap.org/forum/list.php?415)
|
|
||||||
* [MarlinFirmware on Facebook](https://www.facebook.com/groups/1049718498464482/)
|
|
||||||
|
|
||||||
If chat is more your speed, you can join the MarlinFirmware Discord server:
|
|
||||||
|
|
||||||
* Use the link https://discord.gg/n5NJ59y to join up as a General User.
|
|
||||||
* Even though our Discord is pretty active, it may take a while for community members to respond — please be patient!
|
|
||||||
* Use the `#general` channel for general questions or discussion about Marlin.
|
|
||||||
* Other channels exist for certain topics or are limited to Patrons. Check the channel list.
|
|
||||||
|
|
||||||
## How Can I Contribute?
|
|
||||||
|
|
||||||
### Reporting Bugs
|
|
||||||
|
|
||||||
This section guides you through submitting a Bug Report for Marlin. Following these guidelines helps maintainers and the community understand your report, reproduce the behavior, and find related reports.
|
|
||||||
|
|
||||||
Before creating a Bug Report, please test the "nightly" development branch, as you might find out that you don't need to create one. When you are creating a Bug Report, please [include as many details as possible](#how-do-i-submit-a-good-bug-report). Fill out [the required template](issue_template.md), the information it asks for helps us resolve issues faster.
|
|
||||||
|
|
||||||
> **Note:** Regressions can happen. If you find a **Closed** issue that seems like your issue, go ahead and open a new issue and include a link to the original issue in the body of your new one. All you need to create a link is the issue number, preceded by #. For example, #8888.
|
|
||||||
|
|
||||||
#### How Do I Submit A (Good) Bug Report?
|
|
||||||
|
|
||||||
Bugs are tracked as [GitHub issues](https://guides.github.com/features/issues/). Use the New Issue button to create an issue and provide the following information by filling in [the template](issue_template.md).
|
|
||||||
|
|
||||||
Explain the problem and include additional details to help maintainers reproduce the problem:
|
|
||||||
|
|
||||||
* **Use a clear and descriptive title** for the issue to identify the problem.
|
|
||||||
* **Describe the exact steps which reproduce the problem** in as many details as possible. For example, start by explaining how you started Marlin, e.g. which command exactly you used in the terminal, or how you started Marlin otherwise. When listing steps, **don't just say what you did, but explain how you did it**. For example, if you moved the cursor to the end of a line, explain if you used the mouse, or a keyboard shortcut or an Marlin command, and if so which one?
|
|
||||||
* **Provide specific examples to demonstrate the steps**. Include links to files or GitHub projects, or copy/pasteable snippets, which you use in those examples. If you're providing snippets or log output in the issue, use [Markdown code blocks](https://help.github.com/articles/markdown-basics/#multiple-lines).
|
|
||||||
* **Describe the behavior you observed after following the steps** and point out what exactly is the problem with that behavior.
|
|
||||||
* **Explain which behavior you expected to see instead and why.**
|
|
||||||
* **Include detailed log output** especially for probing and leveling. See below for usage of `DEBUG_LEVELING_FEATURE`.
|
|
||||||
* **Include screenshots, links to videos, etc.** which clearly demonstrate the problem.
|
|
||||||
* **Include G-code** (if relevant) that reliably causes the problem to show itself.
|
|
||||||
* **If the problem wasn't triggered by a specific action**, describe what you were doing before the problem happened and share more information using the guidelines below.
|
|
||||||
|
|
||||||
Provide more context:
|
|
||||||
|
|
||||||
* **Can you reproduce the problem with a minimum of options enabled?**
|
|
||||||
* **Did the problem start happening recently** (e.g. after updating to a new version of Marlin) or was this always a problem?
|
|
||||||
* If the problem started happening recently, **can you reproduce the problem in an older version of Marlin?** What's the most recent version in which the problem doesn't happen? You can download older versions of Marlin from [the releases page](https://github.com/MarlinFirmware/Marlin/releases).
|
|
||||||
* **Can you reliably reproduce the issue?** If not, provide details about how often the problem happens and under which conditions it normally happens.
|
|
||||||
|
|
||||||
Include details about your configuration and environment:
|
|
||||||
|
|
||||||
* **Which version of Marlin are you using?** Marlin's exact version and build date can be seen in the startup message when a host connects to Marlin, or in the LCD Info menu (if enabled).
|
|
||||||
* **What kind of 3D Printer and electronics are you using**?
|
|
||||||
* **What kind of add-ons (probe, filament sensor) do you have**?
|
|
||||||
* **Include your Configuration files.** Make a ZIP file containing `Configuration.h` and `Configuration_adv.h` and drop it on your reply.
|
|
||||||
|
|
||||||
### Suggesting Features or Changes
|
|
||||||
|
|
||||||
This section guides you through submitting a suggestion for Marlin, including completely new features and minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand your suggestion and find related suggestions.
|
|
||||||
|
|
||||||
Before creating a suggestion, please check [this list](#before-submitting-a-suggestion) as you might find out that you don't need to create one. When you are creating an enhancement suggestion, please [include as many details as possible](#how-do-i-submit-a-good-enhancement-suggestion). Fill in [the template](issue_template.md), including the steps that you imagine you would take if the feature you're requesting existed.
|
|
||||||
|
|
||||||
#### Before Submitting a Feature Request
|
|
||||||
|
|
||||||
* **Check the [Marlin website](https://marlinfw.org/)** for tips — you might discover that the feature is already included. Most importantly, check if you're using [the latest version of Marlin](https://github.com/MarlinFirmware/Marlin/releases) and if you can get the desired behavior by changing [Marlin's config settings](https://marlinfw.org/docs/configuration/configuration.html).
|
|
||||||
* **Perform a [cursory search](https://github.com/MarlinFirmware/Marlin/issues?q=is%3Aissue)** to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
|
|
||||||
|
|
||||||
#### How Do I Submit A (Good) Feature Request?
|
|
||||||
|
|
||||||
Feature Requests are tracked as [GitHub issues](https://guides.github.com/features/issues/). Please follow these guidelines in your request:
|
|
||||||
|
|
||||||
* **Use a clear and descriptive title** for the issue to identify the suggestion.
|
|
||||||
* **Provide a step-by-step description of the requested feature** in as much detail as possible.
|
|
||||||
* **Provide specific examples to demonstrate the steps**.
|
|
||||||
* **Describe the current behavior** and **explain which behavior you expected to see instead** and why.
|
|
||||||
* **Include screenshots and links to videos** which demonstrate the feature or point out the part of Marlin to which the request is related.
|
|
||||||
* **Explain why this feature would be useful** to most Marlin users.
|
|
||||||
* **Name other firmwares that have this feature, if any.**
|
|
||||||
|
|
||||||
### Your First Code Contribution
|
|
||||||
|
|
||||||
Unsure where to begin contributing to Marlin? You can start by looking through these `good-first-issue` and `help-wanted` issues:
|
|
||||||
|
|
||||||
* [Beginner issues][good-first-issue] - issues which should only require a few lines of code, and a test or two.
|
|
||||||
* [Help Wanted issues][help-wanted] - issues which should be a bit more involved than `beginner` issues.
|
|
||||||
|
|
||||||
### Pull Requests
|
|
||||||
|
|
||||||
Pull Requests should always be targeted to working branches (e.g., `bugfix-1.1.x` and/or `bugfix-2.0.x`) and never to release branches (e.g., `1.1.x`). If this is your first Pull Request, please read our [Guide to Pull Requests](https://marlinfw.org/docs/development/getting_started_pull_requests.html) and Github's [Pull Request](https://help.github.com/articles/creating-a-pull-request/) documentation.
|
|
||||||
|
|
||||||
* Fill in [the required template](pull_request_template.md).
|
|
||||||
* Don't include issue numbers in the PR title.
|
|
||||||
* Include pictures, diagrams, and links to videos in your Pull Request to demonstrate your changes, if needed.
|
|
||||||
* Follow the [Coding Standards](https://marlinfw.org/docs/development/coding_standards.html) posted on our website.
|
|
||||||
* Document new code with clear and concise comments.
|
|
||||||
* End all files with a newline.
|
|
||||||
|
|
||||||
## Styleguides
|
|
||||||
|
|
||||||
### Git Commit Messages
|
|
||||||
|
|
||||||
* Use the present tense ("Add feature" not "Added feature").
|
|
||||||
* Use the imperative mood ("Move cursor to..." not "Moves cursor to...").
|
|
||||||
* Limit the first line to 72 characters or fewer.
|
|
||||||
* Reference issues and Pull Requests liberally after the first line.
|
|
||||||
|
|
||||||
### C++ Coding Standards
|
|
||||||
|
|
||||||
* Please read and follow the [Coding Standards](https://marlinfw.org/docs/development/coding_standards.html) posted on our website. Failure to follow these guidelines will delay evaluation and acceptance of Pull Requests.
|
|
||||||
|
|
||||||
### Documentation
|
|
||||||
|
|
||||||
* Guidelines for documentation are still under development. In-general, be clear, concise, and to-the-point.
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
<!--
|
|
||||||
|
|
||||||
Have you read Marlin's Code of Conduct? By filing an Issue, you are expected to comply with it, including treating everyone with respect: https://github.com/MarlinFirmware/Marlin/blob/bugfix-2.0.x/.github/code_of_conduct.md
|
|
||||||
|
|
||||||
Do you want to ask a question? Are you looking for support? Please don't post here. Instead use one of the following options:
|
|
||||||
|
|
||||||
- The Marlin Firmware forum at https://reprap.org/forum/list.php?415
|
|
||||||
- The MarlinFirmware Facebook Group at https://www.facebook.com/groups/1049718498464482/
|
|
||||||
- The MarlinFirmware Discord Server at https://discord.gg/n5NJ59y.
|
|
||||||
|
|
||||||
Before filing an issue be sure to test the latest "bugfix" branch to see whether the issue is already addressed.
|
|
||||||
|
|
||||||
-->
|
|
||||||
|
|
||||||
### Description
|
|
||||||
|
|
||||||
<!-- Description of the bug or requested feature -->
|
|
||||||
|
|
||||||
### Steps to Reproduce
|
|
||||||
|
|
||||||
<!-- If this is a Bug Report, please describe the steps needed to reproduce the issue -->
|
|
||||||
|
|
||||||
1. [First Step]
|
|
||||||
2. [Second Step]
|
|
||||||
3. [and so on...]
|
|
||||||
|
|
||||||
**Expected behavior:** [What you expect to happen]
|
|
||||||
|
|
||||||
**Actual behavior:** [What actually happens]
|
|
||||||
|
|
||||||
#### Additional Information
|
|
||||||
|
|
||||||
* Include a ZIP file containing your `Configuration.h` and `Configuration_adv.h` files.
|
|
||||||
* Provide pictures or links to videos that clearly demonstrate the issue.
|
|
||||||
* See [How Can I Contribute](#how-can-i-contribute) for additional guidelines.
|
|
||||||
40
sparky/Marlin-bugfix-2.0.x/.github/lock.yml
vendored
@@ -1,40 +0,0 @@
|
|||||||
#
|
|
||||||
# Configuration for Lock Threads - https://github.com/dessant/lock-threads-app
|
|
||||||
#
|
|
||||||
|
|
||||||
# Number of days of inactivity before a closed issue or pull request is locked
|
|
||||||
daysUntilLock: 60
|
|
||||||
|
|
||||||
# Skip issues and pull requests created before a given timestamp. Timestamp must
|
|
||||||
# follow ISO 8601 (`YYYY-MM-DD`). Set to `false` to disable
|
|
||||||
skipCreatedBefore: false
|
|
||||||
|
|
||||||
# Issues and pull requests with these labels will be ignored. Set to `[]` to disable
|
|
||||||
exemptLabels: [ 'no-locking' ]
|
|
||||||
|
|
||||||
# Label to add before locking, such as `outdated`. Set to `false` to disable
|
|
||||||
lockLabel: false
|
|
||||||
|
|
||||||
# Comment to post before locking. Set to `false` to disable
|
|
||||||
lockComment: >
|
|
||||||
This thread has been automatically locked since there has not been
|
|
||||||
any recent activity after it was closed. Please open a new issue for
|
|
||||||
related bugs.
|
|
||||||
|
|
||||||
# Assign `resolved` as the reason for locking. Set to `false` to disable
|
|
||||||
setLockReason: true
|
|
||||||
|
|
||||||
# Limit to only `issues` or `pulls`
|
|
||||||
# only: issues
|
|
||||||
|
|
||||||
# Optionally, specify configuration settings just for `issues` or `pulls`
|
|
||||||
# issues:
|
|
||||||
# exemptLabels:
|
|
||||||
# - help-wanted
|
|
||||||
# lockLabel: outdated
|
|
||||||
|
|
||||||
# pulls:
|
|
||||||
# daysUntilLock: 30
|
|
||||||
|
|
||||||
# Repository to extend settings from
|
|
||||||
# _extends: repo
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
### Requirements
|
|
||||||
|
|
||||||
* Filling out this template is required. Pull Requests without a clear description may be closed at the maintainers' discretion.
|
|
||||||
|
|
||||||
### Description
|
|
||||||
|
|
||||||
<!--
|
|
||||||
|
|
||||||
We must be able to understand your proposed change from this description. If we can't understand what the code will do from this description, the Pull Request may be closed at the maintainers' discretion. Keep in mind that the maintainer reviewing this PR may not be familiar with or have worked with the code recently, so please walk us through the concepts.
|
|
||||||
|
|
||||||
-->
|
|
||||||
|
|
||||||
### Benefits
|
|
||||||
|
|
||||||
<!-- What does this fix or improve? -->
|
|
||||||
|
|
||||||
### Configurations
|
|
||||||
|
|
||||||
<!-- Attach any Configuration.h, Configuration_adv.h, or platformio.ini files needed to compile/test your Pull Request. -->
|
|
||||||
|
|
||||||
### Related Issues
|
|
||||||
|
|
||||||
<!-- Whether this fixes a bug or fulfills a feature request, please list any related Issues here. -->
|
|
||||||
@@ -1,142 +0,0 @@
|
|||||||
#
|
|
||||||
# test-builds.yml
|
|
||||||
# Do test builds to catch compile errors
|
|
||||||
#
|
|
||||||
|
|
||||||
name: CI
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- bugfix-2.0.x
|
|
||||||
paths-ignore:
|
|
||||||
- config/**
|
|
||||||
- data/**
|
|
||||||
- docs/**
|
|
||||||
- '**/*.md'
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- bugfix-2.0.x
|
|
||||||
paths-ignore:
|
|
||||||
- config/**
|
|
||||||
- data/**
|
|
||||||
- docs/**
|
|
||||||
- '**/*.md'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test_builds:
|
|
||||||
name: Run All Tests
|
|
||||||
if: github.repository == 'MarlinFirmware/Marlin'
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
test-platform:
|
|
||||||
# Base Environments
|
|
||||||
|
|
||||||
- DUE
|
|
||||||
- DUE_archim
|
|
||||||
- esp32
|
|
||||||
- linux_native
|
|
||||||
- mega2560
|
|
||||||
- at90usb1286_dfu
|
|
||||||
- teensy31
|
|
||||||
- teensy35
|
|
||||||
- teensy41
|
|
||||||
- SAMD51_grandcentral_m4
|
|
||||||
|
|
||||||
# Extended AVR Environments
|
|
||||||
|
|
||||||
- FYSETC_F6
|
|
||||||
- mega1280
|
|
||||||
- rambo
|
|
||||||
- sanguino1284p
|
|
||||||
- sanguino644p
|
|
||||||
|
|
||||||
# STM32F1 (Maple) Environments
|
|
||||||
|
|
||||||
#- STM32F103RC_btt_maple
|
|
||||||
- STM32F103RC_btt_USB_maple
|
|
||||||
- STM32F103RC_fysetc
|
|
||||||
- STM32F103RC_meeb
|
|
||||||
- jgaurora_a5s_a1
|
|
||||||
- STM32F103VE_longer
|
|
||||||
#- mks_robin_maple
|
|
||||||
- mks_robin_lite
|
|
||||||
- mks_robin_pro
|
|
||||||
#- mks_robin_nano35_maple
|
|
||||||
#- STM32F103RET6_creality_maple
|
|
||||||
|
|
||||||
# STM32 (ST) Environments
|
|
||||||
|
|
||||||
- STM32F103RC_btt
|
|
||||||
#- STM32F103RC_btt_USB
|
|
||||||
- STM32F103RE_btt
|
|
||||||
- STM32F103RE_btt_USB
|
|
||||||
- STM32F103RET6_creality
|
|
||||||
- STM32F407VE_black
|
|
||||||
- STM32F401VE_STEVAL
|
|
||||||
- BIGTREE_BTT002
|
|
||||||
- BIGTREE_SKR_PRO
|
|
||||||
- BIGTREE_GTR_V1_0
|
|
||||||
- mks_robin
|
|
||||||
- ARMED
|
|
||||||
- FYSETC_S6
|
|
||||||
- STM32F070CB_malyan
|
|
||||||
- STM32F070RB_malyan
|
|
||||||
- malyan_M300
|
|
||||||
- FLYF407ZG
|
|
||||||
- rumba32
|
|
||||||
- LERDGEX
|
|
||||||
- LERDGEK
|
|
||||||
- mks_robin_nano35
|
|
||||||
- NUCLEO_F767ZI
|
|
||||||
- REMRAM_V1
|
|
||||||
- BTT_SKR_SE_BX
|
|
||||||
- chitu_f103
|
|
||||||
|
|
||||||
# Put lengthy tests last
|
|
||||||
|
|
||||||
- LPC1768
|
|
||||||
- LPC1769
|
|
||||||
|
|
||||||
# Non-working environment tests
|
|
||||||
#- at90usb1286_cdc
|
|
||||||
#- STM32F103CB_malyan
|
|
||||||
#- STM32F103RE
|
|
||||||
#- mks_robin_mini
|
|
||||||
|
|
||||||
steps:
|
|
||||||
|
|
||||||
- name: Check out the PR
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Cache pip
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: ~/.cache/pip
|
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pip-
|
|
||||||
|
|
||||||
- name: Cache PlatformIO
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: ~/.platformio
|
|
||||||
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
|
|
||||||
|
|
||||||
- name: Select Python 3.7
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
python-version: '3.7' # Version range or exact version of a Python version to use, using semvers version range syntax.
|
|
||||||
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
|
|
||||||
|
|
||||||
- name: Install PlatformIO
|
|
||||||
run: |
|
|
||||||
pip install -U https://github.com/platformio/platformio-core/archive/develop.zip
|
|
||||||
platformio update
|
|
||||||
|
|
||||||
- name: Run ${{ matrix.test-platform }} Tests
|
|
||||||
run: |
|
|
||||||
make tests-single-ci TEST_TARGET=${{ matrix.test-platform }}
|
|
||||||
169
sparky/Marlin-bugfix-2.0.x/.gitignore
vendored
@@ -1,169 +0,0 @@
|
|||||||
#
|
|
||||||
# Marlin 3D Printer Firmware
|
|
||||||
# Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
|
||||||
#
|
|
||||||
# Based on Sprinter and grbl.
|
|
||||||
# Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation, either version 3 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
|
|
||||||
# Generated files
|
|
||||||
_Version.h
|
|
||||||
bdf2u8g
|
|
||||||
|
|
||||||
#
|
|
||||||
# OS
|
|
||||||
#
|
|
||||||
applet/
|
|
||||||
*.DS_Store
|
|
||||||
|
|
||||||
#
|
|
||||||
# Misc
|
|
||||||
#
|
|
||||||
*~
|
|
||||||
*.orig
|
|
||||||
*.rej
|
|
||||||
*.bak
|
|
||||||
*.idea
|
|
||||||
*.s
|
|
||||||
*.i
|
|
||||||
*.ii
|
|
||||||
*.swp
|
|
||||||
tags
|
|
||||||
|
|
||||||
#
|
|
||||||
# C++
|
|
||||||
#
|
|
||||||
# Compiled Object files
|
|
||||||
*.slo
|
|
||||||
*.lo
|
|
||||||
*.o
|
|
||||||
*.obj
|
|
||||||
*.ino.cpp
|
|
||||||
|
|
||||||
# Precompiled Headers
|
|
||||||
*.gch
|
|
||||||
*.pch
|
|
||||||
|
|
||||||
# Compiled Dynamic libraries
|
|
||||||
*.so
|
|
||||||
*.dylib
|
|
||||||
*.dll
|
|
||||||
|
|
||||||
# Fortran module files
|
|
||||||
*.mod
|
|
||||||
*.smod
|
|
||||||
|
|
||||||
# Compiled Static libraries
|
|
||||||
*.lai
|
|
||||||
*.la
|
|
||||||
*.a
|
|
||||||
*.lib
|
|
||||||
|
|
||||||
# Executables
|
|
||||||
*.exe
|
|
||||||
*.out
|
|
||||||
*.app
|
|
||||||
|
|
||||||
#
|
|
||||||
# C
|
|
||||||
#
|
|
||||||
# Object files
|
|
||||||
*.o
|
|
||||||
*.ko
|
|
||||||
*.obj
|
|
||||||
*.elf
|
|
||||||
|
|
||||||
# Precompiled Headers
|
|
||||||
*.gch
|
|
||||||
*.pch
|
|
||||||
|
|
||||||
# Libraries
|
|
||||||
*.lib
|
|
||||||
*.a
|
|
||||||
*.la
|
|
||||||
*.lo
|
|
||||||
|
|
||||||
# Shared objects (inc. Windows DLLs)
|
|
||||||
*.dll
|
|
||||||
*.so
|
|
||||||
*.so.*
|
|
||||||
*.dylib
|
|
||||||
|
|
||||||
# Executables
|
|
||||||
*.exe
|
|
||||||
*.out
|
|
||||||
*.app
|
|
||||||
*.i*86
|
|
||||||
*.x86_64
|
|
||||||
*.hex
|
|
||||||
|
|
||||||
# Debug files
|
|
||||||
*.dSYM/
|
|
||||||
*.su
|
|
||||||
|
|
||||||
# PlatformIO files/dirs
|
|
||||||
.pio*
|
|
||||||
.pioenvs
|
|
||||||
.piolibdeps
|
|
||||||
.clang_complete
|
|
||||||
.gcc-flags.json
|
|
||||||
/lib/
|
|
||||||
|
|
||||||
# Secure Credentials
|
|
||||||
Configuration_Secure.h
|
|
||||||
|
|
||||||
# Visual Studio
|
|
||||||
*.sln
|
|
||||||
*.vcxproj
|
|
||||||
*.vcxproj.user
|
|
||||||
*.vcxproj.filters
|
|
||||||
Release/
|
|
||||||
Debug/
|
|
||||||
__vm/
|
|
||||||
.vs/
|
|
||||||
vc-fileutils.settings
|
|
||||||
|
|
||||||
# Visual Studio Code
|
|
||||||
.vscode
|
|
||||||
.vscode/.browse.c_cpp.db*
|
|
||||||
.vscode/c_cpp_properties.json
|
|
||||||
.vscode/launch.json
|
|
||||||
.vscode/*.db
|
|
||||||
|
|
||||||
# cmake
|
|
||||||
CMakeLists.txt
|
|
||||||
src/CMakeLists.txt
|
|
||||||
CMakeListsPrivate.txt
|
|
||||||
|
|
||||||
# CLion
|
|
||||||
cmake-build-*
|
|
||||||
|
|
||||||
# Eclipse
|
|
||||||
.project
|
|
||||||
.cproject
|
|
||||||
.pydevproject
|
|
||||||
.settings
|
|
||||||
.classpath
|
|
||||||
|
|
||||||
# Python
|
|
||||||
__pycache__
|
|
||||||
|
|
||||||
# IOLogger logs
|
|
||||||
*_log.csv
|
|
||||||
|
|
||||||
# Simulation / Native
|
|
||||||
eeprom.dat
|
|
||||||
imgui.ini
|
|
||||||
@@ -1,676 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
GNU GENERAL PUBLIC LICENSE
|
|
||||||
Version 3, 29 June 2007
|
|
||||||
|
|
||||||
Copyright (c) 2007 Free Software Foundation, Inc. <https://www.fsf.org/>
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
Preamble
|
|
||||||
|
|
||||||
The GNU General Public License is a free, copyleft license for
|
|
||||||
software and other kinds of works.
|
|
||||||
|
|
||||||
The licenses for most software and other practical works are designed
|
|
||||||
to take away your freedom to share and change the works. By contrast,
|
|
||||||
the GNU General Public License is intended to guarantee your freedom to
|
|
||||||
share and change all versions of a program--to make sure it remains free
|
|
||||||
software for all its users. We, the Free Software Foundation, use the
|
|
||||||
GNU General Public License for most of our software; it applies also to
|
|
||||||
any other work released this way by its authors. You can apply it to
|
|
||||||
your programs, too.
|
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom, not
|
|
||||||
price. Our General Public Licenses are designed to make sure that you
|
|
||||||
have the freedom to distribute copies of free software (and charge for
|
|
||||||
them if you wish), that you receive source code or can get it if you
|
|
||||||
want it, that you can change the software or use pieces of it in new
|
|
||||||
free programs, and that you know you can do these things.
|
|
||||||
|
|
||||||
To protect your rights, we need to prevent others from denying you
|
|
||||||
these rights or asking you to surrender the rights. Therefore, you have
|
|
||||||
certain responsibilities if you distribute copies of the software, or if
|
|
||||||
you modify it: responsibilities to respect the freedom of others.
|
|
||||||
|
|
||||||
For example, if you distribute copies of such a program, whether
|
|
||||||
gratis or for a fee, you must pass on to the recipients the same
|
|
||||||
freedoms that you received. You must make sure that they, too, receive
|
|
||||||
or can get the source code. And you must show them these terms so they
|
|
||||||
know their rights.
|
|
||||||
|
|
||||||
Developers that use the GNU GPL protect your rights with two steps:
|
|
||||||
(1) assert copyright on the software, and (2) offer you this License
|
|
||||||
giving you legal permission to copy, distribute and/or modify it.
|
|
||||||
|
|
||||||
For the developers' and authors' protection, the GPL clearly explains
|
|
||||||
that there is no warranty for this free software. For both users' and
|
|
||||||
authors' sake, the GPL requires that modified versions be marked as
|
|
||||||
changed, so that their problems will not be attributed erroneously to
|
|
||||||
authors of previous versions.
|
|
||||||
|
|
||||||
Some devices are designed to deny users access to install or run
|
|
||||||
modified versions of the software inside them, although the manufacturer
|
|
||||||
can do so. This is fundamentally incompatible with the aim of
|
|
||||||
protecting users' freedom to change the software. The systematic
|
|
||||||
pattern of such abuse occurs in the area of products for individuals to
|
|
||||||
use, which is precisely where it is most unacceptable. Therefore, we
|
|
||||||
have designed this version of the GPL to prohibit the practice for those
|
|
||||||
products. If such problems arise substantially in other domains, we
|
|
||||||
stand ready to extend this provision to those domains in future versions
|
|
||||||
of the GPL, as needed to protect the freedom of users.
|
|
||||||
|
|
||||||
Finally, every program is threatened constantly by software patents.
|
|
||||||
States should not allow patents to restrict development and use of
|
|
||||||
software on general-purpose computers, but in those that do, we wish to
|
|
||||||
avoid the special danger that patents applied to a free program could
|
|
||||||
make it effectively proprietary. To prevent this, the GPL assures that
|
|
||||||
patents cannot be used to render the program non-free.
|
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
|
||||||
modification follow.
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
0. Definitions.
|
|
||||||
|
|
||||||
"This License" refers to version 3 of the GNU General Public License.
|
|
||||||
|
|
||||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
|
||||||
works, such as semiconductor masks.
|
|
||||||
|
|
||||||
"The Program" refers to any copyrightable work licensed under this
|
|
||||||
License. Each licensee is addressed as "you". "Licensees" and
|
|
||||||
"recipients" may be individuals or organizations.
|
|
||||||
|
|
||||||
To "modify" a work means to copy from or adapt all or part of the work
|
|
||||||
in a fashion requiring copyright permission, other than the making of an
|
|
||||||
exact copy. The resulting work is called a "modified version" of the
|
|
||||||
earlier work or a work "based on" the earlier work.
|
|
||||||
|
|
||||||
A "covered work" means either the unmodified Program or a work based
|
|
||||||
on the Program.
|
|
||||||
|
|
||||||
To "propagate" a work means to do anything with it that, without
|
|
||||||
permission, would make you directly or secondarily liable for
|
|
||||||
infringement under applicable copyright law, except executing it on a
|
|
||||||
computer or modifying a private copy. Propagation includes copying,
|
|
||||||
distribution (with or without modification), making available to the
|
|
||||||
public, and in some countries other activities as well.
|
|
||||||
|
|
||||||
To "convey" a work means any kind of propagation that enables other
|
|
||||||
parties to make or receive copies. Mere interaction with a user through
|
|
||||||
a computer network, with no transfer of a copy, is not conveying.
|
|
||||||
|
|
||||||
An interactive user interface displays "Appropriate Legal Notices"
|
|
||||||
to the extent that it includes a convenient and prominently visible
|
|
||||||
feature that (1) displays an appropriate copyright notice, and (2)
|
|
||||||
tells the user that there is no warranty for the work (except to the
|
|
||||||
extent that warranties are provided), that licensees may convey the
|
|
||||||
work under this License, and how to view a copy of this License. If
|
|
||||||
the interface presents a list of user commands or options, such as a
|
|
||||||
menu, a prominent item in the list meets this criterion.
|
|
||||||
|
|
||||||
1. Source Code.
|
|
||||||
|
|
||||||
The "source code" for a work means the preferred form of the work
|
|
||||||
for making modifications to it. "Object code" means any non-source
|
|
||||||
form of a work.
|
|
||||||
|
|
||||||
A "Standard Interface" means an interface that either is an official
|
|
||||||
standard defined by a recognized standards body, or, in the case of
|
|
||||||
interfaces specified for a particular programming language, one that
|
|
||||||
is widely used among developers working in that language.
|
|
||||||
|
|
||||||
The "System Libraries" of an executable work include anything, other
|
|
||||||
than the work as a whole, that (a) is included in the normal form of
|
|
||||||
packaging a Major Component, but which is not part of that Major
|
|
||||||
Component, and (b) serves only to enable use of the work with that
|
|
||||||
Major Component, or to implement a Standard Interface for which an
|
|
||||||
implementation is available to the public in source code form. A
|
|
||||||
"Major Component", in this context, means a major essential component
|
|
||||||
(kernel, window system, and so on) of the specific operating system
|
|
||||||
(if any) on which the executable work runs, or a compiler used to
|
|
||||||
produce the work, or an object code interpreter used to run it.
|
|
||||||
|
|
||||||
The "Corresponding Source" for a work in object code form means all
|
|
||||||
the source code needed to generate, install, and (for an executable
|
|
||||||
work) run the object code and to modify the work, including scripts to
|
|
||||||
control those activities. However, it does not include the work's
|
|
||||||
System Libraries, or general-purpose tools or generally available free
|
|
||||||
programs which are used unmodified in performing those activities but
|
|
||||||
which are not part of the work. For example, Corresponding Source
|
|
||||||
includes interface definition files associated with source files for
|
|
||||||
the work, and the source code for shared libraries and dynamically
|
|
||||||
linked subprograms that the work is specifically designed to require,
|
|
||||||
such as by intimate data communication or control flow between those
|
|
||||||
subprograms and other parts of the work.
|
|
||||||
|
|
||||||
The Corresponding Source need not include anything that users
|
|
||||||
can regenerate automatically from other parts of the Corresponding
|
|
||||||
Source.
|
|
||||||
|
|
||||||
The Corresponding Source for a work in source code form is that
|
|
||||||
same work.
|
|
||||||
|
|
||||||
2. Basic Permissions.
|
|
||||||
|
|
||||||
All rights granted under this License are granted for the term of
|
|
||||||
copyright on the Program, and are irrevocable provided the stated
|
|
||||||
conditions are met. This License explicitly affirms your unlimited
|
|
||||||
permission to run the unmodified Program. The output from running a
|
|
||||||
covered work is covered by this License only if the output, given its
|
|
||||||
content, constitutes a covered work. This License acknowledges your
|
|
||||||
rights of fair use or other equivalent, as provided by copyright law.
|
|
||||||
|
|
||||||
You may make, run and propagate covered works that you do not
|
|
||||||
convey, without conditions so long as your license otherwise remains
|
|
||||||
in force. You may convey covered works to others for the sole purpose
|
|
||||||
of having them make modifications exclusively for you, or provide you
|
|
||||||
with facilities for running those works, provided that you comply with
|
|
||||||
the terms of this License in conveying all material for which you do
|
|
||||||
not control copyright. Those thus making or running the covered works
|
|
||||||
for you must do so exclusively on your behalf, under your direction
|
|
||||||
and control, on terms that prohibit them from making any copies of
|
|
||||||
your copyrighted material outside their relationship with you.
|
|
||||||
|
|
||||||
Conveying under any other circumstances is permitted solely under
|
|
||||||
the conditions stated below. Sublicensing is not allowed; section 10
|
|
||||||
makes it unnecessary.
|
|
||||||
|
|
||||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
|
||||||
|
|
||||||
No covered work shall be deemed part of an effective technological
|
|
||||||
measure under any applicable law fulfilling obligations under article
|
|
||||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
|
||||||
similar laws prohibiting or restricting circumvention of such
|
|
||||||
measures.
|
|
||||||
|
|
||||||
When you convey a covered work, you waive any legal power to forbid
|
|
||||||
circumvention of technological measures to the extent such circumvention
|
|
||||||
is effected by exercising rights under this License with respect to
|
|
||||||
the covered work, and you disclaim any intention to limit operation or
|
|
||||||
modification of the work as a means of enforcing, against the work's
|
|
||||||
users, your or third parties' legal rights to forbid circumvention of
|
|
||||||
technological measures.
|
|
||||||
|
|
||||||
4. Conveying Verbatim Copies.
|
|
||||||
|
|
||||||
You may convey verbatim copies of the Program's source code as you
|
|
||||||
receive it, in any medium, provided that you conspicuously and
|
|
||||||
appropriately publish on each copy an appropriate copyright notice;
|
|
||||||
keep intact all notices stating that this License and any
|
|
||||||
non-permissive terms added in accord with section 7 apply to the code;
|
|
||||||
keep intact all notices of the absence of any warranty; and give all
|
|
||||||
recipients a copy of this License along with the Program.
|
|
||||||
|
|
||||||
You may charge any price or no price for each copy that you convey,
|
|
||||||
and you may offer support or warranty protection for a fee.
|
|
||||||
|
|
||||||
5. Conveying Modified Source Versions.
|
|
||||||
|
|
||||||
You may convey a work based on the Program, or the modifications to
|
|
||||||
produce it from the Program, in the form of source code under the
|
|
||||||
terms of section 4, provided that you also meet all of these conditions:
|
|
||||||
|
|
||||||
a) The work must carry prominent notices stating that you modified
|
|
||||||
it, and giving a relevant date.
|
|
||||||
|
|
||||||
b) The work must carry prominent notices stating that it is
|
|
||||||
released under this License and any conditions added under section
|
|
||||||
7. This requirement modifies the requirement in section 4 to
|
|
||||||
"keep intact all notices".
|
|
||||||
|
|
||||||
c) You must license the entire work, as a whole, under this
|
|
||||||
License to anyone who comes into possession of a copy. This
|
|
||||||
License will therefore apply, along with any applicable section 7
|
|
||||||
additional terms, to the whole of the work, and all its parts,
|
|
||||||
regardless of how they are packaged. This License gives no
|
|
||||||
permission to license the work in any other way, but it does not
|
|
||||||
invalidate such permission if you have separately received it.
|
|
||||||
|
|
||||||
d) If the work has interactive user interfaces, each must display
|
|
||||||
Appropriate Legal Notices; however, if the Program has interactive
|
|
||||||
interfaces that do not display Appropriate Legal Notices, your
|
|
||||||
work need not make them do so.
|
|
||||||
|
|
||||||
A compilation of a covered work with other separate and independent
|
|
||||||
works, which are not by their nature extensions of the covered work,
|
|
||||||
and which are not combined with it such as to form a larger program,
|
|
||||||
in or on a volume of a storage or distribution medium, is called an
|
|
||||||
"aggregate" if the compilation and its resulting copyright are not
|
|
||||||
used to limit the access or legal rights of the compilation's users
|
|
||||||
beyond what the individual works permit. Inclusion of a covered work
|
|
||||||
in an aggregate does not cause this License to apply to the other
|
|
||||||
parts of the aggregate.
|
|
||||||
|
|
||||||
6. Conveying Non-Source Forms.
|
|
||||||
|
|
||||||
You may convey a covered work in object code form under the terms
|
|
||||||
of sections 4 and 5, provided that you also convey the
|
|
||||||
machine-readable Corresponding Source under the terms of this License,
|
|
||||||
in one of these ways:
|
|
||||||
|
|
||||||
a) Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by the
|
|
||||||
Corresponding Source fixed on a durable physical medium
|
|
||||||
customarily used for software interchange.
|
|
||||||
|
|
||||||
b) Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by a
|
|
||||||
written offer, valid for at least three years and valid for as
|
|
||||||
long as you offer spare parts or customer support for that product
|
|
||||||
model, to give anyone who possesses the object code either (1) a
|
|
||||||
copy of the Corresponding Source for all the software in the
|
|
||||||
product that is covered by this License, on a durable physical
|
|
||||||
medium customarily used for software interchange, for a price no
|
|
||||||
more than your reasonable cost of physically performing this
|
|
||||||
conveying of source, or (2) access to copy the
|
|
||||||
Corresponding Source from a network server at no charge.
|
|
||||||
|
|
||||||
c) Convey individual copies of the object code with a copy of the
|
|
||||||
written offer to provide the Corresponding Source. This
|
|
||||||
alternative is allowed only occasionally and noncommercially, and
|
|
||||||
only if you received the object code with such an offer, in accord
|
|
||||||
with subsection 6b.
|
|
||||||
|
|
||||||
d) Convey the object code by offering access from a designated
|
|
||||||
place (gratis or for a charge), and offer equivalent access to the
|
|
||||||
Corresponding Source in the same way through the same place at no
|
|
||||||
further charge. You need not require recipients to copy the
|
|
||||||
Corresponding Source along with the object code. If the place to
|
|
||||||
copy the object code is a network server, the Corresponding Source
|
|
||||||
may be on a different server (operated by you or a third party)
|
|
||||||
that supports equivalent copying facilities, provided you maintain
|
|
||||||
clear directions next to the object code saying where to find the
|
|
||||||
Corresponding Source. Regardless of what server hosts the
|
|
||||||
Corresponding Source, you remain obligated to ensure that it is
|
|
||||||
available for as long as needed to satisfy these requirements.
|
|
||||||
|
|
||||||
e) Convey the object code using peer-to-peer transmission, provided
|
|
||||||
you inform other peers where the object code and Corresponding
|
|
||||||
Source of the work are being offered to the general public at no
|
|
||||||
charge under subsection 6d.
|
|
||||||
|
|
||||||
A separable portion of the object code, whose source code is excluded
|
|
||||||
from the Corresponding Source as a System Library, need not be
|
|
||||||
included in conveying the object code work.
|
|
||||||
|
|
||||||
A "User Product" is either (1) a "consumer product", which means any
|
|
||||||
tangible personal property which is normally used for personal, family,
|
|
||||||
or household purposes, or (2) anything designed or sold for incorporation
|
|
||||||
into a dwelling. In determining whether a product is a consumer product,
|
|
||||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
|
||||||
product received by a particular user, "normally used" refers to a
|
|
||||||
typical or common use of that class of product, regardless of the status
|
|
||||||
of the particular user or of the way in which the particular user
|
|
||||||
actually uses, or expects or is expected to use, the product. A product
|
|
||||||
is a consumer product regardless of whether the product has substantial
|
|
||||||
commercial, industrial or non-consumer uses, unless such uses represent
|
|
||||||
the only significant mode of use of the product.
|
|
||||||
|
|
||||||
"Installation Information" for a User Product means any methods,
|
|
||||||
procedures, authorization keys, or other information required to install
|
|
||||||
and execute modified versions of a covered work in that User Product from
|
|
||||||
a modified version of its Corresponding Source. The information must
|
|
||||||
suffice to ensure that the continued functioning of the modified object
|
|
||||||
code is in no case prevented or interfered with solely because
|
|
||||||
modification has been made.
|
|
||||||
|
|
||||||
If you convey an object code work under this section in, or with, or
|
|
||||||
specifically for use in, a User Product, and the conveying occurs as
|
|
||||||
part of a transaction in which the right of possession and use of the
|
|
||||||
User Product is transferred to the recipient in perpetuity or for a
|
|
||||||
fixed term (regardless of how the transaction is characterized), the
|
|
||||||
Corresponding Source conveyed under this section must be accompanied
|
|
||||||
by the Installation Information. But this requirement does not apply
|
|
||||||
if neither you nor any third party retains the ability to install
|
|
||||||
modified object code on the User Product (for example, the work has
|
|
||||||
been installed in ROM).
|
|
||||||
|
|
||||||
The requirement to provide Installation Information does not include a
|
|
||||||
requirement to continue to provide support service, warranty, or updates
|
|
||||||
for a work that has been modified or installed by the recipient, or for
|
|
||||||
the User Product in which it has been modified or installed. Access to a
|
|
||||||
network may be denied when the modification itself materially and
|
|
||||||
adversely affects the operation of the network or violates the rules and
|
|
||||||
protocols for communication across the network.
|
|
||||||
|
|
||||||
Corresponding Source conveyed, and Installation Information provided,
|
|
||||||
in accord with this section must be in a format that is publicly
|
|
||||||
documented (and with an implementation available to the public in
|
|
||||||
source code form), and must require no special password or key for
|
|
||||||
unpacking, reading or copying.
|
|
||||||
|
|
||||||
7. Additional Terms.
|
|
||||||
|
|
||||||
"Additional permissions" are terms that supplement the terms of this
|
|
||||||
License by making exceptions from one or more of its conditions.
|
|
||||||
Additional permissions that are applicable to the entire Program shall
|
|
||||||
be treated as though they were included in this License, to the extent
|
|
||||||
that they are valid under applicable law. If additional permissions
|
|
||||||
apply only to part of the Program, that part may be used separately
|
|
||||||
under those permissions, but the entire Program remains governed by
|
|
||||||
this License without regard to the additional permissions.
|
|
||||||
|
|
||||||
When you convey a copy of a covered work, you may at your option
|
|
||||||
remove any additional permissions from that copy, or from any part of
|
|
||||||
it. (Additional permissions may be written to require their own
|
|
||||||
removal in certain cases when you modify the work.) You may place
|
|
||||||
additional permissions on material, added by you to a covered work,
|
|
||||||
for which you have or can give appropriate copyright permission.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, for material you
|
|
||||||
add to a covered work, you may (if authorized by the copyright holders of
|
|
||||||
that material) supplement the terms of this License with terms:
|
|
||||||
|
|
||||||
a) Disclaiming warranty or limiting liability differently from the
|
|
||||||
terms of sections 15 and 16 of this License; or
|
|
||||||
|
|
||||||
b) Requiring preservation of specified reasonable legal notices or
|
|
||||||
author attributions in that material or in the Appropriate Legal
|
|
||||||
Notices displayed by works containing it; or
|
|
||||||
|
|
||||||
c) Prohibiting misrepresentation of the origin of that material, or
|
|
||||||
requiring that modified versions of such material be marked in
|
|
||||||
reasonable ways as different from the original version; or
|
|
||||||
|
|
||||||
d) Limiting the use for publicity purposes of names of licensors or
|
|
||||||
authors of the material; or
|
|
||||||
|
|
||||||
e) Declining to grant rights under trademark law for use of some
|
|
||||||
trade names, trademarks, or service marks; or
|
|
||||||
|
|
||||||
f) Requiring indemnification of licensors and authors of that
|
|
||||||
material by anyone who conveys the material (or modified versions of
|
|
||||||
it) with contractual assumptions of liability to the recipient, for
|
|
||||||
any liability that these contractual assumptions directly impose on
|
|
||||||
those licensors and authors.
|
|
||||||
|
|
||||||
All other non-permissive additional terms are considered "further
|
|
||||||
restrictions" within the meaning of section 10. If the Program as you
|
|
||||||
received it, or any part of it, contains a notice stating that it is
|
|
||||||
governed by this License along with a term that is a further
|
|
||||||
restriction, you may remove that term. If a license document contains
|
|
||||||
a further restriction but permits relicensing or conveying under this
|
|
||||||
License, you may add to a covered work material governed by the terms
|
|
||||||
of that license document, provided that the further restriction does
|
|
||||||
not survive such relicensing or conveying.
|
|
||||||
|
|
||||||
If you add terms to a covered work in accord with this section, you
|
|
||||||
must place, in the relevant source files, a statement of the
|
|
||||||
additional terms that apply to those files, or a notice indicating
|
|
||||||
where to find the applicable terms.
|
|
||||||
|
|
||||||
Additional terms, permissive or non-permissive, may be stated in the
|
|
||||||
form of a separately written license, or stated as exceptions;
|
|
||||||
the above requirements apply either way.
|
|
||||||
|
|
||||||
8. Termination.
|
|
||||||
|
|
||||||
You may not propagate or modify a covered work except as expressly
|
|
||||||
provided under this License. Any attempt otherwise to propagate or
|
|
||||||
modify it is void, and will automatically terminate your rights under
|
|
||||||
this License (including any patent licenses granted under the third
|
|
||||||
paragraph of section 11).
|
|
||||||
|
|
||||||
However, if you cease all violation of this License, then your
|
|
||||||
license from a particular copyright holder is reinstated (a)
|
|
||||||
provisionally, unless and until the copyright holder explicitly and
|
|
||||||
finally terminates your license, and (b) permanently, if the copyright
|
|
||||||
holder fails to notify you of the violation by some reasonable means
|
|
||||||
prior to 60 days after the cessation.
|
|
||||||
|
|
||||||
Moreover, your license from a particular copyright holder is
|
|
||||||
reinstated permanently if the copyright holder notifies you of the
|
|
||||||
violation by some reasonable means, this is the first time you have
|
|
||||||
received notice of violation of this License (for any work) from that
|
|
||||||
copyright holder, and you cure the violation prior to 30 days after
|
|
||||||
your receipt of the notice.
|
|
||||||
|
|
||||||
Termination of your rights under this section does not terminate the
|
|
||||||
licenses of parties who have received copies or rights from you under
|
|
||||||
this License. If your rights have been terminated and not permanently
|
|
||||||
reinstated, you do not qualify to receive new licenses for the same
|
|
||||||
material under section 10.
|
|
||||||
|
|
||||||
9. Acceptance Not Required for Having Copies.
|
|
||||||
|
|
||||||
You are not required to accept this License in order to receive or
|
|
||||||
run a copy of the Program. Ancillary propagation of a covered work
|
|
||||||
occurring solely as a consequence of using peer-to-peer transmission
|
|
||||||
to receive a copy likewise does not require acceptance. However,
|
|
||||||
nothing other than this License grants you permission to propagate or
|
|
||||||
modify any covered work. These actions infringe copyright if you do
|
|
||||||
not accept this License. Therefore, by modifying or propagating a
|
|
||||||
covered work, you indicate your acceptance of this License to do so.
|
|
||||||
|
|
||||||
10. Automatic Licensing of Downstream Recipients.
|
|
||||||
|
|
||||||
Each time you convey a covered work, the recipient automatically
|
|
||||||
receives a license from the original licensors, to run, modify and
|
|
||||||
propagate that work, subject to this License. You are not responsible
|
|
||||||
for enforcing compliance by third parties with this License.
|
|
||||||
|
|
||||||
An "entity transaction" is a transaction transferring control of an
|
|
||||||
organization, or substantially all assets of one, or subdividing an
|
|
||||||
organization, or merging organizations. If propagation of a covered
|
|
||||||
work results from an entity transaction, each party to that
|
|
||||||
transaction who receives a copy of the work also receives whatever
|
|
||||||
licenses to the work the party's predecessor in interest had or could
|
|
||||||
give under the previous paragraph, plus a right to possession of the
|
|
||||||
Corresponding Source of the work from the predecessor in interest, if
|
|
||||||
the predecessor has it or can get it with reasonable efforts.
|
|
||||||
|
|
||||||
You may not impose any further restrictions on the exercise of the
|
|
||||||
rights granted or affirmed under this License. For example, you may
|
|
||||||
not impose a license fee, royalty, or other charge for exercise of
|
|
||||||
rights granted under this License, and you may not initiate litigation
|
|
||||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
|
||||||
any patent claim is infringed by making, using, selling, offering for
|
|
||||||
sale, or importing the Program or any portion of it.
|
|
||||||
|
|
||||||
11. Patents.
|
|
||||||
|
|
||||||
A "contributor" is a copyright holder who authorizes use under this
|
|
||||||
License of the Program or a work on which the Program is based. The
|
|
||||||
work thus licensed is called the contributor's "contributor version".
|
|
||||||
|
|
||||||
A contributor's "essential patent claims" are all patent claims
|
|
||||||
owned or controlled by the contributor, whether already acquired or
|
|
||||||
hereafter acquired, that would be infringed by some manner, permitted
|
|
||||||
by this License, of making, using, or selling its contributor version,
|
|
||||||
but do not include claims that would be infringed only as a
|
|
||||||
consequence of further modification of the contributor version. For
|
|
||||||
purposes of this definition, "control" includes the right to grant
|
|
||||||
patent sublicenses in a manner consistent with the requirements of
|
|
||||||
this License.
|
|
||||||
|
|
||||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
|
||||||
patent license under the contributor's essential patent claims, to
|
|
||||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
|
||||||
propagate the contents of its contributor version.
|
|
||||||
|
|
||||||
In the following three paragraphs, a "patent license" is any express
|
|
||||||
agreement or commitment, however denominated, not to enforce a patent
|
|
||||||
(such as an express permission to practice a patent or covenant not to
|
|
||||||
sue for patent infringement). To "grant" such a patent license to a
|
|
||||||
party means to make such an agreement or commitment not to enforce a
|
|
||||||
patent against the party.
|
|
||||||
|
|
||||||
If you convey a covered work, knowingly relying on a patent license,
|
|
||||||
and the Corresponding Source of the work is not available for anyone
|
|
||||||
to copy, free of charge and under the terms of this License, through a
|
|
||||||
publicly available network server or other readily accessible means,
|
|
||||||
then you must either (1) cause the Corresponding Source to be so
|
|
||||||
available, or (2) arrange to deprive yourself of the benefit of the
|
|
||||||
patent license for this particular work, or (3) arrange, in a manner
|
|
||||||
consistent with the requirements of this License, to extend the patent
|
|
||||||
license to downstream recipients. "Knowingly relying" means you have
|
|
||||||
actual knowledge that, but for the patent license, your conveying the
|
|
||||||
covered work in a country, or your recipient's use of the covered work
|
|
||||||
in a country, would infringe one or more identifiable patents in that
|
|
||||||
country that you have reason to believe are valid.
|
|
||||||
|
|
||||||
If, pursuant to or in connection with a single transaction or
|
|
||||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
|
||||||
covered work, and grant a patent license to some of the parties
|
|
||||||
receiving the covered work authorizing them to use, propagate, modify
|
|
||||||
or convey a specific copy of the covered work, then the patent license
|
|
||||||
you grant is automatically extended to all recipients of the covered
|
|
||||||
work and works based on it.
|
|
||||||
|
|
||||||
A patent license is "discriminatory" if it does not include within
|
|
||||||
the scope of its coverage, prohibits the exercise of, or is
|
|
||||||
conditioned on the non-exercise of one or more of the rights that are
|
|
||||||
specifically granted under this License. You may not convey a covered
|
|
||||||
work if you are a party to an arrangement with a third party that is
|
|
||||||
in the business of distributing software, under which you make payment
|
|
||||||
to the third party based on the extent of your activity of conveying
|
|
||||||
the work, and under which the third party grants, to any of the
|
|
||||||
parties who would receive the covered work from you, a discriminatory
|
|
||||||
patent license (a) in connection with copies of the covered work
|
|
||||||
conveyed by you (or copies made from those copies), or (b) primarily
|
|
||||||
for and in connection with specific products or compilations that
|
|
||||||
contain the covered work, unless you entered into that arrangement,
|
|
||||||
or that patent license was granted, prior to 28 March 2007.
|
|
||||||
|
|
||||||
Nothing in this License shall be construed as excluding or limiting
|
|
||||||
any implied license or other defenses to infringement that may
|
|
||||||
otherwise be available to you under applicable patent law.
|
|
||||||
|
|
||||||
12. No Surrender of Others' Freedom.
|
|
||||||
|
|
||||||
If conditions are imposed on you (whether by court order, agreement or
|
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
|
||||||
excuse you from the conditions of this License. If you cannot convey a
|
|
||||||
covered work so as to satisfy simultaneously your obligations under this
|
|
||||||
License and any other pertinent obligations, then as a consequence you may
|
|
||||||
not convey it at all. For example, if you agree to terms that obligate you
|
|
||||||
to collect a royalty for further conveying from those to whom you convey
|
|
||||||
the Program, the only way you could satisfy both those terms and this
|
|
||||||
License would be to refrain entirely from conveying the Program.
|
|
||||||
|
|
||||||
13. Use with the GNU Affero General Public License.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, you have
|
|
||||||
permission to link or combine any covered work with a work licensed
|
|
||||||
under version 3 of the GNU Affero General Public License into a single
|
|
||||||
combined work, and to convey the resulting work. The terms of this
|
|
||||||
License will continue to apply to the part which is the covered work,
|
|
||||||
but the special requirements of the GNU Affero General Public License,
|
|
||||||
section 13, concerning interaction through a network will apply to the
|
|
||||||
combination as such.
|
|
||||||
|
|
||||||
14. Revised Versions of this License.
|
|
||||||
|
|
||||||
The Free Software Foundation may publish revised and/or new versions of
|
|
||||||
the GNU General Public License from time to time. Such new versions will
|
|
||||||
be similar in spirit to the present version, but may differ in detail to
|
|
||||||
address new problems or concerns.
|
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the
|
|
||||||
Program specifies that a certain numbered version of the GNU General
|
|
||||||
Public License "or any later version" applies to it, you have the
|
|
||||||
option of following the terms and conditions either of that numbered
|
|
||||||
version or of any later version published by the Free Software
|
|
||||||
Foundation. If the Program does not specify a version number of the
|
|
||||||
GNU General Public License, you may choose any version ever published
|
|
||||||
by the Free Software Foundation.
|
|
||||||
|
|
||||||
If the Program specifies that a proxy can decide which future
|
|
||||||
versions of the GNU General Public License can be used, that proxy's
|
|
||||||
public statement of acceptance of a version permanently authorizes you
|
|
||||||
to choose that version for the Program.
|
|
||||||
|
|
||||||
Later license versions may give you additional or different
|
|
||||||
permissions. However, no additional obligations are imposed on any
|
|
||||||
author or copyright holder as a result of your choosing to follow a
|
|
||||||
later version.
|
|
||||||
|
|
||||||
15. Disclaimer of Warranty.
|
|
||||||
|
|
||||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
|
||||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
|
||||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
|
||||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
|
||||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
|
||||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
|
||||||
|
|
||||||
16. Limitation of Liability.
|
|
||||||
|
|
||||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
|
||||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
|
||||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
|
||||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
|
||||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
|
||||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
|
||||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
|
||||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
|
||||||
SUCH DAMAGES.
|
|
||||||
|
|
||||||
17. Interpretation of Sections 15 and 16.
|
|
||||||
|
|
||||||
If the disclaimer of warranty and limitation of liability provided
|
|
||||||
above cannot be given local legal effect according to their terms,
|
|
||||||
reviewing courts shall apply local law that most closely approximates
|
|
||||||
an absolute waiver of all civil liability in connection with the
|
|
||||||
Program, unless a warranty or assumption of liability accompanies a
|
|
||||||
copy of the Program in return for a fee.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
How to Apply These Terms to Your New Programs
|
|
||||||
|
|
||||||
If you develop a new program, and you want it to be of the greatest
|
|
||||||
possible use to the public, the best way to achieve this is to make it
|
|
||||||
free software which everyone can redistribute and change under these terms.
|
|
||||||
|
|
||||||
To do so, attach the following notices to the program. It is safest
|
|
||||||
to attach them to the start of each source file to most effectively
|
|
||||||
state the exclusion of warranty; and each file should have at least
|
|
||||||
the "copyright" line and a pointer to where the full notice is found.
|
|
||||||
|
|
||||||
{one line to give the program's name and a brief idea of what it does.}
|
|
||||||
Copyright (c) {year} {name of author}
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
|
||||||
|
|
||||||
If the program does terminal interaction, make it output a short
|
|
||||||
notice like this when it starts in an interactive mode:
|
|
||||||
|
|
||||||
{project} Copyright (c) {year} {fullname}
|
|
||||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
|
||||||
This is free software, and you are welcome to redistribute it
|
|
||||||
under certain conditions; type `show c' for details.
|
|
||||||
|
|
||||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
|
||||||
parts of the General Public License. Of course, your program's commands
|
|
||||||
might be different; for a GUI interface, you would use an "about box".
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or school,
|
|
||||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
|
||||||
For more information on this, and how to apply and follow the GNU GPL, see
|
|
||||||
<https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
The GNU General Public License does not permit incorporating your program
|
|
||||||
into proprietary programs. If your program is a subroutine library, you
|
|
||||||
may consider it more useful to permit linking proprietary applications with
|
|
||||||
the library. If this is what you want to do, use the GNU Lesser General
|
|
||||||
Public License instead of this License. But first, please read
|
|
||||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
help:
|
|
||||||
@echo "Tasks for local development:"
|
|
||||||
@echo "* tests-single-ci: Run a single test from inside the CI"
|
|
||||||
@echo "* tests-single-local: Run a single test locally"
|
|
||||||
@echo "* tests-single-local-docker: Run a single test locally, using docker-compose"
|
|
||||||
@echo "* tests-all-local: Run all tests locally"
|
|
||||||
@echo "* tests-all-local-docker: Run all tests locally, using docker-compose"
|
|
||||||
@echo "* setup-local-docker: Setup local docker-compose"
|
|
||||||
@echo ""
|
|
||||||
@echo "Options for testing:"
|
|
||||||
@echo " TEST_TARGET Set when running tests-single-*, to select the"
|
|
||||||
@echo " test. If you set it to ALL it will run all "
|
|
||||||
@echo " tests, but some of them are broken: use "
|
|
||||||
@echo " tests-all-* instead to run only the ones that "
|
|
||||||
@echo " run on GitHub CI"
|
|
||||||
@echo " ONLY_TEST Limit tests to only those that contain this, or"
|
|
||||||
@echo " the index of the test (1-based)"
|
|
||||||
@echo " VERBOSE_PLATFORMIO If you want the full PIO output, set any value"
|
|
||||||
@echo " GIT_RESET_HARD Used by CI: reset all local changes. WARNING:"
|
|
||||||
@echo " THIS WILL UNDO ANY CHANGES YOU'VE MADE!"
|
|
||||||
.PHONY: help
|
|
||||||
|
|
||||||
tests-single-ci:
|
|
||||||
export GIT_RESET_HARD=true
|
|
||||||
$(MAKE) tests-single-local TEST_TARGET=$(TEST_TARGET)
|
|
||||||
.PHONY: tests-single-ci
|
|
||||||
|
|
||||||
tests-single-local:
|
|
||||||
@if ! test -n "$(TEST_TARGET)" ; then echo "***ERROR*** Set TEST_TARGET=<your-module> or use make tests-all-local" ; return 1; fi
|
|
||||||
export PATH=./buildroot/bin/:./buildroot/tests/:${PATH} \
|
|
||||||
&& export VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) \
|
|
||||||
&& run_tests . $(TEST_TARGET) "$(ONLY_TEST)"
|
|
||||||
.PHONY: tests-single-local
|
|
||||||
|
|
||||||
tests-single-local-docker:
|
|
||||||
@if ! test -n "$(TEST_TARGET)" ; then echo "***ERROR*** Set TEST_TARGET=<your-module> or use make tests-all-local-docker" ; return 1; fi
|
|
||||||
docker-compose run --rm marlin $(MAKE) tests-single-local TEST_TARGET=$(TEST_TARGET) VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD) ONLY_TEST="$(ONLY_TEST)"
|
|
||||||
.PHONY: tests-single-local-docker
|
|
||||||
|
|
||||||
tests-all-local:
|
|
||||||
export PATH=./buildroot/bin/:./buildroot/tests/:${PATH} \
|
|
||||||
&& export VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) \
|
|
||||||
&& for TEST_TARGET in $$(./get_test_targets.py) ; do echo "Running tests for $$TEST_TARGET" ; run_tests . $$TEST_TARGET ; done
|
|
||||||
.PHONY: tests-all-local
|
|
||||||
|
|
||||||
tests-all-local-docker:
|
|
||||||
docker-compose run --rm marlin $(MAKE) tests-all-local VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD)
|
|
||||||
.PHONY: tests-all-local-docker
|
|
||||||
|
|
||||||
setup-local-docker:
|
|
||||||
docker-compose build
|
|
||||||
.PHONY: setup-local-docker
|
|
||||||
@@ -1,997 +0,0 @@
|
|||||||
# Marlin Firmware Arduino Project Makefile
|
|
||||||
#
|
|
||||||
# Makefile Based on:
|
|
||||||
# Arduino 0011 Makefile
|
|
||||||
# Arduino adaptation by mellis, eighthave, oli.keller
|
|
||||||
# Marlin adaption by Daid
|
|
||||||
# Marlin 2.0 support and RELOC_WORKAROUND by @marcio-ao
|
|
||||||
#
|
|
||||||
# This has been tested with Arduino 0022.
|
|
||||||
#
|
|
||||||
# This makefile allows you to build sketches from the command line
|
|
||||||
# without the Arduino environment (or Java).
|
|
||||||
#
|
|
||||||
# Detailed instructions for using the makefile:
|
|
||||||
#
|
|
||||||
# 1. Modify the line containing "ARDUINO_INSTALL_DIR" to point to the directory that
|
|
||||||
# contains the Arduino installation (for example, under macOS, this
|
|
||||||
# might be /Applications/Arduino.app/Contents/Resources/Java).
|
|
||||||
#
|
|
||||||
# 2. Modify the line containing "UPLOAD_PORT" to refer to the filename
|
|
||||||
# representing the USB or serial connection to your Arduino board
|
|
||||||
# (e.g. UPLOAD_PORT = /dev/tty.USB0). If the exact name of this file
|
|
||||||
# changes, you can use * as a wild card (e.g. UPLOAD_PORT = /dev/tty.usb*).
|
|
||||||
#
|
|
||||||
# 3. Set the line containing "MCU" to match your board's processor. Set
|
|
||||||
# "PROG_MCU" as the AVR part name corresponding to "MCU". You can use the
|
|
||||||
# following command to get a list of correspondences: `avrdude -c alf -p x`
|
|
||||||
# Older boards are atmega8 based, newer ones like Arduino Mini, Bluetooth
|
|
||||||
# or Diecimila have the atmega168. If you're using a LilyPad Arduino,
|
|
||||||
# change F_CPU to 8000000. If you are using Gen7 electronics, you
|
|
||||||
# probably need to use 20000000. Either way, you must regenerate
|
|
||||||
# the speed lookup table with create_speed_lookuptable.py.
|
|
||||||
#
|
|
||||||
# 4. Type "make" and press enter to compile/verify your program.
|
|
||||||
#
|
|
||||||
# 5. Type "make upload", reset your Arduino board, and press enter to
|
|
||||||
# upload your program to the Arduino board.
|
|
||||||
#
|
|
||||||
# Note that all settings at the top of this file can be overridden from
|
|
||||||
# the command line with, for example, "make HARDWARE_MOTHERBOARD=71"
|
|
||||||
#
|
|
||||||
# To compile for RAMPS (atmega2560) with Arduino 1.6.9 at root/arduino you would use...
|
|
||||||
#
|
|
||||||
# make ARDUINO_VERSION=10609 AVR_TOOLS_PATH=/root/arduino/hardware/tools/avr/bin/ \
|
|
||||||
# HARDWARE_MOTHERBOARD=1200 ARDUINO_INSTALL_DIR=/root/arduino
|
|
||||||
#
|
|
||||||
# To compile and upload simply add "upload" to the end of the line...
|
|
||||||
#
|
|
||||||
# make ARDUINO_VERSION=10609 AVR_TOOLS_PATH=/root/arduino/hardware/tools/avr/bin/ \
|
|
||||||
# HARDWARE_MOTHERBOARD=1200 ARDUINO_INSTALL_DIR=/root/arduino upload
|
|
||||||
#
|
|
||||||
# If uploading doesn't work try adding the parameter "AVRDUDE_PROGRAMMER=wiring" or
|
|
||||||
# start upload manually (using stk500) like so:
|
|
||||||
#
|
|
||||||
# avrdude -C /root/arduino/hardware/tools/avr/etc/avrdude.conf -v -p m2560 -c stk500 \
|
|
||||||
# -U flash:w:applet/Marlin.hex:i -P /dev/ttyUSB0
|
|
||||||
#
|
|
||||||
# Or, try disconnecting USB to power down and then reconnecting before running avrdude.
|
|
||||||
#
|
|
||||||
|
|
||||||
# This defines the board to compile for (see boards.h for your board's ID)
|
|
||||||
HARDWARE_MOTHERBOARD ?= 1020
|
|
||||||
|
|
||||||
ifeq ($(OS),Windows_NT)
|
|
||||||
# Windows
|
|
||||||
ARDUINO_INSTALL_DIR ?= ${HOME}/Arduino
|
|
||||||
ARDUINO_USER_DIR ?= ${HOME}/Arduino
|
|
||||||
else
|
|
||||||
UNAME_S := $(shell uname -s)
|
|
||||||
ifeq ($(UNAME_S),Linux)
|
|
||||||
# Linux
|
|
||||||
ARDUINO_INSTALL_DIR ?= /usr/share/arduino
|
|
||||||
ARDUINO_USER_DIR ?= ${HOME}/Arduino
|
|
||||||
endif
|
|
||||||
ifeq ($(UNAME_S),Darwin)
|
|
||||||
# Darwin (macOS)
|
|
||||||
ARDUINO_INSTALL_DIR ?= /Applications/Arduino.app/Contents/Java
|
|
||||||
ARDUINO_USER_DIR ?= ${HOME}/Documents/Arduino
|
|
||||||
AVR_TOOLS_PATH ?= /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Arduino source install directory, and version number
|
|
||||||
# On most linuxes this will be /usr/share/arduino
|
|
||||||
ARDUINO_INSTALL_DIR ?= ${HOME}/Arduino
|
|
||||||
ARDUINO_VERSION ?= 106
|
|
||||||
|
|
||||||
# The installed Libraries are in the User folder
|
|
||||||
ARDUINO_USER_DIR ?= ${HOME}/Arduino
|
|
||||||
|
|
||||||
# You can optionally set a path to the avr-gcc tools.
|
|
||||||
# Requires a trailing slash. For example, /usr/local/avr-gcc/bin/
|
|
||||||
AVR_TOOLS_PATH ?=
|
|
||||||
|
|
||||||
# Programmer configuration
|
|
||||||
UPLOAD_RATE ?= 57600
|
|
||||||
AVRDUDE_PROGRAMMER ?= arduino
|
|
||||||
# On most linuxes this will be /dev/ttyACM0 or /dev/ttyACM1
|
|
||||||
UPLOAD_PORT ?= /dev/ttyUSB0
|
|
||||||
|
|
||||||
# Directory used to build files in, contains all the build files, from object
|
|
||||||
# files to the final hex file on linux it is best to put an absolute path
|
|
||||||
# like /home/username/tmp .
|
|
||||||
BUILD_DIR ?= applet
|
|
||||||
|
|
||||||
# This defines whether Liquid_TWI2 support will be built
|
|
||||||
LIQUID_TWI2 ?= 0
|
|
||||||
|
|
||||||
# This defines if Wire is needed
|
|
||||||
WIRE ?= 0
|
|
||||||
|
|
||||||
# This defines if Tone is needed (i.e SPEAKER is defined in Configuration.h)
|
|
||||||
# Disabling this (and SPEAKER) saves approximatively 350 bytes of memory.
|
|
||||||
TONE ?= 1
|
|
||||||
|
|
||||||
# This defines if U8GLIB is needed (may require RELOC_WORKAROUND)
|
|
||||||
U8GLIB ?= 0
|
|
||||||
|
|
||||||
# This defines whether to include the Trinamic TMCStepper library
|
|
||||||
TMC ?= 0
|
|
||||||
|
|
||||||
# This defines whether to include the AdaFruit NeoPixel library
|
|
||||||
NEOPIXEL ?= 0
|
|
||||||
|
|
||||||
############
|
|
||||||
# Try to automatically determine whether RELOC_WORKAROUND is needed based
|
|
||||||
# on GCC versions:
|
|
||||||
# https://www.avrfreaks.net/comment/1789106#comment-1789106
|
|
||||||
|
|
||||||
CC_MAJ:=$(shell $(CC) -dM -E - < /dev/null | grep __GNUC__ | cut -f3 -d\ )
|
|
||||||
CC_MIN:=$(shell $(CC) -dM -E - < /dev/null | grep __GNUC_MINOR__ | cut -f3 -d\ )
|
|
||||||
CC_PATCHLEVEL:=$(shell $(CC) -dM -E - < /dev/null | grep __GNUC_PATCHLEVEL__ | cut -f3 -d\ )
|
|
||||||
CC_VER:=$(shell echo $$(( $(CC_MAJ) * 10000 + $(CC_MIN) * 100 + $(CC_PATCHLEVEL) )))
|
|
||||||
ifeq ($(shell test $(CC_VER) -lt 40901 && echo 1),1)
|
|
||||||
@echo This version of GCC is likely broken. Enabling relocation workaround.
|
|
||||||
RELOC_WORKAROUND = 1
|
|
||||||
endif
|
|
||||||
|
|
||||||
############################################################################
|
|
||||||
# Below here nothing should be changed...
|
|
||||||
|
|
||||||
# Here the Arduino variant is selected by the board type
|
|
||||||
# HARDWARE_VARIANT = "arduino", "Sanguino", "Gen7", ...
|
|
||||||
# MCU = "atmega1280", "Mega2560", "atmega2560", "atmega644p", ...
|
|
||||||
|
|
||||||
ifeq ($(HARDWARE_MOTHERBOARD),0)
|
|
||||||
|
|
||||||
# No motherboard selected
|
|
||||||
|
|
||||||
#
|
|
||||||
# RAMPS 1.3 / 1.4 - ATmega1280, ATmega2560
|
|
||||||
#
|
|
||||||
|
|
||||||
# MEGA/RAMPS up to 1.2
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1000)
|
|
||||||
|
|
||||||
# RAMPS 1.3 (Power outputs: Hotend, Fan, Bed)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1010)
|
|
||||||
# RAMPS 1.3 (Power outputs: Hotend0, Hotend1, Bed)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1011)
|
|
||||||
# RAMPS 1.3 (Power outputs: Hotend, Fan0, Fan1)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1012)
|
|
||||||
# RAMPS 1.3 (Power outputs: Hotend0, Hotend1, Fan)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1013)
|
|
||||||
# RAMPS 1.3 (Power outputs: Spindle, Controller Fan)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1014)
|
|
||||||
|
|
||||||
# RAMPS 1.4 (Power outputs: Hotend, Fan, Bed)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1020)
|
|
||||||
# RAMPS 1.4 (Power outputs: Hotend0, Hotend1, Bed)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1021)
|
|
||||||
# RAMPS 1.4 (Power outputs: Hotend, Fan0, Fan1)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1022)
|
|
||||||
# RAMPS 1.4 (Power outputs: Hotend0, Hotend1, Fan)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1023)
|
|
||||||
# RAMPS 1.4 (Power outputs: Spindle, Controller Fan)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1024)
|
|
||||||
|
|
||||||
# RAMPS Plus 3DYMY (Power outputs: Hotend, Fan, Bed)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1030)
|
|
||||||
# RAMPS Plus 3DYMY (Power outputs: Hotend0, Hotend1, Bed)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1031)
|
|
||||||
# RAMPS Plus 3DYMY (Power outputs: Hotend, Fan0, Fan1)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1032)
|
|
||||||
# RAMPS Plus 3DYMY (Power outputs: Hotend0, Hotend1, Fan)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1033)
|
|
||||||
# RAMPS Plus 3DYMY (Power outputs: Spindle, Controller Fan)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1034)
|
|
||||||
|
|
||||||
#
|
|
||||||
# RAMPS Derivatives - ATmega1280, ATmega2560
|
|
||||||
#
|
|
||||||
|
|
||||||
# 3Drag Controller
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1100)
|
|
||||||
# Velleman K8200 Controller (derived from 3Drag Controller)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1101)
|
|
||||||
# Velleman K8400 Controller (derived from 3Drag Controller)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1102)
|
|
||||||
# Velleman K8600 Controller (Vertex Nano)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1103)
|
|
||||||
# Velleman K8800 Controller (Vertex Delta)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1104)
|
|
||||||
# 2PrintBeta BAM&DICE with STK drivers
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1105)
|
|
||||||
# 2PrintBeta BAM&DICE Due with STK drivers
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1106)
|
|
||||||
# MKS BASE v1.0
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1107)
|
|
||||||
# MKS v1.4 with A4982 stepper drivers
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1108)
|
|
||||||
# MKS v1.5 with Allegro A4982 stepper drivers
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1109)
|
|
||||||
# MKS v1.6 with Allegro A4982 stepper drivers
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1110)
|
|
||||||
# MKS BASE 1.0 with Heroic HR4982 stepper drivers
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1111)
|
|
||||||
# MKS GEN v1.3 or 1.4
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1112)
|
|
||||||
# MKS GEN L
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1113)
|
|
||||||
# zrib V2.0 control board (Chinese RAMPS replica)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1114)
|
|
||||||
# BigTreeTech or BIQU KFB2.0
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1115)
|
|
||||||
# Felix 2.0+ Electronics Board (RAMPS like)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1116)
|
|
||||||
# Invent-A-Part RigidBoard
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1117)
|
|
||||||
# Invent-A-Part RigidBoard V2
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1118)
|
|
||||||
# Sainsmart 2-in-1 board
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1119)
|
|
||||||
# Ultimaker
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1120)
|
|
||||||
# Ultimaker (Older electronics. Pre 1.5.4. This is rare)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1121)
|
|
||||||
MCU ?= atmega1280
|
|
||||||
PROG_MCU ?= m1280
|
|
||||||
|
|
||||||
# Azteeg X3
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1122)
|
|
||||||
# Azteeg X3 Pro
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1123)
|
|
||||||
# Ultimainboard 2.x (Uses TEMP_SENSOR 20)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1124)
|
|
||||||
# Rumba
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1125)
|
|
||||||
# Raise3D Rumba
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1126)
|
|
||||||
# Rapide Lite RL200 Rumba
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1127)
|
|
||||||
# Formbot T-Rex 2 Plus
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1128)
|
|
||||||
# Formbot T-Rex 3
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1129)
|
|
||||||
# Formbot Raptor
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1130)
|
|
||||||
# Formbot Raptor 2
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1131)
|
|
||||||
# bq ZUM Mega 3D
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1132)
|
|
||||||
# MakeBoard Mini v2.1.2 is a control board sold by MicroMake
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1133)
|
|
||||||
# TriGorilla Anycubic version 1.3 based on RAMPS EFB
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1134)
|
|
||||||
# TriGorilla Anycubic version 1.4 based on RAMPS EFB
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1135)
|
|
||||||
# TriGorilla Anycubic version 1.4 Rev 1.1
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1136)
|
|
||||||
# Creality: Ender-4, CR-8
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1137)
|
|
||||||
# Creality: CR10S, CR20, CR-X
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1138)
|
|
||||||
# Dagoma F5
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1139)
|
|
||||||
# FYSETC F6 1.3
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1140)
|
|
||||||
# FYSETC F6 1.5
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1141)
|
|
||||||
# Duplicator i3 Plus
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1142)
|
|
||||||
# VORON
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1143)
|
|
||||||
# TRONXY V3 1.0
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1144)
|
|
||||||
# Z-Bolt X Series
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1145)
|
|
||||||
# TT OSCAR
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1146)
|
|
||||||
# Overlord/Overlord Pro
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1147)
|
|
||||||
# ADIMLab Gantry v1
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1148)
|
|
||||||
# ADIMLab Gantry v2
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1149)
|
|
||||||
# BIQU Tango V1
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1150)
|
|
||||||
# MKS GEN L V2
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1151)
|
|
||||||
# MKS GEN L V2.1
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1152)
|
|
||||||
# Copymaster 3D
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1153)
|
|
||||||
# Ortur 4
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1154)
|
|
||||||
# Tenlog D3 Hero
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1155)
|
|
||||||
|
|
||||||
#
|
|
||||||
# RAMBo and derivatives
|
|
||||||
#
|
|
||||||
|
|
||||||
# Rambo
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1200)
|
|
||||||
# Mini-Rambo
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1201)
|
|
||||||
# Mini-Rambo 1.0a
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1202)
|
|
||||||
# Einsy Rambo
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1203)
|
|
||||||
# Einsy Retro
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1204)
|
|
||||||
# abee Scoovo X9H
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1205)
|
|
||||||
# Rambo ThinkerV2
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1206)
|
|
||||||
|
|
||||||
#
|
|
||||||
# Other ATmega1280, ATmega2560
|
|
||||||
#
|
|
||||||
|
|
||||||
# Cartesio CN Controls V11
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1300)
|
|
||||||
# Cartesio CN Controls V12
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1301)
|
|
||||||
# Cartesio CN Controls V15
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1302)
|
|
||||||
# Cheaptronic v1.0
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1303)
|
|
||||||
# Cheaptronic v2.0
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1304)
|
|
||||||
# Makerbot Mightyboard Revision E
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1305)
|
|
||||||
# Megatronics
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1306)
|
|
||||||
# Megatronics v2.0
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1307)
|
|
||||||
# Megatronics v3.0
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1308)
|
|
||||||
# Megatronics v3.1
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1309)
|
|
||||||
# Megatronics v3.2
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1310)
|
|
||||||
# Elefu Ra Board (v3)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1311)
|
|
||||||
# Leapfrog
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1312)
|
|
||||||
# Mega controller
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1313)
|
|
||||||
# Geeetech GT2560 Rev B for Mecreator2
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1314)
|
|
||||||
# Geeetech GT2560 Rev. A
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1315)
|
|
||||||
# Geeetech GT2560 Rev. A+ (with auto level probe)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1316)
|
|
||||||
# Geeetech GT2560 Rev B for A10(M/D)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1317)
|
|
||||||
# Geeetech GT2560 Rev B for A20(M/D)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1318)
|
|
||||||
# Einstart retrofit
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1319)
|
|
||||||
# Wanhao 0ne+ i3 Mini
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1320)
|
|
||||||
|
|
||||||
#
|
|
||||||
# ATmega1281, ATmega2561
|
|
||||||
#
|
|
||||||
|
|
||||||
# Minitronics v1.0/1.1
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1400)
|
|
||||||
MCU ?= atmega1281
|
|
||||||
PROG_MCU ?= m1281
|
|
||||||
# Silvergate v1.0
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1401)
|
|
||||||
MCU ?= atmega1281
|
|
||||||
PROG_MCU ?= m1281
|
|
||||||
|
|
||||||
#
|
|
||||||
# Sanguinololu and Derivatives - ATmega644P, ATmega1284P
|
|
||||||
#
|
|
||||||
|
|
||||||
# Sanguinololu < 1.2
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1500)
|
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
|
||||||
MCU ?= atmega644p
|
|
||||||
PROG_MCU ?= m644p
|
|
||||||
# Sanguinololu 1.2 and above
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1501)
|
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
|
||||||
MCU ?= atmega644p
|
|
||||||
PROG_MCU ?= m644p
|
|
||||||
# Melzi
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1502)
|
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
|
||||||
MCU ?= atmega644p
|
|
||||||
PROG_MCU ?= m644p
|
|
||||||
# Melzi V2.0
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1503)
|
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
|
||||||
MCU ?= atmega1284p
|
|
||||||
PROG_MCU ?= m1284p
|
|
||||||
# Melzi with ATmega1284 (MaKr3d version)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1504)
|
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
|
||||||
MCU ?= atmega1284p
|
|
||||||
PROG_MCU ?= m1284p
|
|
||||||
# Melzi Creality3D board (for CR-10 etc)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1505)
|
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
|
||||||
MCU ?= atmega1284p
|
|
||||||
PROG_MCU ?= m1284p
|
|
||||||
# Melzi Malyan M150 board
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1506)
|
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
|
||||||
MCU ?= atmega1284p
|
|
||||||
PROG_MCU ?= m1284p
|
|
||||||
# Tronxy X5S
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1507)
|
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
|
||||||
MCU ?= atmega1284p
|
|
||||||
PROG_MCU ?= m1284p
|
|
||||||
# STB V1.1
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1508)
|
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
|
||||||
MCU ?= atmega1284p
|
|
||||||
PROG_MCU ?= m1284p
|
|
||||||
# Azteeg X1
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1509)
|
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
|
||||||
MCU ?= atmega1284p
|
|
||||||
PROG_MCU ?= m1284p
|
|
||||||
# Anet 1.0 (Melzi clone)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1510)
|
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
|
||||||
MCU ?= atmega1284p
|
|
||||||
PROG_MCU ?= m1284p
|
|
||||||
|
|
||||||
#
|
|
||||||
# Other ATmega644P, ATmega644, ATmega1284P
|
|
||||||
#
|
|
||||||
|
|
||||||
# Gen3 Monolithic Electronics
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1600)
|
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
|
||||||
MCU ?= atmega644p
|
|
||||||
PROG_MCU ?= m644p
|
|
||||||
# Gen3+
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1601)
|
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
|
||||||
MCU ?= atmega644p
|
|
||||||
PROG_MCU ?= m644p
|
|
||||||
# Gen6
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1602)
|
|
||||||
HARDWARE_VARIANT ?= Gen6
|
|
||||||
MCU ?= atmega644p
|
|
||||||
PROG_MCU ?= m644p
|
|
||||||
# Gen6 deluxe
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1603)
|
|
||||||
HARDWARE_VARIANT ?= Gen6
|
|
||||||
MCU ?= atmega644p
|
|
||||||
PROG_MCU ?= m644p
|
|
||||||
# Gen7 custom (Alfons3 Version)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1604)
|
|
||||||
HARDWARE_VARIANT ?= Gen7
|
|
||||||
MCU ?= atmega644
|
|
||||||
PROG_MCU ?= m644
|
|
||||||
F_CPU ?= 20000000
|
|
||||||
# Gen7 v1.1, v1.2
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1605)
|
|
||||||
HARDWARE_VARIANT ?= Gen7
|
|
||||||
MCU ?= atmega644p
|
|
||||||
PROG_MCU ?= m644p
|
|
||||||
F_CPU ?= 20000000
|
|
||||||
# Gen7 v1.3
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1606)
|
|
||||||
HARDWARE_VARIANT ?= Gen7
|
|
||||||
MCU ?= atmega644p
|
|
||||||
PROG_MCU ?= m644p
|
|
||||||
F_CPU ?= 20000000
|
|
||||||
# Gen7 v1.4
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1607)
|
|
||||||
HARDWARE_VARIANT ?= Gen7
|
|
||||||
MCU ?= atmega1284p
|
|
||||||
PROG_MCU ?= m1284p
|
|
||||||
F_CPU ?= 20000000
|
|
||||||
# Alpha OMCA board
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1608)
|
|
||||||
HARDWARE_VARIANT ?= SanguinoA
|
|
||||||
MCU ?= atmega644
|
|
||||||
PROG_MCU ?= m644
|
|
||||||
# Final OMCA board
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1609)
|
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
|
||||||
MCU ?= atmega644p
|
|
||||||
PROG_MCU ?= m644p
|
|
||||||
# Sethi 3D_1
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1610)
|
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
|
||||||
MCU ?= atmega644p
|
|
||||||
PROG_MCU ?= m644p
|
|
||||||
|
|
||||||
#
|
|
||||||
# Teensyduino - AT90USB1286, AT90USB1286P
|
|
||||||
#
|
|
||||||
|
|
||||||
# Teensylu
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1700)
|
|
||||||
HARDWARE_VARIANT ?= Teensy
|
|
||||||
MCU ?= at90usb1286
|
|
||||||
PROG_MCU ?= usb1286
|
|
||||||
# Printrboard (AT90USB1286)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1701)
|
|
||||||
HARDWARE_VARIANT ?= Teensy
|
|
||||||
MCU ?= at90usb1286
|
|
||||||
PROG_MCU ?= usb1286
|
|
||||||
# Printrboard Revision F (AT90USB1286)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1702)
|
|
||||||
HARDWARE_VARIANT ?= Teensy
|
|
||||||
MCU ?= at90usb1286
|
|
||||||
PROG_MCU ?= usb1286
|
|
||||||
# Brainwave (AT90USB646)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1703)
|
|
||||||
HARDWARE_VARIANT ?= Teensy
|
|
||||||
MCU ?= at90usb646
|
|
||||||
PROG_MCU ?= usb646
|
|
||||||
# Brainwave Pro (AT90USB1286)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1704)
|
|
||||||
HARDWARE_VARIANT ?= Teensy
|
|
||||||
MCU ?= at90usb1286
|
|
||||||
PROG_MCU ?= usb1286
|
|
||||||
# SAV Mk-I (AT90USB1286)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1705)
|
|
||||||
HARDWARE_VARIANT ?= Teensy
|
|
||||||
MCU ?= at90usb1286
|
|
||||||
PROG_MCU ?= usb1286
|
|
||||||
# Teensy++2.0 (AT90USB1286)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1706)
|
|
||||||
HARDWARE_VARIANT ?= Teensy
|
|
||||||
MCU ?= at90usb1286
|
|
||||||
PROG_MCU ?= usb1286
|
|
||||||
# 5DPrint D8 Driver Board
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1707)
|
|
||||||
HARDWARE_VARIANT ?= Teensy
|
|
||||||
MCU ?= at90usb1286
|
|
||||||
PROG_MCU ?= usb1286
|
|
||||||
|
|
||||||
# UltiMachine Archim1 (with DRV8825 drivers)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),3023)
|
|
||||||
HARDWARE_VARIANT ?= archim
|
|
||||||
MCPU = cortex-m3
|
|
||||||
F_CPU = 84000000
|
|
||||||
IS_MCU = 0
|
|
||||||
# UltiMachine Archim2 (with TMC2130 drivers)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),3024)
|
|
||||||
HARDWARE_VARIANT ?= archim
|
|
||||||
MCPU = cortex-m3
|
|
||||||
F_CPU = 84000000
|
|
||||||
IS_MCU = 0
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Be sure to regenerate speed_lookuptable.h with create_speed_lookuptable.py
|
|
||||||
# if you are setting this to something other than 16MHz
|
|
||||||
# Do not put the UL suffix, it's done later on.
|
|
||||||
# Set to 16Mhz if not yet set.
|
|
||||||
F_CPU ?= 16000000
|
|
||||||
|
|
||||||
# Set to microcontroller if IS_MCU not yet set
|
|
||||||
IS_MCU ?= 1
|
|
||||||
|
|
||||||
ifeq ($(IS_MCU),1)
|
|
||||||
# Set to arduino, ATmega2560 if not yet set.
|
|
||||||
HARDWARE_VARIANT ?= arduino
|
|
||||||
MCU ?= atmega2560
|
|
||||||
PROG_MCU ?= m2560
|
|
||||||
|
|
||||||
TOOL_PREFIX = avr
|
|
||||||
MCU_FLAGS = -mmcu=$(MCU)
|
|
||||||
SIZE_FLAGS = --mcu=$(MCU) -C
|
|
||||||
else
|
|
||||||
TOOL_PREFIX = arm-none-eabi
|
|
||||||
CPU_FLAGS = -mthumb -mcpu=$(MCPU)
|
|
||||||
SIZE_FLAGS = -A
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Arduino contained the main source code for the Arduino
|
|
||||||
# Libraries, the "hardware variant" are for boards
|
|
||||||
# that derives from that, and their source are present in
|
|
||||||
# the main Marlin source directory
|
|
||||||
|
|
||||||
TARGET = $(notdir $(CURDIR))
|
|
||||||
|
|
||||||
# VPATH tells make to look into these directory for source files,
|
|
||||||
# there is no need to specify explicit pathnames as long as the
|
|
||||||
# directory is added here
|
|
||||||
|
|
||||||
# The Makefile for previous versions of Marlin used VPATH for all
|
|
||||||
# source files, but for Marlin 2.0, we use VPATH only for arduino
|
|
||||||
# library files.
|
|
||||||
|
|
||||||
VPATH = .
|
|
||||||
VPATH += $(BUILD_DIR)
|
|
||||||
VPATH += $(HARDWARE_SRC)
|
|
||||||
|
|
||||||
ifeq ($(HARDWARE_VARIANT), $(filter $(HARDWARE_VARIANT),arduino Teensy Sanguino))
|
|
||||||
# Old libraries (avr-core 1.6.21 < / Arduino < 1.6.8)
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SPI
|
|
||||||
# New libraries (avr-core >= 1.6.21 / Arduino >= 1.6.8)
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SPI/src
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(IS_MCU),1)
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/cores/arduino
|
|
||||||
|
|
||||||
# Old libraries (avr-core 1.6.21 < / Arduino < 1.6.8)
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SPI
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SoftwareSerial
|
|
||||||
# New libraries (avr-core >= 1.6.21 / Arduino >= 1.6.8)
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SPI/src
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SoftwareSerial/src
|
|
||||||
endif
|
|
||||||
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidCrystal/src
|
|
||||||
|
|
||||||
ifeq ($(LIQUID_TWI2), 1)
|
|
||||||
WIRE = 1
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidTWI2
|
|
||||||
endif
|
|
||||||
ifeq ($(WIRE), 1)
|
|
||||||
# Old libraries (avr-core 1.6.21 / Arduino < 1.6.8)
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/Wire
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/Wire/utility
|
|
||||||
# New libraries (avr-core >= 1.6.21 / Arduino >= 1.6.8)
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/Wire/src
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/Wire/src/utility
|
|
||||||
endif
|
|
||||||
ifeq ($(NEOPIXEL), 1)
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Adafruit_NeoPixel
|
|
||||||
endif
|
|
||||||
ifeq ($(U8GLIB), 1)
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/U8glib
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/U8glib/csrc
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/U8glib/cppsrc
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/U8glib/fntsrc
|
|
||||||
endif
|
|
||||||
ifeq ($(TMC), 1)
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/TMCStepper/src
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/TMCStepper/src/source
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(HARDWARE_VARIANT), arduino)
|
|
||||||
HARDWARE_SUB_VARIANT ?= mega
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/variants/$(HARDWARE_SUB_VARIANT)
|
|
||||||
else ifeq ($(HARDWARE_VARIANT), Sanguino)
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/marlin/avr/variants/sanguino
|
|
||||||
else ifeq ($(HARDWARE_VARIANT), archim)
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/packages/ultimachine/hardware/sam/1.6.9-b/system/libsam
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/packages/ultimachine/hardware/sam/1.6.9-b/system/CMSIS/CMSIS/Include/
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/packages/ultimachine/hardware/sam/1.6.9-b/system/CMSIS/Device/ATMEL/
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/packages/ultimachine/hardware/sam/1.6.9-b/cores/arduino
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/packages/ultimachine/hardware/sam/1.6.9-b/cores/arduino/avr
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/packages/ultimachine/hardware/sam/1.6.9-b/cores/arduino/USB
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/packages/ultimachine/hardware/sam/1.6.9-b/libraries/Wire/src
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/packages/ultimachine/hardware/sam/1.6.9-b/libraries/SPI/src
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/packages/ultimachine/hardware/sam/1.6.9-b/libraries/U8glib/src/clib
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/packages/ultimachine/hardware/sam/1.6.9-b/variants/archim
|
|
||||||
LDSCRIPT = $(ARDUINO_INSTALL_DIR)/packages/ultimachine/hardware/sam/1.6.9-b/variants/archim/linker_scripts/gcc/flash.ld
|
|
||||||
LDLIBS = $(ARDUINO_INSTALL_DIR)/packages/ultimachine/hardware/sam/1.6.9-b/variants/archim/libsam_sam3x8e_gcc_rel.a
|
|
||||||
else
|
|
||||||
HARDWARE_SUB_VARIANT ?= standard
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/$(HARDWARE_VARIANT)/variants/$(HARDWARE_SUB_VARIANT)
|
|
||||||
endif
|
|
||||||
|
|
||||||
LIB_SRC = wiring.c \
|
|
||||||
wiring_analog.c wiring_digital.c \
|
|
||||||
wiring_shift.c WInterrupts.c hooks.c
|
|
||||||
|
|
||||||
ifeq ($(HARDWARE_VARIANT), archim)
|
|
||||||
LIB_ASRC += wiring_pulse_asm.S
|
|
||||||
else
|
|
||||||
LIB_SRC += wiring_pulse.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(HARDWARE_VARIANT), Teensy)
|
|
||||||
LIB_SRC = wiring.c
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/teensy/cores/teensy
|
|
||||||
endif
|
|
||||||
|
|
||||||
LIB_CXXSRC = WMath.cpp WString.cpp Print.cpp SPI.cpp
|
|
||||||
|
|
||||||
ifeq ($(NEOPIXEL), 1)
|
|
||||||
LIB_CXXSRC += Adafruit_NeoPixel.cpp
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(LIQUID_TWI2), 0)
|
|
||||||
LIB_CXXSRC += LiquidCrystal.cpp
|
|
||||||
else
|
|
||||||
LIB_SRC += twi.c
|
|
||||||
LIB_CXXSRC += Wire.cpp LiquidTWI2.cpp
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(WIRE), 1)
|
|
||||||
LIB_SRC += twi.c
|
|
||||||
LIB_CXXSRC += Wire.cpp
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(TONE), 1)
|
|
||||||
LIB_CXXSRC += Tone.cpp
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(U8GLIB), 1)
|
|
||||||
LIB_CXXSRC += U8glib.cpp
|
|
||||||
LIB_SRC += u8g_ll_api.c u8g_bitmap.c u8g_clip.c u8g_com_null.c u8g_delay.c \
|
|
||||||
u8g_page.c u8g_pb.c u8g_pb16h1.c u8g_rect.c u8g_state.c u8g_font.c \
|
|
||||||
u8g_font_6x13.c u8g_font_04b_03.c u8g_font_5x8.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(TMC), 1)
|
|
||||||
LIB_CXXSRC += TMCStepper.cpp COOLCONF.cpp DRV_STATUS.cpp IHOLD_IRUN.cpp \
|
|
||||||
CHOPCONF.cpp GCONF.cpp PWMCONF.cpp DRV_CONF.cpp DRVCONF.cpp DRVCTRL.cpp \
|
|
||||||
DRVSTATUS.cpp ENCMODE.cpp RAMP_STAT.cpp SGCSCONF.cpp SHORT_CONF.cpp \
|
|
||||||
SMARTEN.cpp SW_MODE.cpp SW_SPI.cpp TMC2130Stepper.cpp TMC2208Stepper.cpp \
|
|
||||||
TMC2209Stepper.cpp TMC2660Stepper.cpp TMC5130Stepper.cpp TMC5160Stepper.cpp
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(RELOC_WORKAROUND), 1)
|
|
||||||
LD_PREFIX=-nodefaultlibs
|
|
||||||
LD_SUFFIX=-lm -lgcc -lc -lgcc
|
|
||||||
endif
|
|
||||||
|
|
||||||
#Check for Arduino 1.0.0 or higher and use the correct source files for that version
|
|
||||||
ifeq ($(shell [ $(ARDUINO_VERSION) -ge 100 ] && echo true), true)
|
|
||||||
LIB_CXXSRC += main.cpp
|
|
||||||
else
|
|
||||||
LIB_SRC += pins_arduino.c main.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
FORMAT = ihex
|
|
||||||
|
|
||||||
# Name of this Makefile (used for "make depend").
|
|
||||||
MAKEFILE = Makefile
|
|
||||||
|
|
||||||
# Debugging format.
|
|
||||||
# Native formats for AVR-GCC's -g are stabs [default], or dwarf-2.
|
|
||||||
# AVR (extended) COFF requires stabs, plus an avr-objcopy run.
|
|
||||||
DEBUG = stabs
|
|
||||||
|
|
||||||
OPT = s
|
|
||||||
|
|
||||||
DEFINES ?=
|
|
||||||
|
|
||||||
# Program settings
|
|
||||||
CC = $(AVR_TOOLS_PATH)$(TOOL_PREFIX)-gcc
|
|
||||||
CXX = $(AVR_TOOLS_PATH)$(TOOL_PREFIX)-g++
|
|
||||||
OBJCOPY = $(AVR_TOOLS_PATH)$(TOOL_PREFIX)-objcopy
|
|
||||||
OBJDUMP = $(AVR_TOOLS_PATH)$(TOOL_PREFIX)-objdump
|
|
||||||
AR = $(AVR_TOOLS_PATH)$(TOOL_PREFIX)-ar
|
|
||||||
SIZE = $(AVR_TOOLS_PATH)$(TOOL_PREFIX)-size
|
|
||||||
NM = $(AVR_TOOLS_PATH)$(TOOL_PREFIX)-nm
|
|
||||||
AVRDUDE = avrdude
|
|
||||||
REMOVE = rm -f
|
|
||||||
MV = mv -f
|
|
||||||
|
|
||||||
# Place -D or -U options here
|
|
||||||
CDEFS = -DF_CPU=$(F_CPU)UL ${addprefix -D , $(DEFINES)} -DARDUINO=$(ARDUINO_VERSION)
|
|
||||||
CXXDEFS = $(CDEFS)
|
|
||||||
|
|
||||||
ifeq ($(HARDWARE_VARIANT), Teensy)
|
|
||||||
CDEFS += -DUSB_SERIAL
|
|
||||||
LIB_SRC += usb.c pins_teensy.c
|
|
||||||
LIB_CXXSRC += usb_api.cpp
|
|
||||||
|
|
||||||
else ifeq ($(HARDWARE_VARIANT), archim)
|
|
||||||
CDEFS += -DARDUINO_SAM_ARCHIM -DARDUINO_ARCH_SAM -D__SAM3X8E__
|
|
||||||
CDEFS += -DUSB_VID=0x27B1 -DUSB_PID=0x0001 -DUSBCON
|
|
||||||
CDEFS += '-DUSB_MANUFACTURER="UltiMachine"' '-DUSB_PRODUCT_STRING="Archim"'
|
|
||||||
|
|
||||||
LIB_CXXSRC += variant.cpp IPAddress.cpp Reset.cpp RingBuffer.cpp Stream.cpp \
|
|
||||||
UARTClass.cpp USARTClass.cpp abi.cpp new.cpp watchdog.cpp CDC.cpp \
|
|
||||||
PluggableUSB.cpp USBCore.cpp
|
|
||||||
|
|
||||||
LIB_SRC += cortex_handlers.c iar_calls_sam3.c syscalls_sam3.c dtostrf.c itoa.c
|
|
||||||
|
|
||||||
ifeq ($(U8GLIB), 1)
|
|
||||||
LIB_SRC += u8g_com_api.c u8g_pb32h1.c
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Add all the source directories as include directories too
|
|
||||||
CINCS = ${addprefix -I ,${VPATH}}
|
|
||||||
CXXINCS = ${addprefix -I ,${VPATH}}
|
|
||||||
|
|
||||||
# Silence warnings for library code (won't work for .h files, unfortunately)
|
|
||||||
LIBWARN = -w -Wno-packed-bitfield-compat
|
|
||||||
|
|
||||||
# Compiler flag to set the C/CPP Standard level.
|
|
||||||
CSTANDARD = -std=gnu99
|
|
||||||
CXXSTANDARD = -std=gnu++11
|
|
||||||
CDEBUG = -g$(DEBUG)
|
|
||||||
CWARN = -Wall -Wstrict-prototypes -Wno-packed-bitfield-compat -Wno-pragmas -Wunused-parameter
|
|
||||||
CXXWARN = -Wall -Wno-packed-bitfield-compat -Wno-pragmas -Wunused-parameter
|
|
||||||
CTUNING = -fsigned-char -funsigned-bitfields -fno-exceptions \
|
|
||||||
-fshort-enums -ffunction-sections -fdata-sections
|
|
||||||
ifneq ($(HARDWARE_MOTHERBOARD),)
|
|
||||||
CTUNING += -DMOTHERBOARD=${HARDWARE_MOTHERBOARD}
|
|
||||||
endif
|
|
||||||
|
|
||||||
#CEXTRA = -Wa,-adhlns=$(<:.c=.lst)
|
|
||||||
CXXEXTRA = -fno-use-cxa-atexit -fno-threadsafe-statics -fno-rtti
|
|
||||||
CFLAGS := $(CDEBUG) $(CDEFS) $(CINCS) -O$(OPT) $(CEXTRA) $(CTUNING) $(CSTANDARD)
|
|
||||||
CXXFLAGS := $(CDEFS) $(CINCS) -O$(OPT) $(CXXEXTRA) $(CTUNING) $(CXXSTANDARD)
|
|
||||||
ASFLAGS := $(CDEFS)
|
|
||||||
#ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs
|
|
||||||
|
|
||||||
ifeq ($(HARDWARE_VARIANT), archim)
|
|
||||||
LD_PREFIX = -Wl,--gc-sections,-Map,Marlin.ino.map,--cref,--check-sections,--entry=Reset_Handler,--unresolved-symbols=report-all,--warn-common,--warn-section-align
|
|
||||||
LD_SUFFIX = $(LDLIBS)
|
|
||||||
|
|
||||||
LDFLAGS = -lm -T$(LDSCRIPT) -u _sbrk -u link -u _close -u _fstat -u _isatty
|
|
||||||
LDFLAGS += -u _lseek -u _read -u _write -u _exit -u kill -u _getpid
|
|
||||||
else
|
|
||||||
LD_PREFIX = -Wl,--gc-sections,--relax
|
|
||||||
LDFLAGS = -lm
|
|
||||||
CTUNING += -flto
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Programming support using avrdude. Settings and variables.
|
|
||||||
AVRDUDE_PORT = $(UPLOAD_PORT)
|
|
||||||
AVRDUDE_WRITE_FLASH = -Uflash:w:$(BUILD_DIR)/$(TARGET).hex:i
|
|
||||||
ifeq ($(shell uname -s), Linux)
|
|
||||||
AVRDUDE_CONF = /etc/avrdude/avrdude.conf
|
|
||||||
else
|
|
||||||
AVRDUDE_CONF = $(ARDUINO_INSTALL_DIR)/hardware/tools/avr/etc/avrdude.conf
|
|
||||||
endif
|
|
||||||
AVRDUDE_FLAGS = -D -C$(AVRDUDE_CONF) \
|
|
||||||
-p$(PROG_MCU) -P$(AVRDUDE_PORT) -c$(AVRDUDE_PROGRAMMER) \
|
|
||||||
-b$(UPLOAD_RATE)
|
|
||||||
|
|
||||||
# Since Marlin 2.0, the source files may be distributed into several
|
|
||||||
# different directories, so it is necessary to find them recursively
|
|
||||||
|
|
||||||
SRC = $(shell find src -name '*.c' -type f)
|
|
||||||
CXXSRC = $(shell find src -name '*.cpp' -type f)
|
|
||||||
|
|
||||||
# Define all object files.
|
|
||||||
OBJ = ${patsubst %.c, $(BUILD_DIR)/arduino/%.o, ${LIB_SRC}}
|
|
||||||
OBJ += ${patsubst %.cpp, $(BUILD_DIR)/arduino/%.o, ${LIB_CXXSRC}}
|
|
||||||
OBJ += ${patsubst %.S, $(BUILD_DIR)/arduino/%.o, ${LIB_ASRC}}
|
|
||||||
OBJ += ${patsubst %.c, $(BUILD_DIR)/%.o, ${SRC}}
|
|
||||||
OBJ += ${patsubst %.cpp, $(BUILD_DIR)/%.o, ${CXXSRC}}
|
|
||||||
|
|
||||||
# Define all listing files.
|
|
||||||
LST = $(LIB_ASRC:.S=.lst) $(LIB_CXXSRC:.cpp=.lst) $(LIB_SRC:.c=.lst)
|
|
||||||
|
|
||||||
# Combine all necessary flags and optional flags.
|
|
||||||
# Add target processor to flags.
|
|
||||||
ALL_CFLAGS = $(MCU_FLAGS) $(CPU_FLAGS) $(CFLAGS) -I.
|
|
||||||
ALL_CXXFLAGS = $(MCU_FLAGS) $(CPU_FLAGS) $(CXXFLAGS)
|
|
||||||
ALL_ASFLAGS = $(MCU_FLAGS) $(CPU_FLAGS) $(ASFLAGS) -x assembler-with-cpp
|
|
||||||
|
|
||||||
# set V=1 (eg, "make V=1") to print the full commands etc.
|
|
||||||
ifneq ($V,1)
|
|
||||||
Pecho=@echo
|
|
||||||
P=@
|
|
||||||
else
|
|
||||||
Pecho=@:
|
|
||||||
P=
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Create required build hierarchy if it does not exist
|
|
||||||
|
|
||||||
$(shell mkdir -p $(dir $(OBJ)))
|
|
||||||
|
|
||||||
# Default target.
|
|
||||||
all: sizeafter
|
|
||||||
|
|
||||||
build: elf hex bin
|
|
||||||
|
|
||||||
elf: $(BUILD_DIR)/$(TARGET).elf
|
|
||||||
bin: $(BUILD_DIR)/$(TARGET).bin
|
|
||||||
hex: $(BUILD_DIR)/$(TARGET).hex
|
|
||||||
eep: $(BUILD_DIR)/$(TARGET).eep
|
|
||||||
lss: $(BUILD_DIR)/$(TARGET).lss
|
|
||||||
sym: $(BUILD_DIR)/$(TARGET).sym
|
|
||||||
|
|
||||||
# Program the device.
|
|
||||||
# Do not try to reset an Arduino if it's not one
|
|
||||||
upload: $(BUILD_DIR)/$(TARGET).hex
|
|
||||||
ifeq (${AVRDUDE_PROGRAMMER}, arduino)
|
|
||||||
stty hup < $(UPLOAD_PORT); true
|
|
||||||
endif
|
|
||||||
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH)
|
|
||||||
ifeq (${AVRDUDE_PROGRAMMER}, arduino)
|
|
||||||
stty -hup < $(UPLOAD_PORT); true
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Display size of file.
|
|
||||||
HEXSIZE = $(SIZE) --target=$(FORMAT) $(BUILD_DIR)/$(TARGET).hex
|
|
||||||
ELFSIZE = $(SIZE) $(SIZE_FLAGS) $(BUILD_DIR)/$(TARGET).elf; \
|
|
||||||
$(SIZE) $(BUILD_DIR)/$(TARGET).elf
|
|
||||||
sizebefore:
|
|
||||||
$P if [ -f $(BUILD_DIR)/$(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(HEXSIZE); echo; fi
|
|
||||||
|
|
||||||
sizeafter: build
|
|
||||||
$P if [ -f $(BUILD_DIR)/$(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi
|
|
||||||
|
|
||||||
|
|
||||||
# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.
|
|
||||||
COFFCONVERT=$(OBJCOPY) --debugging \
|
|
||||||
--change-section-address .data-0x800000 \
|
|
||||||
--change-section-address .bss-0x800000 \
|
|
||||||
--change-section-address .noinit-0x800000 \
|
|
||||||
--change-section-address .eeprom-0x810000
|
|
||||||
|
|
||||||
|
|
||||||
coff: $(BUILD_DIR)/$(TARGET).elf
|
|
||||||
$(COFFCONVERT) -O coff-avr $(BUILD_DIR)/$(TARGET).elf $(TARGET).cof
|
|
||||||
|
|
||||||
|
|
||||||
extcoff: $(TARGET).elf
|
|
||||||
$(COFFCONVERT) -O coff-ext-avr $(BUILD_DIR)/$(TARGET).elf $(TARGET).cof
|
|
||||||
|
|
||||||
|
|
||||||
.SUFFIXES: .elf .hex .eep .lss .sym .bin
|
|
||||||
.PRECIOUS: .o
|
|
||||||
|
|
||||||
.elf.hex:
|
|
||||||
$(Pecho) " COPY $@"
|
|
||||||
$P $(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@
|
|
||||||
|
|
||||||
.elf.bin:
|
|
||||||
$(Pecho) " COPY $@"
|
|
||||||
$P $(OBJCOPY) -O binary -R .eeprom $< $@
|
|
||||||
|
|
||||||
.elf.eep:
|
|
||||||
-$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
|
|
||||||
--change-section-lma .eeprom=0 -O $(FORMAT) $< $@
|
|
||||||
|
|
||||||
# Create extended listing file from ELF output file.
|
|
||||||
.elf.lss:
|
|
||||||
$(OBJDUMP) -h -S $< > $@
|
|
||||||
|
|
||||||
# Create a symbol table from ELF output file.
|
|
||||||
.elf.sym:
|
|
||||||
$(NM) -n $< > $@
|
|
||||||
|
|
||||||
# Link: create ELF output file from library.
|
|
||||||
|
|
||||||
$(BUILD_DIR)/$(TARGET).elf: $(OBJ) Configuration.h
|
|
||||||
$(Pecho) " CXX $@"
|
|
||||||
$P $(CXX) $(LD_PREFIX) $(ALL_CXXFLAGS) -o $@ -L. $(OBJ) $(LDFLAGS) $(LD_SUFFIX)
|
|
||||||
|
|
||||||
# Object files that were found in "src" will be stored in $(BUILD_DIR)
|
|
||||||
# in directories that mirror the structure of "src"
|
|
||||||
|
|
||||||
$(BUILD_DIR)/%.o: %.c Configuration.h Configuration_adv.h $(MAKEFILE)
|
|
||||||
$(Pecho) " CC $<"
|
|
||||||
$P $(CC) -MMD -c $(ALL_CFLAGS) $(CWARN) $< -o $@
|
|
||||||
|
|
||||||
$(BUILD_DIR)/%.o: %.cpp Configuration.h Configuration_adv.h $(MAKEFILE)
|
|
||||||
$(Pecho) " CXX $<"
|
|
||||||
$P $(CXX) -MMD -c $(ALL_CXXFLAGS) $(CXXWARN) $< -o $@
|
|
||||||
|
|
||||||
# Object files for Arduino libs will be created in $(BUILD_DIR)/arduino
|
|
||||||
|
|
||||||
$(BUILD_DIR)/arduino/%.o: %.c Configuration.h Configuration_adv.h $(MAKEFILE)
|
|
||||||
$(Pecho) " CC $<"
|
|
||||||
$P $(CC) -MMD -c $(ALL_CFLAGS) $(LIBWARN) $< -o $@
|
|
||||||
|
|
||||||
$(BUILD_DIR)/arduino/%.o: %.cpp Configuration.h Configuration_adv.h $(MAKEFILE)
|
|
||||||
$(Pecho) " CXX $<"
|
|
||||||
$P $(CXX) -MMD -c $(ALL_CXXFLAGS) $(LIBWARN) $< -o $@
|
|
||||||
|
|
||||||
$(BUILD_DIR)/arduino/%.o: %.S $(MAKEFILE)
|
|
||||||
$(Pecho) " CXX $<"
|
|
||||||
$P $(CXX) -MMD -c $(ALL_ASFLAGS) $< -o $@
|
|
||||||
|
|
||||||
# Target: clean project.
|
|
||||||
clean:
|
|
||||||
$(Pecho) " RMDIR $(BUILD_DIR)/"
|
|
||||||
$P rm -rf $(BUILD_DIR)
|
|
||||||
|
|
||||||
|
|
||||||
.PHONY: all build elf hex eep lss sym program coff extcoff clean depend sizebefore sizeafter
|
|
||||||
|
|
||||||
# Automatically include the dependency files created by gcc
|
|
||||||
-include ${patsubst %.o, %.d, ${OBJ}}
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
/*==============================================================================
|
|
||||||
|
|
||||||
Marlin Firmware
|
|
||||||
|
|
||||||
(c) 2011-2020 MarlinFirmware
|
|
||||||
Portions of Marlin are (c) by their respective authors.
|
|
||||||
All code complies with GPLv2 and/or GPLv3
|
|
||||||
|
|
||||||
================================================================================
|
|
||||||
|
|
||||||
Greetings! Thank you for choosing Marlin 2 as your 3D printer firmware.
|
|
||||||
|
|
||||||
To configure Marlin you must edit Configuration.h and Configuration_adv.h
|
|
||||||
located in the root 'Marlin' folder. Check our Configurations repository to
|
|
||||||
see if there's a more suitable starting-point for your specific hardware.
|
|
||||||
|
|
||||||
Before diving in, we recommend the following essential links:
|
|
||||||
|
|
||||||
Marlin Firmware Official Website
|
|
||||||
|
|
||||||
- https://marlinfw.org/
|
|
||||||
The official Marlin Firmware website contains the most up-to-date
|
|
||||||
documentation. Contributions are always welcome!
|
|
||||||
|
|
||||||
Configuration
|
|
||||||
|
|
||||||
- https://github.com/MarlinFirmware/Configurations
|
|
||||||
Example configurations for several printer models.
|
|
||||||
|
|
||||||
- https://www.youtube.com/watch?v=3gwWVFtdg-4
|
|
||||||
A good 20-minute overview of Marlin configuration by Tom Sanladerer.
|
|
||||||
(Applies to Marlin 1.0.x, so Jerk and Acceleration should be halved.)
|
|
||||||
Also... https://www.google.com/search?tbs=vid%3A1&q=configure+marlin
|
|
||||||
|
|
||||||
- https://marlinfw.org/docs/configuration/configuration.html
|
|
||||||
Marlin's configuration options are explained in more detail here.
|
|
||||||
|
|
||||||
Getting Help
|
|
||||||
|
|
||||||
- https://reprap.org/forum/list.php?415
|
|
||||||
The Marlin Discussion Forum is a great place to get help from other Marlin
|
|
||||||
users who may have experienced similar issues to your own.
|
|
||||||
|
|
||||||
- https://github.com/MarlinFirmware/Marlin/issues
|
|
||||||
With a free GitHub account you can provide us with feedback, bug reports,
|
|
||||||
and feature requests via the Marlin Issue Queue.
|
|
||||||
|
|
||||||
Contributing
|
|
||||||
|
|
||||||
- https://marlinfw.org/docs/development/contributing.html
|
|
||||||
If you'd like to contribute to Marlin, read this first!
|
|
||||||
|
|
||||||
- https://marlinfw.org/docs/development/coding_standards.html
|
|
||||||
Before submitting code get to know the Coding Standards.
|
|
||||||
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
|
||||||
@@ -1,76 +0,0 @@
|
|||||||
/**
|
|
||||||
* Marlin 3D Printer Firmware
|
|
||||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
|
||||||
*
|
|
||||||
* Based on Sprinter and grbl.
|
|
||||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
////////////////////////////
|
|
||||||
// VENDOR VERSION EXAMPLE //
|
|
||||||
////////////////////////////
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Marlin release version identifier
|
|
||||||
*/
|
|
||||||
//#define SHORT_BUILD_VERSION "bugfix-2.0.x"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Verbose version identifier which should contain a reference to the location
|
|
||||||
* from where the binary was downloaded or the source code was compiled.
|
|
||||||
*/
|
|
||||||
//#define DETAILED_BUILD_VERSION SHORT_BUILD_VERSION
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The STRING_DISTRIBUTION_DATE represents when the binary file was built,
|
|
||||||
* here we define this default string as the date where the latest release
|
|
||||||
* version was tagged.
|
|
||||||
*/
|
|
||||||
//#define STRING_DISTRIBUTION_DATE "2019-07-10"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Defines a generic printer name to be output to the LCD after booting Marlin.
|
|
||||||
*/
|
|
||||||
//#define MACHINE_NAME "3D Printer"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Default generic printer UUID.
|
|
||||||
*/
|
|
||||||
//#define DEFAULT_MACHINE_UUID "cede2a2f-41a2-4748-9b12-c55c62f367ff"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The WEBSITE_URL is the location where users can get more information such as
|
|
||||||
* documentation about a specific Marlin release.
|
|
||||||
*/
|
|
||||||
//#define WEBSITE_URL "marlinfw.org"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set the vendor info the serial USB interface, if changable
|
|
||||||
* Currently only supported by DUE platform
|
|
||||||
*/
|
|
||||||
//#define USB_DEVICE_VENDOR_ID 0x0000
|
|
||||||
//#define USB_DEVICE_PRODUCT_ID 0x0000
|
|
||||||
//#define USB_DEVICE_MANUFACTURE_NAME WEBSITE_URL
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
|
|
||||||
This directory is intended for the project specific (private) libraries.
|
|
||||||
PlatformIO will compile them to static libraries and link to executable file.
|
|
||||||
|
|
||||||
The source code of each library should be placed in separate directory, like
|
|
||||||
"lib/private_lib/[here are source files]".
|
|
||||||
|
|
||||||
For example, see how can be organized `Foo` and `Bar` libraries:
|
|
||||||
|
|
||||||
|--lib
|
|
||||||
| |--Bar
|
|
||||||
| | |--docs
|
|
||||||
| | |--examples
|
|
||||||
| | |--src
|
|
||||||
| | |- Bar.c
|
|
||||||
| | |- Bar.h
|
|
||||||
| |--Foo
|
|
||||||
| | |- Foo.c
|
|
||||||
| | |- Foo.h
|
|
||||||
| |- readme.txt --> THIS FILE
|
|
||||||
|- platformio.ini
|
|
||||||
|--src
|
|
||||||
|- main.c
|
|
||||||
|
|
||||||
Then in `src/main.c` you should use:
|
|
||||||
|
|
||||||
#include <Foo.h>
|
|
||||||
#include <Bar.h>
|
|
||||||
|
|
||||||
// rest H/C/CPP code
|
|
||||||
|
|
||||||
PlatformIO will find your libraries automatically, configure preprocessor's
|
|
||||||
include paths and build them.
|
|
||||||
|
|
||||||
More information about PlatformIO Library Dependency Finder
|
|
||||||
- https://docs.platformio.org/page/librarymanager/ldf.html
|
|
||||||
@@ -1,94 +0,0 @@
|
|||||||
/**
|
|
||||||
* Marlin 3D Printer Firmware
|
|
||||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
|
||||||
*
|
|
||||||
* Based on Sprinter and grbl.
|
|
||||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
#ifdef __AVR__
|
|
||||||
|
|
||||||
#include "../../inc/MarlinConfig.h"
|
|
||||||
#include "HAL.h"
|
|
||||||
|
|
||||||
#ifdef USBCON
|
|
||||||
DefaultSerial1 MSerial0(false, Serial);
|
|
||||||
#ifdef BLUETOOTH
|
|
||||||
BTSerial btSerial(false, bluetoothSerial);
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ------------------------
|
|
||||||
// Public Variables
|
|
||||||
// ------------------------
|
|
||||||
|
|
||||||
//uint8_t MCUSR;
|
|
||||||
|
|
||||||
// ------------------------
|
|
||||||
// Public functions
|
|
||||||
// ------------------------
|
|
||||||
|
|
||||||
void HAL_init() {
|
|
||||||
// Init Servo Pins
|
|
||||||
#define INIT_SERVO(N) OUT_WRITE(SERVO##N##_PIN, LOW)
|
|
||||||
#if HAS_SERVO_0
|
|
||||||
INIT_SERVO(0);
|
|
||||||
#endif
|
|
||||||
#if HAS_SERVO_1
|
|
||||||
INIT_SERVO(1);
|
|
||||||
#endif
|
|
||||||
#if HAS_SERVO_2
|
|
||||||
INIT_SERVO(2);
|
|
||||||
#endif
|
|
||||||
#if HAS_SERVO_3
|
|
||||||
INIT_SERVO(3);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void HAL_reboot() {
|
|
||||||
#if ENABLED(USE_WATCHDOG)
|
|
||||||
while (1) { /* run out the watchdog */ }
|
|
||||||
#else
|
|
||||||
void (*resetFunc)() = 0; // Declare resetFunc() at address 0
|
|
||||||
resetFunc(); // Jump to address 0
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
|
||||||
|
|
||||||
#include "../../sd/SdFatUtil.h"
|
|
||||||
int freeMemory() { return SdFatUtil::FreeRam(); }
|
|
||||||
|
|
||||||
#else // !SDSUPPORT
|
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
extern char __bss_end;
|
|
||||||
extern char __heap_start;
|
|
||||||
extern void* __brkval;
|
|
||||||
|
|
||||||
int freeMemory() {
|
|
||||||
int free_memory;
|
|
||||||
if ((int)__brkval == 0)
|
|
||||||
free_memory = ((int)&free_memory) - ((int)&__bss_end);
|
|
||||||
else
|
|
||||||
free_memory = ((int)&free_memory) - ((int)__brkval);
|
|
||||||
return free_memory;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // !SDSUPPORT
|
|
||||||
|
|
||||||
#endif // __AVR__
|
|
||||||
@@ -1,217 +0,0 @@
|
|||||||
/**
|
|
||||||
* Marlin 3D Printer Firmware
|
|
||||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
|
||||||
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "../shared/Marduino.h"
|
|
||||||
#include "../shared/HAL_SPI.h"
|
|
||||||
#include "fastio.h"
|
|
||||||
#include "watchdog.h"
|
|
||||||
#include "math.h"
|
|
||||||
|
|
||||||
#ifdef USBCON
|
|
||||||
#include <HardwareSerial.h>
|
|
||||||
#else
|
|
||||||
#define HardwareSerial_h // Hack to prevent HardwareSerial.h header inclusion
|
|
||||||
#include "MarlinSerial.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <util/delay.h>
|
|
||||||
#include <avr/eeprom.h>
|
|
||||||
#include <avr/pgmspace.h>
|
|
||||||
#include <avr/interrupt.h>
|
|
||||||
#include <avr/io.h>
|
|
||||||
|
|
||||||
#ifndef pgm_read_ptr
|
|
||||||
// Compatibility for avr-libc 1.8.0-4.1 included with Ubuntu for
|
|
||||||
// Windows Subsystem for Linux on Windows 10 as of 10/18/2019
|
|
||||||
#define pgm_read_ptr_far(address_long) (void*)__ELPM_word((uint32_t)(address_long))
|
|
||||||
#define pgm_read_ptr_near(address_short) (void*)__LPM_word((uint16_t)(address_short))
|
|
||||||
#define pgm_read_ptr(address_short) pgm_read_ptr_near(address_short)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ------------------------
|
|
||||||
// Defines
|
|
||||||
// ------------------------
|
|
||||||
|
|
||||||
// AVR PROGMEM extension for sprintf_P
|
|
||||||
#define S_FMT "%S"
|
|
||||||
|
|
||||||
// AVR PROGMEM extension for string define
|
|
||||||
#define PGMSTR(NAM,STR) const char NAM[] PROGMEM = STR
|
|
||||||
|
|
||||||
#ifndef CRITICAL_SECTION_START
|
|
||||||
#define CRITICAL_SECTION_START() unsigned char _sreg = SREG; cli()
|
|
||||||
#define CRITICAL_SECTION_END() SREG = _sreg
|
|
||||||
#endif
|
|
||||||
#define ISRS_ENABLED() TEST(SREG, SREG_I)
|
|
||||||
#define ENABLE_ISRS() sei()
|
|
||||||
#define DISABLE_ISRS() cli()
|
|
||||||
|
|
||||||
// ------------------------
|
|
||||||
// Types
|
|
||||||
// ------------------------
|
|
||||||
|
|
||||||
typedef int8_t pin_t;
|
|
||||||
|
|
||||||
#define SHARED_SERVOS HAS_SERVOS
|
|
||||||
#define HAL_SERVO_LIB Servo
|
|
||||||
|
|
||||||
// ------------------------
|
|
||||||
// Public Variables
|
|
||||||
// ------------------------
|
|
||||||
|
|
||||||
//extern uint8_t MCUSR;
|
|
||||||
|
|
||||||
// Serial ports
|
|
||||||
#ifdef USBCON
|
|
||||||
#include "../../core/serial_hook.h"
|
|
||||||
typedef ForwardSerial1Class< decltype(Serial) > DefaultSerial1;
|
|
||||||
extern DefaultSerial1 MSerial0;
|
|
||||||
#ifdef BLUETOOTH
|
|
||||||
typedef ForwardSerial1Class< decltype(bluetoothSerial) > BTSerial;
|
|
||||||
extern BTSerial btSerial;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define MYSERIAL1 TERN(BLUETOOTH, btSerial, MSerial0)
|
|
||||||
#else
|
|
||||||
#if !WITHIN(SERIAL_PORT, -1, 3)
|
|
||||||
#error "SERIAL_PORT must be from 0 to 3, or -1 for USB Serial."
|
|
||||||
#endif
|
|
||||||
#define MYSERIAL1 customizedSerial1
|
|
||||||
|
|
||||||
#ifdef SERIAL_PORT_2
|
|
||||||
#if !WITHIN(SERIAL_PORT_2, -1, 3)
|
|
||||||
#error "SERIAL_PORT_2 must be from 0 to 3, or -1 for USB Serial."
|
|
||||||
#endif
|
|
||||||
#define MYSERIAL2 customizedSerial2
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef SERIAL_PORT_3
|
|
||||||
#if !WITHIN(SERIAL_PORT_3, -1, 3)
|
|
||||||
#error "SERIAL_PORT_3 must be from 0 to 3, or -1 for USB Serial."
|
|
||||||
#endif
|
|
||||||
#define MYSERIAL3 customizedSerial3
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef MMU2_SERIAL_PORT
|
|
||||||
#if !WITHIN(MMU2_SERIAL_PORT, -1, 3)
|
|
||||||
#error "MMU2_SERIAL_PORT must be from 0 to 3, or -1 for USB Serial."
|
|
||||||
#endif
|
|
||||||
#define MMU2_SERIAL mmuSerial
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef LCD_SERIAL_PORT
|
|
||||||
#if !WITHIN(LCD_SERIAL_PORT, -1, 3)
|
|
||||||
#error "LCD_SERIAL_PORT must be from 0 to 3, or -1 for USB Serial."
|
|
||||||
#endif
|
|
||||||
#define LCD_SERIAL lcdSerial
|
|
||||||
#if HAS_DGUS_LCD
|
|
||||||
#define SERIAL_GET_TX_BUFFER_FREE() LCD_SERIAL.get_tx_buffer_free()
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ------------------------
|
|
||||||
// Public functions
|
|
||||||
// ------------------------
|
|
||||||
|
|
||||||
void HAL_init();
|
|
||||||
|
|
||||||
//void cli();
|
|
||||||
|
|
||||||
//void _delay_ms(const int delay);
|
|
||||||
|
|
||||||
inline void HAL_clear_reset_source() { MCUSR = 0; }
|
|
||||||
inline uint8_t HAL_get_reset_source() { return MCUSR; }
|
|
||||||
|
|
||||||
void HAL_reboot();
|
|
||||||
|
|
||||||
#if GCC_VERSION <= 50000
|
|
||||||
#pragma GCC diagnostic push
|
|
||||||
#pragma GCC diagnostic ignored "-Wunused-function"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern "C" int freeMemory();
|
|
||||||
|
|
||||||
#if GCC_VERSION <= 50000
|
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ADC
|
|
||||||
#ifdef DIDR2
|
|
||||||
#define HAL_ANALOG_SELECT(ind) do{ if (ind < 8) SBI(DIDR0, ind); else SBI(DIDR2, ind & 0x07); }while(0)
|
|
||||||
#else
|
|
||||||
#define HAL_ANALOG_SELECT(ind) SBI(DIDR0, ind);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
inline void HAL_adc_init() {
|
|
||||||
ADCSRA = _BV(ADEN) | _BV(ADSC) | _BV(ADIF) | 0x07;
|
|
||||||
DIDR0 = 0;
|
|
||||||
#ifdef DIDR2
|
|
||||||
DIDR2 = 0;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
#define SET_ADMUX_ADCSRA(ch) ADMUX = _BV(REFS0) | (ch & 0x07); SBI(ADCSRA, ADSC)
|
|
||||||
#ifdef MUX5
|
|
||||||
#define HAL_START_ADC(ch) if (ch > 7) ADCSRB = _BV(MUX5); else ADCSRB = 0; SET_ADMUX_ADCSRA(ch)
|
|
||||||
#else
|
|
||||||
#define HAL_START_ADC(ch) ADCSRB = 0; SET_ADMUX_ADCSRA(ch)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define HAL_ADC_VREF 5.0
|
|
||||||
#define HAL_ADC_RESOLUTION 10
|
|
||||||
#define HAL_READ_ADC() ADC
|
|
||||||
#define HAL_ADC_READY() !TEST(ADCSRA, ADSC)
|
|
||||||
|
|
||||||
#define GET_PIN_MAP_PIN(index) index
|
|
||||||
#define GET_PIN_MAP_INDEX(pin) pin
|
|
||||||
#define PARSED_PIN_INDEX(code, dval) parser.intval(code, dval)
|
|
||||||
|
|
||||||
#define HAL_SENSITIVE_PINS 0, 1,
|
|
||||||
|
|
||||||
#ifdef __AVR_AT90USB1286__
|
|
||||||
#define JTAG_DISABLE() do{ MCUCR = 0x80; MCUCR = 0x80; }while(0)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// AVR compatibility
|
|
||||||
#define strtof strtod
|
|
||||||
|
|
||||||
#define HAL_CAN_SET_PWM_FREQ // This HAL supports PWM Frequency adjustment
|
|
||||||
|
|
||||||
/**
|
|
||||||
* set_pwm_frequency
|
|
||||||
* Sets the frequency of the timer corresponding to the provided pin
|
|
||||||
* as close as possible to the provided desired frequency. Internally
|
|
||||||
* calculates the required waveform generation mode, prescaler and
|
|
||||||
* resolution values required and sets the timer registers accordingly.
|
|
||||||
* NOTE that the frequency is applied to all pins on the timer (Ex OC3A, OC3B and OC3B)
|
|
||||||
* NOTE that there are limitations, particularly if using TIMER2. (see Configuration_adv.h -> FAST FAN PWM Settings)
|
|
||||||
*/
|
|
||||||
void set_pwm_frequency(const pin_t pin, int f_desired);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* set_pwm_duty
|
|
||||||
* Sets the PWM duty cycle of the provided pin to the provided value
|
|
||||||
* Optionally allows inverting the duty cycle [default = false]
|
|
||||||
* Optionally allows changing the maximum size of the provided value to enable finer PWM duty control [default = 255]
|
|
||||||
*/
|
|
||||||
void set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size=255, const bool invert=false);
|
|
||||||
@@ -1,253 +0,0 @@
|
|||||||
/**
|
|
||||||
* Marlin 3D Printer Firmware
|
|
||||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
|
||||||
*
|
|
||||||
* Based on Sprinter and grbl.
|
|
||||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adapted from Arduino Sd2Card Library
|
|
||||||
* Copyright (c) 2009 by William Greiman
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* HAL for AVR - SPI functions
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef __AVR__
|
|
||||||
|
|
||||||
#include "../../inc/MarlinConfig.h"
|
|
||||||
|
|
||||||
void spiBegin() {
|
|
||||||
OUT_WRITE(SD_SS_PIN, HIGH);
|
|
||||||
SET_OUTPUT(SD_SCK_PIN);
|
|
||||||
SET_INPUT(SD_MISO_PIN);
|
|
||||||
SET_OUTPUT(SD_MOSI_PIN);
|
|
||||||
|
|
||||||
#if DISABLED(SOFTWARE_SPI)
|
|
||||||
// SS must be in output mode even it is not chip select
|
|
||||||
//SET_OUTPUT(SD_SS_PIN);
|
|
||||||
// set SS high - may be chip select for another SPI device
|
|
||||||
//#if SET_SPI_SS_HIGH
|
|
||||||
//WRITE(SD_SS_PIN, HIGH);
|
|
||||||
//#endif
|
|
||||||
// set a default rate
|
|
||||||
spiInit(1);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
#if NONE(SOFTWARE_SPI, FORCE_SOFT_SPI)
|
|
||||||
|
|
||||||
// ------------------------
|
|
||||||
// Hardware SPI
|
|
||||||
// ------------------------
|
|
||||||
|
|
||||||
// make sure SPCR rate is in expected bits
|
|
||||||
#if (SPR0 != 0 || SPR1 != 1)
|
|
||||||
#error "unexpected SPCR bits"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Initialize hardware SPI
|
|
||||||
* Set SCK rate to F_CPU/pow(2, 1 + spiRate) for spiRate [0,6]
|
|
||||||
*/
|
|
||||||
void spiInit(uint8_t spiRate) {
|
|
||||||
// See avr processor documentation
|
|
||||||
CBI(
|
|
||||||
#ifdef PRR
|
|
||||||
PRR
|
|
||||||
#elif defined(PRR0)
|
|
||||||
PRR0
|
|
||||||
#endif
|
|
||||||
, PRSPI);
|
|
||||||
|
|
||||||
SPCR = _BV(SPE) | _BV(MSTR) | (spiRate >> 1);
|
|
||||||
SPSR = spiRate & 1 || spiRate == 6 ? 0 : _BV(SPI2X);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** SPI receive a byte */
|
|
||||||
uint8_t spiRec() {
|
|
||||||
SPDR = 0xFF;
|
|
||||||
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
|
|
||||||
return SPDR;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** SPI read data */
|
|
||||||
void spiRead(uint8_t *buf, uint16_t nbyte) {
|
|
||||||
if (nbyte-- == 0) return;
|
|
||||||
SPDR = 0xFF;
|
|
||||||
for (uint16_t i = 0; i < nbyte; i++) {
|
|
||||||
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
|
|
||||||
buf[i] = SPDR;
|
|
||||||
SPDR = 0xFF;
|
|
||||||
}
|
|
||||||
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
|
|
||||||
buf[nbyte] = SPDR;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** SPI send a byte */
|
|
||||||
void spiSend(uint8_t b) {
|
|
||||||
SPDR = b;
|
|
||||||
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
|
|
||||||
}
|
|
||||||
|
|
||||||
/** SPI send block */
|
|
||||||
void spiSendBlock(uint8_t token, const uint8_t *buf) {
|
|
||||||
SPDR = token;
|
|
||||||
for (uint16_t i = 0; i < 512; i += 2) {
|
|
||||||
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
|
|
||||||
SPDR = buf[i];
|
|
||||||
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
|
|
||||||
SPDR = buf[i + 1];
|
|
||||||
}
|
|
||||||
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/** begin spi transaction */
|
|
||||||
void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode) {
|
|
||||||
// Based on Arduino SPI library
|
|
||||||
// Clock settings are defined as follows. Note that this shows SPI2X
|
|
||||||
// inverted, so the bits form increasing numbers. Also note that
|
|
||||||
// fosc/64 appears twice
|
|
||||||
// SPR1 SPR0 ~SPI2X Freq
|
|
||||||
// 0 0 0 fosc/2
|
|
||||||
// 0 0 1 fosc/4
|
|
||||||
// 0 1 0 fosc/8
|
|
||||||
// 0 1 1 fosc/16
|
|
||||||
// 1 0 0 fosc/32
|
|
||||||
// 1 0 1 fosc/64
|
|
||||||
// 1 1 0 fosc/64
|
|
||||||
// 1 1 1 fosc/128
|
|
||||||
|
|
||||||
// We find the fastest clock that is less than or equal to the
|
|
||||||
// given clock rate. The clock divider that results in clock_setting
|
|
||||||
// is 2 ^^ (clock_div + 1). If nothing is slow enough, we'll use the
|
|
||||||
// slowest (128 == 2 ^^ 7, so clock_div = 6).
|
|
||||||
uint8_t clockDiv;
|
|
||||||
|
|
||||||
// When the clock is known at compiletime, use this if-then-else
|
|
||||||
// cascade, which the compiler knows how to completely optimize
|
|
||||||
// away. When clock is not known, use a loop instead, which generates
|
|
||||||
// shorter code.
|
|
||||||
if (__builtin_constant_p(spiClock)) {
|
|
||||||
if (spiClock >= F_CPU / 2) clockDiv = 0;
|
|
||||||
else if (spiClock >= F_CPU / 4) clockDiv = 1;
|
|
||||||
else if (spiClock >= F_CPU / 8) clockDiv = 2;
|
|
||||||
else if (spiClock >= F_CPU / 16) clockDiv = 3;
|
|
||||||
else if (spiClock >= F_CPU / 32) clockDiv = 4;
|
|
||||||
else if (spiClock >= F_CPU / 64) clockDiv = 5;
|
|
||||||
else clockDiv = 6;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
uint32_t clockSetting = F_CPU / 2;
|
|
||||||
clockDiv = 0;
|
|
||||||
while (clockDiv < 6 && spiClock < clockSetting) {
|
|
||||||
clockSetting /= 2;
|
|
||||||
clockDiv++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Compensate for the duplicate fosc/64
|
|
||||||
if (clockDiv == 6) clockDiv = 7;
|
|
||||||
|
|
||||||
// Invert the SPI2X bit
|
|
||||||
clockDiv ^= 0x1;
|
|
||||||
|
|
||||||
SPCR = _BV(SPE) | _BV(MSTR) | ((bitOrder == LSBFIRST) ? _BV(DORD) : 0) |
|
|
||||||
(dataMode << CPHA) | ((clockDiv >> 1) << SPR0);
|
|
||||||
SPSR = clockDiv | 0x01;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#else // SOFTWARE_SPI || FORCE_SOFT_SPI
|
|
||||||
|
|
||||||
// ------------------------
|
|
||||||
// Software SPI
|
|
||||||
// ------------------------
|
|
||||||
|
|
||||||
// nop to tune soft SPI timing
|
|
||||||
#define nop asm volatile ("\tnop\n")
|
|
||||||
|
|
||||||
void spiInit(uint8_t) { /* do nothing */ }
|
|
||||||
|
|
||||||
// Begin SPI transaction, set clock, bit order, data mode
|
|
||||||
void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode) { /* do nothing */ }
|
|
||||||
|
|
||||||
// Soft SPI receive byte
|
|
||||||
uint8_t spiRec() {
|
|
||||||
uint8_t data = 0;
|
|
||||||
// no interrupts during byte receive - about 8µs
|
|
||||||
cli();
|
|
||||||
// output pin high - like sending 0xFF
|
|
||||||
WRITE(SD_MOSI_PIN, HIGH);
|
|
||||||
|
|
||||||
LOOP_L_N(i, 8) {
|
|
||||||
WRITE(SD_SCK_PIN, HIGH);
|
|
||||||
|
|
||||||
nop; // adjust so SCK is nice
|
|
||||||
nop;
|
|
||||||
|
|
||||||
data <<= 1;
|
|
||||||
|
|
||||||
if (READ(SD_MISO_PIN)) data |= 1;
|
|
||||||
|
|
||||||
WRITE(SD_SCK_PIN, LOW);
|
|
||||||
}
|
|
||||||
|
|
||||||
sei();
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Soft SPI read data
|
|
||||||
void spiRead(uint8_t *buf, uint16_t nbyte) {
|
|
||||||
for (uint16_t i = 0; i < nbyte; i++)
|
|
||||||
buf[i] = spiRec();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Soft SPI send byte
|
|
||||||
void spiSend(uint8_t data) {
|
|
||||||
// no interrupts during byte send - about 8µs
|
|
||||||
cli();
|
|
||||||
LOOP_L_N(i, 8) {
|
|
||||||
WRITE(SD_SCK_PIN, LOW);
|
|
||||||
WRITE(SD_MOSI_PIN, data & 0x80);
|
|
||||||
data <<= 1;
|
|
||||||
WRITE(SD_SCK_PIN, HIGH);
|
|
||||||
}
|
|
||||||
|
|
||||||
nop; // hold SCK high for a few ns
|
|
||||||
nop;
|
|
||||||
nop;
|
|
||||||
nop;
|
|
||||||
|
|
||||||
WRITE(SD_SCK_PIN, LOW);
|
|
||||||
|
|
||||||
sei();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Soft SPI send block
|
|
||||||
void spiSendBlock(uint8_t token, const uint8_t *buf) {
|
|
||||||
spiSend(token);
|
|
||||||
for (uint16_t i = 0; i < 512; i++)
|
|
||||||
spiSend(buf[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // SOFTWARE_SPI || FORCE_SOFT_SPI
|
|
||||||
|
|
||||||
#endif // __AVR__
|
|
||||||
@@ -1,652 +0,0 @@
|
|||||||
/**
|
|
||||||
* Marlin 3D Printer Firmware
|
|
||||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
|
||||||
*
|
|
||||||
* Based on Sprinter and grbl.
|
|
||||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* MarlinSerial.cpp - Hardware serial library for Wiring
|
|
||||||
* Copyright (c) 2006 Nicholas Zambetti. All right reserved.
|
|
||||||
*
|
|
||||||
* Modified 23 November 2006 by David A. Mellis
|
|
||||||
* Modified 28 September 2010 by Mark Sproul
|
|
||||||
* Modified 14 February 2016 by Andreas Hardtung (added tx buffer)
|
|
||||||
* Modified 01 October 2017 by Eduardo José Tagle (added XON/XOFF)
|
|
||||||
* Modified 10 June 2018 by Eduardo José Tagle (See #10991)
|
|
||||||
* Templatized 01 October 2018 by Eduardo José Tagle to allow multiple instances
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef __AVR__
|
|
||||||
|
|
||||||
// Disable HardwareSerial.cpp to support chips without a UART (Attiny, etc.)
|
|
||||||
|
|
||||||
#include "../../inc/MarlinConfig.h"
|
|
||||||
|
|
||||||
#if !defined(USBCON) && (defined(UBRRH) || defined(UBRR0H) || defined(UBRR1H) || defined(UBRR2H) || defined(UBRR3H))
|
|
||||||
|
|
||||||
#include "MarlinSerial.h"
|
|
||||||
#include "../../MarlinCore.h"
|
|
||||||
|
|
||||||
#if ENABLED(DIRECT_STEPPING)
|
|
||||||
#include "../../feature/direct_stepping.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
template<typename Cfg> typename MarlinSerial<Cfg>::ring_buffer_r MarlinSerial<Cfg>::rx_buffer = { 0, 0, { 0 } };
|
|
||||||
template<typename Cfg> typename MarlinSerial<Cfg>::ring_buffer_t MarlinSerial<Cfg>::tx_buffer = { 0 };
|
|
||||||
template<typename Cfg> bool MarlinSerial<Cfg>::_written = false;
|
|
||||||
template<typename Cfg> uint8_t MarlinSerial<Cfg>::xon_xoff_state = MarlinSerial<Cfg>::XON_XOFF_CHAR_SENT | MarlinSerial<Cfg>::XON_CHAR;
|
|
||||||
template<typename Cfg> uint8_t MarlinSerial<Cfg>::rx_dropped_bytes = 0;
|
|
||||||
template<typename Cfg> uint8_t MarlinSerial<Cfg>::rx_buffer_overruns = 0;
|
|
||||||
template<typename Cfg> uint8_t MarlinSerial<Cfg>::rx_framing_errors = 0;
|
|
||||||
template<typename Cfg> typename MarlinSerial<Cfg>::ring_buffer_pos_t MarlinSerial<Cfg>::rx_max_enqueued = 0;
|
|
||||||
|
|
||||||
// A SW memory barrier, to ensure GCC does not overoptimize loops
|
|
||||||
#define sw_barrier() asm volatile("": : :"memory");
|
|
||||||
|
|
||||||
#include "../../feature/e_parser.h"
|
|
||||||
|
|
||||||
// "Atomically" read the RX head index value without disabling interrupts:
|
|
||||||
// This MUST be called with RX interrupts enabled, and CAN'T be called
|
|
||||||
// from the RX ISR itself!
|
|
||||||
template<typename Cfg>
|
|
||||||
FORCE_INLINE typename MarlinSerial<Cfg>::ring_buffer_pos_t MarlinSerial<Cfg>::atomic_read_rx_head() {
|
|
||||||
if (Cfg::RX_SIZE > 256) {
|
|
||||||
// Keep reading until 2 consecutive reads return the same value,
|
|
||||||
// meaning there was no update in-between caused by an interrupt.
|
|
||||||
// This works because serial RX interrupts happen at a slower rate
|
|
||||||
// than successive reads of a variable, so 2 consecutive reads with
|
|
||||||
// the same value means no interrupt updated it.
|
|
||||||
ring_buffer_pos_t vold, vnew = rx_buffer.head;
|
|
||||||
sw_barrier();
|
|
||||||
do {
|
|
||||||
vold = vnew;
|
|
||||||
vnew = rx_buffer.head;
|
|
||||||
sw_barrier();
|
|
||||||
} while (vold != vnew);
|
|
||||||
return vnew;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// With an 8bit index, reads are always atomic. No need for special handling
|
|
||||||
return rx_buffer.head;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename Cfg>
|
|
||||||
volatile bool MarlinSerial<Cfg>::rx_tail_value_not_stable = false;
|
|
||||||
template<typename Cfg>
|
|
||||||
volatile uint16_t MarlinSerial<Cfg>::rx_tail_value_backup = 0;
|
|
||||||
|
|
||||||
// Set RX tail index, taking into account the RX ISR could interrupt
|
|
||||||
// the write to this variable in the middle - So a backup strategy
|
|
||||||
// is used to ensure reads of the correct values.
|
|
||||||
// -Must NOT be called from the RX ISR -
|
|
||||||
template<typename Cfg>
|
|
||||||
FORCE_INLINE void MarlinSerial<Cfg>::atomic_set_rx_tail(typename MarlinSerial<Cfg>::ring_buffer_pos_t value) {
|
|
||||||
if (Cfg::RX_SIZE > 256) {
|
|
||||||
// Store the new value in the backup
|
|
||||||
rx_tail_value_backup = value;
|
|
||||||
sw_barrier();
|
|
||||||
// Flag we are about to change the true value
|
|
||||||
rx_tail_value_not_stable = true;
|
|
||||||
sw_barrier();
|
|
||||||
// Store the new value
|
|
||||||
rx_buffer.tail = value;
|
|
||||||
sw_barrier();
|
|
||||||
// Signal the new value is completely stored into the value
|
|
||||||
rx_tail_value_not_stable = false;
|
|
||||||
sw_barrier();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
rx_buffer.tail = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the RX tail index, taking into account the read could be
|
|
||||||
// interrupting in the middle of the update of that index value
|
|
||||||
// -Called from the RX ISR -
|
|
||||||
template<typename Cfg>
|
|
||||||
FORCE_INLINE typename MarlinSerial<Cfg>::ring_buffer_pos_t MarlinSerial<Cfg>::atomic_read_rx_tail() {
|
|
||||||
if (Cfg::RX_SIZE > 256) {
|
|
||||||
// If the true index is being modified, return the backup value
|
|
||||||
if (rx_tail_value_not_stable) return rx_tail_value_backup;
|
|
||||||
}
|
|
||||||
// The true index is stable, return it
|
|
||||||
return rx_buffer.tail;
|
|
||||||
}
|
|
||||||
|
|
||||||
// (called with RX interrupts disabled)
|
|
||||||
template<typename Cfg>
|
|
||||||
FORCE_INLINE void MarlinSerial<Cfg>::store_rxd_char() {
|
|
||||||
|
|
||||||
static EmergencyParser::State emergency_state; // = EP_RESET
|
|
||||||
|
|
||||||
// This must read the R_UCSRA register before reading the received byte to detect error causes
|
|
||||||
if (Cfg::DROPPED_RX && B_DOR && !++rx_dropped_bytes) --rx_dropped_bytes;
|
|
||||||
if (Cfg::RX_OVERRUNS && B_DOR && !++rx_buffer_overruns) --rx_buffer_overruns;
|
|
||||||
if (Cfg::RX_FRAMING_ERRORS && B_FE && !++rx_framing_errors) --rx_framing_errors;
|
|
||||||
|
|
||||||
// Read the character from the USART
|
|
||||||
uint8_t c = R_UDR;
|
|
||||||
|
|
||||||
#if ENABLED(DIRECT_STEPPING)
|
|
||||||
if (page_manager.maybe_store_rxd_char(c)) return;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Get the tail - Nothing can alter its value while this ISR is executing, but there's
|
|
||||||
// a chance that this ISR interrupted the main process while it was updating the index.
|
|
||||||
// The backup mechanism ensures the correct value is always returned.
|
|
||||||
const ring_buffer_pos_t t = atomic_read_rx_tail();
|
|
||||||
|
|
||||||
// Get the head pointer - This ISR is the only one that modifies its value, so it's safe to read here
|
|
||||||
ring_buffer_pos_t h = rx_buffer.head;
|
|
||||||
|
|
||||||
// Get the next element
|
|
||||||
ring_buffer_pos_t i = (ring_buffer_pos_t)(h + 1) & (ring_buffer_pos_t)(Cfg::RX_SIZE - 1);
|
|
||||||
|
|
||||||
if (Cfg::EMERGENCYPARSER) emergency_parser.update(emergency_state, c);
|
|
||||||
|
|
||||||
// If the character is to be stored at the index just before the tail
|
|
||||||
// (such that the head would advance to the current tail), the RX FIFO is
|
|
||||||
// full, so don't write the character or advance the head.
|
|
||||||
if (i != t) {
|
|
||||||
rx_buffer.buffer[h] = c;
|
|
||||||
h = i;
|
|
||||||
}
|
|
||||||
else if (Cfg::DROPPED_RX && !++rx_dropped_bytes)
|
|
||||||
--rx_dropped_bytes;
|
|
||||||
|
|
||||||
if (Cfg::MAX_RX_QUEUED) {
|
|
||||||
// Calculate count of bytes stored into the RX buffer
|
|
||||||
const ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(h - t) & (ring_buffer_pos_t)(Cfg::RX_SIZE - 1);
|
|
||||||
|
|
||||||
// Keep track of the maximum count of enqueued bytes
|
|
||||||
NOLESS(rx_max_enqueued, rx_count);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Cfg::XONOFF) {
|
|
||||||
// If the last char that was sent was an XON
|
|
||||||
if ((xon_xoff_state & XON_XOFF_CHAR_MASK) == XON_CHAR) {
|
|
||||||
|
|
||||||
// Bytes stored into the RX buffer
|
|
||||||
const ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(h - t) & (ring_buffer_pos_t)(Cfg::RX_SIZE - 1);
|
|
||||||
|
|
||||||
// If over 12.5% of RX buffer capacity, send XOFF before running out of
|
|
||||||
// RX buffer space .. 325 bytes @ 250kbits/s needed to let the host react
|
|
||||||
// and stop sending bytes. This translates to 13mS propagation time.
|
|
||||||
if (rx_count >= (Cfg::RX_SIZE) / 8) {
|
|
||||||
|
|
||||||
// At this point, definitely no TX interrupt was executing, since the TX ISR can't be preempted.
|
|
||||||
// Don't enable the TX interrupt here as a means to trigger the XOFF char, because if it happens
|
|
||||||
// to be in the middle of trying to disable the RX interrupt in the main program, eventually the
|
|
||||||
// enabling of the TX interrupt could be undone. The ONLY reliable thing this can do to ensure
|
|
||||||
// the sending of the XOFF char is to send it HERE AND NOW.
|
|
||||||
|
|
||||||
// About to send the XOFF char
|
|
||||||
xon_xoff_state = XOFF_CHAR | XON_XOFF_CHAR_SENT;
|
|
||||||
|
|
||||||
// Wait until the TX register becomes empty and send it - Here there could be a problem
|
|
||||||
// - While waiting for the TX register to empty, the RX register could receive a new
|
|
||||||
// character. This must also handle that situation!
|
|
||||||
while (!B_UDRE) {
|
|
||||||
|
|
||||||
if (B_RXC) {
|
|
||||||
// A char arrived while waiting for the TX buffer to be empty - Receive and process it!
|
|
||||||
|
|
||||||
i = (ring_buffer_pos_t)(h + 1) & (ring_buffer_pos_t)(Cfg::RX_SIZE - 1);
|
|
||||||
|
|
||||||
// Read the character from the USART
|
|
||||||
c = R_UDR;
|
|
||||||
|
|
||||||
if (Cfg::EMERGENCYPARSER) emergency_parser.update(emergency_state, c);
|
|
||||||
|
|
||||||
// If the character is to be stored at the index just before the tail
|
|
||||||
// (such that the head would advance to the current tail), the FIFO is
|
|
||||||
// full, so don't write the character or advance the head.
|
|
||||||
if (i != t) {
|
|
||||||
rx_buffer.buffer[h] = c;
|
|
||||||
h = i;
|
|
||||||
}
|
|
||||||
else if (Cfg::DROPPED_RX && !++rx_dropped_bytes)
|
|
||||||
--rx_dropped_bytes;
|
|
||||||
}
|
|
||||||
sw_barrier();
|
|
||||||
}
|
|
||||||
|
|
||||||
R_UDR = XOFF_CHAR;
|
|
||||||
|
|
||||||
// Clear the TXC bit -- "can be cleared by writing a one to its bit
|
|
||||||
// location". This makes sure flush() won't return until the bytes
|
|
||||||
// actually got written
|
|
||||||
B_TXC = 1;
|
|
||||||
|
|
||||||
// At this point there could be a race condition between the write() function
|
|
||||||
// and this sending of the XOFF char. This interrupt could happen between the
|
|
||||||
// wait to be empty TX buffer loop and the actual write of the character. Since
|
|
||||||
// the TX buffer is full because it's sending the XOFF char, the only way to be
|
|
||||||
// sure the write() function will succeed is to wait for the XOFF char to be
|
|
||||||
// completely sent. Since an extra character could be received during the wait
|
|
||||||
// it must also be handled!
|
|
||||||
while (!B_UDRE) {
|
|
||||||
|
|
||||||
if (B_RXC) {
|
|
||||||
// A char arrived while waiting for the TX buffer to be empty - Receive and process it!
|
|
||||||
|
|
||||||
i = (ring_buffer_pos_t)(h + 1) & (ring_buffer_pos_t)(Cfg::RX_SIZE - 1);
|
|
||||||
|
|
||||||
// Read the character from the USART
|
|
||||||
c = R_UDR;
|
|
||||||
|
|
||||||
if (Cfg::EMERGENCYPARSER)
|
|
||||||
emergency_parser.update(emergency_state, c);
|
|
||||||
|
|
||||||
// If the character is to be stored at the index just before the tail
|
|
||||||
// (such that the head would advance to the current tail), the FIFO is
|
|
||||||
// full, so don't write the character or advance the head.
|
|
||||||
if (i != t) {
|
|
||||||
rx_buffer.buffer[h] = c;
|
|
||||||
h = i;
|
|
||||||
}
|
|
||||||
else if (Cfg::DROPPED_RX && !++rx_dropped_bytes)
|
|
||||||
--rx_dropped_bytes;
|
|
||||||
}
|
|
||||||
sw_barrier();
|
|
||||||
}
|
|
||||||
|
|
||||||
// At this point everything is ready. The write() function won't
|
|
||||||
// have any issues writing to the UART TX register if it needs to!
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Store the new head value - The main loop will retry until the value is stable
|
|
||||||
rx_buffer.head = h;
|
|
||||||
}
|
|
||||||
|
|
||||||
// (called with TX irqs disabled)
|
|
||||||
template<typename Cfg>
|
|
||||||
FORCE_INLINE void MarlinSerial<Cfg>::_tx_udr_empty_irq() {
|
|
||||||
if (Cfg::TX_SIZE > 0) {
|
|
||||||
// Read positions
|
|
||||||
uint8_t t = tx_buffer.tail;
|
|
||||||
const uint8_t h = tx_buffer.head;
|
|
||||||
|
|
||||||
if (Cfg::XONOFF) {
|
|
||||||
// If an XON char is pending to be sent, do it now
|
|
||||||
if (xon_xoff_state == XON_CHAR) {
|
|
||||||
|
|
||||||
// Send the character
|
|
||||||
R_UDR = XON_CHAR;
|
|
||||||
|
|
||||||
// clear the TXC bit -- "can be cleared by writing a one to its bit
|
|
||||||
// location". This makes sure flush() won't return until the bytes
|
|
||||||
// actually got written
|
|
||||||
B_TXC = 1;
|
|
||||||
|
|
||||||
// Remember we sent it.
|
|
||||||
xon_xoff_state = XON_CHAR | XON_XOFF_CHAR_SENT;
|
|
||||||
|
|
||||||
// If nothing else to transmit, just disable TX interrupts.
|
|
||||||
if (h == t) B_UDRIE = 0; // (Non-atomic, could be reenabled by the main program, but eventually this will succeed)
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// If nothing to transmit, just disable TX interrupts. This could
|
|
||||||
// happen as the result of the non atomicity of the disabling of RX
|
|
||||||
// interrupts that could end reenabling TX interrupts as a side effect.
|
|
||||||
if (h == t) {
|
|
||||||
B_UDRIE = 0; // (Non-atomic, could be reenabled by the main program, but eventually this will succeed)
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// There is something to TX, Send the next byte
|
|
||||||
const uint8_t c = tx_buffer.buffer[t];
|
|
||||||
t = (t + 1) & (Cfg::TX_SIZE - 1);
|
|
||||||
R_UDR = c;
|
|
||||||
tx_buffer.tail = t;
|
|
||||||
|
|
||||||
// Clear the TXC bit (by writing a one to its bit location).
|
|
||||||
// Ensures flush() won't return until the bytes are actually written/
|
|
||||||
B_TXC = 1;
|
|
||||||
|
|
||||||
// Disable interrupts if there is nothing to transmit following this byte
|
|
||||||
if (h == t) B_UDRIE = 0; // (Non-atomic, could be reenabled by the main program, but eventually this will succeed)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Public Methods
|
|
||||||
template<typename Cfg>
|
|
||||||
void MarlinSerial<Cfg>::begin(const long baud) {
|
|
||||||
uint16_t baud_setting;
|
|
||||||
bool useU2X = true;
|
|
||||||
|
|
||||||
#if F_CPU == 16000000UL && SERIAL_PORT == 0
|
|
||||||
// Hard-coded exception for compatibility with the bootloader shipped
|
|
||||||
// with the Duemilanove and previous boards, and the firmware on the
|
|
||||||
// 8U2 on the Uno and Mega 2560.
|
|
||||||
if (baud == 57600) useU2X = false;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
R_UCSRA = 0;
|
|
||||||
if (useU2X) {
|
|
||||||
B_U2X = 1;
|
|
||||||
baud_setting = (F_CPU / 4 / baud - 1) / 2;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
baud_setting = (F_CPU / 8 / baud - 1) / 2;
|
|
||||||
|
|
||||||
// assign the baud_setting, a.k.a. ubbr (USART Baud Rate Register)
|
|
||||||
R_UBRRH = baud_setting >> 8;
|
|
||||||
R_UBRRL = baud_setting;
|
|
||||||
|
|
||||||
B_RXEN = 1;
|
|
||||||
B_TXEN = 1;
|
|
||||||
B_RXCIE = 1;
|
|
||||||
if (Cfg::TX_SIZE > 0) B_UDRIE = 0;
|
|
||||||
_written = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename Cfg>
|
|
||||||
void MarlinSerial<Cfg>::end() {
|
|
||||||
B_RXEN = 0;
|
|
||||||
B_TXEN = 0;
|
|
||||||
B_RXCIE = 0;
|
|
||||||
B_UDRIE = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename Cfg>
|
|
||||||
int MarlinSerial<Cfg>::peek() {
|
|
||||||
const ring_buffer_pos_t h = atomic_read_rx_head(), t = rx_buffer.tail;
|
|
||||||
return h == t ? -1 : rx_buffer.buffer[t];
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename Cfg>
|
|
||||||
int MarlinSerial<Cfg>::read() {
|
|
||||||
const ring_buffer_pos_t h = atomic_read_rx_head();
|
|
||||||
|
|
||||||
// Read the tail. Main thread owns it, so it is safe to directly read it
|
|
||||||
ring_buffer_pos_t t = rx_buffer.tail;
|
|
||||||
|
|
||||||
// If nothing to read, return now
|
|
||||||
if (h == t) return -1;
|
|
||||||
|
|
||||||
// Get the next char
|
|
||||||
const int v = rx_buffer.buffer[t];
|
|
||||||
t = (ring_buffer_pos_t)(t + 1) & (Cfg::RX_SIZE - 1);
|
|
||||||
|
|
||||||
// Advance tail - Making sure the RX ISR will always get an stable value, even
|
|
||||||
// if it interrupts the writing of the value of that variable in the middle.
|
|
||||||
atomic_set_rx_tail(t);
|
|
||||||
|
|
||||||
if (Cfg::XONOFF) {
|
|
||||||
// If the XOFF char was sent, or about to be sent...
|
|
||||||
if ((xon_xoff_state & XON_XOFF_CHAR_MASK) == XOFF_CHAR) {
|
|
||||||
// Get count of bytes in the RX buffer
|
|
||||||
const ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(h - t) & (ring_buffer_pos_t)(Cfg::RX_SIZE - 1);
|
|
||||||
if (rx_count < (Cfg::RX_SIZE) / 10) {
|
|
||||||
if (Cfg::TX_SIZE > 0) {
|
|
||||||
// Signal we want an XON character to be sent.
|
|
||||||
xon_xoff_state = XON_CHAR;
|
|
||||||
// Enable TX ISR. Non atomic, but it will eventually enable them
|
|
||||||
B_UDRIE = 1;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// If not using TX interrupts, we must send the XON char now
|
|
||||||
xon_xoff_state = XON_CHAR | XON_XOFF_CHAR_SENT;
|
|
||||||
while (!B_UDRE) sw_barrier();
|
|
||||||
R_UDR = XON_CHAR;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return v;
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename Cfg>
|
|
||||||
typename MarlinSerial<Cfg>::ring_buffer_pos_t MarlinSerial<Cfg>::available() {
|
|
||||||
const ring_buffer_pos_t h = atomic_read_rx_head(), t = rx_buffer.tail;
|
|
||||||
return (ring_buffer_pos_t)(Cfg::RX_SIZE + h - t) & (Cfg::RX_SIZE - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename Cfg>
|
|
||||||
void MarlinSerial<Cfg>::flush() {
|
|
||||||
|
|
||||||
// Set the tail to the head:
|
|
||||||
// - Read the RX head index in a safe way. (See atomic_read_rx_head.)
|
|
||||||
// - Set the tail, making sure the RX ISR will always get a stable value, even
|
|
||||||
// if it interrupts the writing of the value of that variable in the middle.
|
|
||||||
atomic_set_rx_tail(atomic_read_rx_head());
|
|
||||||
|
|
||||||
if (Cfg::XONOFF) {
|
|
||||||
// If the XOFF char was sent, or about to be sent...
|
|
||||||
if ((xon_xoff_state & XON_XOFF_CHAR_MASK) == XOFF_CHAR) {
|
|
||||||
if (Cfg::TX_SIZE > 0) {
|
|
||||||
// Signal we want an XON character to be sent.
|
|
||||||
xon_xoff_state = XON_CHAR;
|
|
||||||
// Enable TX ISR. Non atomic, but it will eventually enable it.
|
|
||||||
B_UDRIE = 1;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// If not using TX interrupts, we must send the XON char now
|
|
||||||
xon_xoff_state = XON_CHAR | XON_XOFF_CHAR_SENT;
|
|
||||||
while (!B_UDRE) sw_barrier();
|
|
||||||
R_UDR = XON_CHAR;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename Cfg>
|
|
||||||
void MarlinSerial<Cfg>::write(const uint8_t c) {
|
|
||||||
if (Cfg::TX_SIZE == 0) {
|
|
||||||
|
|
||||||
_written = true;
|
|
||||||
while (!B_UDRE) sw_barrier();
|
|
||||||
R_UDR = c;
|
|
||||||
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
|
|
||||||
_written = true;
|
|
||||||
|
|
||||||
// If the TX interrupts are disabled and the data register
|
|
||||||
// is empty, just write the byte to the data register and
|
|
||||||
// be done. This shortcut helps significantly improve the
|
|
||||||
// effective datarate at high (>500kbit/s) bitrates, where
|
|
||||||
// interrupt overhead becomes a slowdown.
|
|
||||||
// Yes, there is a race condition between the sending of the
|
|
||||||
// XOFF char at the RX ISR, but it is properly handled there
|
|
||||||
if (!B_UDRIE && B_UDRE) {
|
|
||||||
R_UDR = c;
|
|
||||||
|
|
||||||
// clear the TXC bit -- "can be cleared by writing a one to its bit
|
|
||||||
// location". This makes sure flush() won't return until the bytes
|
|
||||||
// actually got written
|
|
||||||
B_TXC = 1;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const uint8_t i = (tx_buffer.head + 1) & (Cfg::TX_SIZE - 1);
|
|
||||||
|
|
||||||
// If global interrupts are disabled (as the result of being called from an ISR)...
|
|
||||||
if (!ISRS_ENABLED()) {
|
|
||||||
|
|
||||||
// Make room by polling if it is possible to transmit, and do so!
|
|
||||||
while (i == tx_buffer.tail) {
|
|
||||||
|
|
||||||
// If we can transmit another byte, do it.
|
|
||||||
if (B_UDRE) _tx_udr_empty_irq();
|
|
||||||
|
|
||||||
// Make sure compiler rereads tx_buffer.tail
|
|
||||||
sw_barrier();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// Interrupts are enabled, just wait until there is space
|
|
||||||
while (i == tx_buffer.tail) sw_barrier();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Store new char. head is always safe to move
|
|
||||||
tx_buffer.buffer[tx_buffer.head] = c;
|
|
||||||
tx_buffer.head = i;
|
|
||||||
|
|
||||||
// Enable TX ISR - Non atomic, but it will eventually enable TX ISR
|
|
||||||
B_UDRIE = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename Cfg>
|
|
||||||
void MarlinSerial<Cfg>::flushTX() {
|
|
||||||
|
|
||||||
if (Cfg::TX_SIZE == 0) {
|
|
||||||
// No bytes written, no need to flush. This special case is needed since there's
|
|
||||||
// no way to force the TXC (transmit complete) bit to 1 during initialization.
|
|
||||||
if (!_written) return;
|
|
||||||
|
|
||||||
// Wait until everything was transmitted
|
|
||||||
while (!B_TXC) sw_barrier();
|
|
||||||
|
|
||||||
// At this point nothing is queued anymore (DRIE is disabled) and
|
|
||||||
// the hardware finished transmission (TXC is set).
|
|
||||||
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
|
|
||||||
// No bytes written, no need to flush. This special case is needed since there's
|
|
||||||
// no way to force the TXC (transmit complete) bit to 1 during initialization.
|
|
||||||
if (!_written) return;
|
|
||||||
|
|
||||||
// If global interrupts are disabled (as the result of being called from an ISR)...
|
|
||||||
if (!ISRS_ENABLED()) {
|
|
||||||
|
|
||||||
// Wait until everything was transmitted - We must do polling, as interrupts are disabled
|
|
||||||
while (tx_buffer.head != tx_buffer.tail || !B_TXC) {
|
|
||||||
|
|
||||||
// If there is more space, send an extra character
|
|
||||||
if (B_UDRE) _tx_udr_empty_irq();
|
|
||||||
|
|
||||||
sw_barrier();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// Wait until everything was transmitted
|
|
||||||
while (tx_buffer.head != tx_buffer.tail || !B_TXC) sw_barrier();
|
|
||||||
}
|
|
||||||
|
|
||||||
// At this point nothing is queued anymore (DRIE is disabled) and
|
|
||||||
// the hardware finished transmission (TXC is set).
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Hookup ISR handlers
|
|
||||||
ISR(SERIAL_REGNAME(USART, SERIAL_PORT, _RX_vect)) {
|
|
||||||
MarlinSerial<MarlinSerialCfg<SERIAL_PORT>>::store_rxd_char();
|
|
||||||
}
|
|
||||||
|
|
||||||
ISR(SERIAL_REGNAME(USART, SERIAL_PORT, _UDRE_vect)) {
|
|
||||||
MarlinSerial<MarlinSerialCfg<SERIAL_PORT>>::_tx_udr_empty_irq();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Because of the template definition above, it's required to instantiate the template to have all methods generated
|
|
||||||
template class MarlinSerial< MarlinSerialCfg<SERIAL_PORT> >;
|
|
||||||
MSerialT1 customizedSerial1(MSerialT1::HasEmergencyParser);
|
|
||||||
|
|
||||||
#ifdef SERIAL_PORT_2
|
|
||||||
|
|
||||||
// Hookup ISR handlers
|
|
||||||
ISR(SERIAL_REGNAME(USART, SERIAL_PORT_2, _RX_vect)) {
|
|
||||||
MarlinSerial<MarlinSerialCfg<SERIAL_PORT_2>>::store_rxd_char();
|
|
||||||
}
|
|
||||||
|
|
||||||
ISR(SERIAL_REGNAME(USART, SERIAL_PORT_2, _UDRE_vect)) {
|
|
||||||
MarlinSerial<MarlinSerialCfg<SERIAL_PORT_2>>::_tx_udr_empty_irq();
|
|
||||||
}
|
|
||||||
|
|
||||||
template class MarlinSerial< MarlinSerialCfg<SERIAL_PORT_2> >;
|
|
||||||
MSerialT2 customizedSerial2(MSerialT2::HasEmergencyParser);
|
|
||||||
|
|
||||||
#endif // SERIAL_PORT_2
|
|
||||||
|
|
||||||
#ifdef SERIAL_PORT_3
|
|
||||||
|
|
||||||
// Hookup ISR handlers
|
|
||||||
ISR(SERIAL_REGNAME(USART, SERIAL_PORT_3, _RX_vect)) {
|
|
||||||
MarlinSerial<MarlinSerialCfg<SERIAL_PORT_3>>::store_rxd_char();
|
|
||||||
}
|
|
||||||
|
|
||||||
ISR(SERIAL_REGNAME(USART, SERIAL_PORT_3, _UDRE_vect)) {
|
|
||||||
MarlinSerial<MarlinSerialCfg<SERIAL_PORT_3>>::_tx_udr_empty_irq();
|
|
||||||
}
|
|
||||||
|
|
||||||
template class MarlinSerial< MarlinSerialCfg<SERIAL_PORT_3> >;
|
|
||||||
MSerialT3 customizedSerial3(MSerialT3::HasEmergencyParser);
|
|
||||||
|
|
||||||
#endif // SERIAL_PORT_3
|
|
||||||
|
|
||||||
#ifdef MMU2_SERIAL_PORT
|
|
||||||
|
|
||||||
ISR(SERIAL_REGNAME(USART, MMU2_SERIAL_PORT, _RX_vect)) {
|
|
||||||
MarlinSerial<MMU2SerialCfg<MMU2_SERIAL_PORT>>::store_rxd_char();
|
|
||||||
}
|
|
||||||
|
|
||||||
ISR(SERIAL_REGNAME(USART, MMU2_SERIAL_PORT, _UDRE_vect)) {
|
|
||||||
MarlinSerial<MMU2SerialCfg<MMU2_SERIAL_PORT>>::_tx_udr_empty_irq();
|
|
||||||
}
|
|
||||||
|
|
||||||
template class MarlinSerial< MMU2SerialCfg<MMU2_SERIAL_PORT> >;
|
|
||||||
MSerialMMU2 mmuSerial(MSerialMMU2::HasEmergencyParser);
|
|
||||||
|
|
||||||
#endif // MMU2_SERIAL_PORT
|
|
||||||
|
|
||||||
#ifdef LCD_SERIAL_PORT
|
|
||||||
|
|
||||||
ISR(SERIAL_REGNAME(USART, LCD_SERIAL_PORT, _RX_vect)) {
|
|
||||||
MarlinSerial<LCDSerialCfg<LCD_SERIAL_PORT>>::store_rxd_char();
|
|
||||||
}
|
|
||||||
|
|
||||||
ISR(SERIAL_REGNAME(USART, LCD_SERIAL_PORT, _UDRE_vect)) {
|
|
||||||
MarlinSerial<LCDSerialCfg<LCD_SERIAL_PORT>>::_tx_udr_empty_irq();
|
|
||||||
}
|
|
||||||
|
|
||||||
template class MarlinSerial< LCDSerialCfg<LCD_SERIAL_PORT> >;
|
|
||||||
MSerialLCD lcdSerial(MSerialLCD::HasEmergencyParser);
|
|
||||||
|
|
||||||
#if HAS_DGUS_LCD
|
|
||||||
template<typename Cfg>
|
|
||||||
typename MarlinSerial<Cfg>::ring_buffer_pos_t MarlinSerial<Cfg>::get_tx_buffer_free() {
|
|
||||||
const ring_buffer_pos_t t = tx_buffer.tail, // next byte to send.
|
|
||||||
h = tx_buffer.head; // next pos for queue.
|
|
||||||
int ret = t - h - 1;
|
|
||||||
if (ret < 0) ret += Cfg::TX_SIZE + 1;
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // LCD_SERIAL_PORT
|
|
||||||
|
|
||||||
#endif // !USBCON && (UBRRH || UBRR0H || UBRR1H || UBRR2H || UBRR3H)
|
|
||||||
|
|
||||||
// For AT90USB targets use the UART for BT interfacing
|
|
||||||
#if defined(USBCON) && ENABLED(BLUETOOTH)
|
|
||||||
MSerialBT bluetoothSerial(false);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // __AVR__
|
|
||||||
@@ -1,297 +0,0 @@
|
|||||||
/**
|
|
||||||
* Marlin 3D Printer Firmware
|
|
||||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
|
||||||
*
|
|
||||||
* Based on Sprinter and grbl.
|
|
||||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
/**
|
|
||||||
* MarlinSerial.h - Hardware serial library for Wiring
|
|
||||||
* Copyright (c) 2006 Nicholas Zambetti. All right reserved.
|
|
||||||
*
|
|
||||||
* Modified 28 September 2010 by Mark Sproul
|
|
||||||
* Modified 14 February 2016 by Andreas Hardtung (added tx buffer)
|
|
||||||
* Modified 01 October 2017 by Eduardo José Tagle (added XON/XOFF)
|
|
||||||
* Templatized 01 October 2018 by Eduardo José Tagle to allow multiple instances
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <WString.h>
|
|
||||||
|
|
||||||
#include "../../inc/MarlinConfigPre.h"
|
|
||||||
#include "../../core/serial_hook.h"
|
|
||||||
|
|
||||||
#ifndef SERIAL_PORT
|
|
||||||
#define SERIAL_PORT 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef USBCON
|
|
||||||
|
|
||||||
// The presence of the UBRRH register is used to detect a UART.
|
|
||||||
#define UART_PRESENT(port) ((port == 0 && (defined(UBRRH) || defined(UBRR0H))) || \
|
|
||||||
(port == 1 && defined(UBRR1H)) || (port == 2 && defined(UBRR2H)) || \
|
|
||||||
(port == 3 && defined(UBRR3H)))
|
|
||||||
|
|
||||||
// These are macros to build serial port register names for the selected SERIAL_PORT (C preprocessor
|
|
||||||
// requires two levels of indirection to expand macro values properly)
|
|
||||||
#define SERIAL_REGNAME(registerbase,number,suffix) _SERIAL_REGNAME(registerbase,number,suffix)
|
|
||||||
#if SERIAL_PORT == 0 && (!defined(UBRR0H) || !defined(UDR0)) // use un-numbered registers if necessary
|
|
||||||
#define _SERIAL_REGNAME(registerbase,number,suffix) registerbase##suffix
|
|
||||||
#else
|
|
||||||
#define _SERIAL_REGNAME(registerbase,number,suffix) registerbase##number##suffix
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Registers used by MarlinSerial class (expanded depending on selected serial port)
|
|
||||||
|
|
||||||
// Templated 8bit register (generic)
|
|
||||||
#define UART_REGISTER_DECL_BASE(registerbase, suffix) \
|
|
||||||
template<int portNr> struct R_##registerbase##x##suffix {}
|
|
||||||
|
|
||||||
// Templated 8bit register (specialization for each port)
|
|
||||||
#define UART_REGISTER_DECL(port, registerbase, suffix) \
|
|
||||||
template<> struct R_##registerbase##x##suffix<port> { \
|
|
||||||
constexpr R_##registerbase##x##suffix(int) {} \
|
|
||||||
FORCE_INLINE void operator=(uint8_t newVal) const { SERIAL_REGNAME(registerbase,port,suffix) = newVal; } \
|
|
||||||
FORCE_INLINE operator uint8_t() const { return SERIAL_REGNAME(registerbase,port,suffix); } \
|
|
||||||
}
|
|
||||||
|
|
||||||
// Templated 1bit register (generic)
|
|
||||||
#define UART_BIT_DECL_BASE(registerbase, suffix, bit) \
|
|
||||||
template<int portNr>struct B_##bit##x {}
|
|
||||||
|
|
||||||
// Templated 1bit register (specialization for each port)
|
|
||||||
#define UART_BIT_DECL(port, registerbase, suffix, bit) \
|
|
||||||
template<> struct B_##bit##x<port> { \
|
|
||||||
constexpr B_##bit##x(int) {} \
|
|
||||||
FORCE_INLINE void operator=(int newVal) const { \
|
|
||||||
if (newVal) \
|
|
||||||
SBI(SERIAL_REGNAME(registerbase,port,suffix),SERIAL_REGNAME(bit,port,)); \
|
|
||||||
else \
|
|
||||||
CBI(SERIAL_REGNAME(registerbase,port,suffix),SERIAL_REGNAME(bit,port,)); \
|
|
||||||
} \
|
|
||||||
FORCE_INLINE operator bool() const { return TEST(SERIAL_REGNAME(registerbase,port,suffix),SERIAL_REGNAME(bit,port,)); } \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define UART_DECL_BASE() \
|
|
||||||
UART_REGISTER_DECL_BASE(UCSR,A);\
|
|
||||||
UART_REGISTER_DECL_BASE(UDR,);\
|
|
||||||
UART_REGISTER_DECL_BASE(UBRR,H);\
|
|
||||||
UART_REGISTER_DECL_BASE(UBRR,L);\
|
|
||||||
UART_BIT_DECL_BASE(UCSR,B,RXEN);\
|
|
||||||
UART_BIT_DECL_BASE(UCSR,B,TXEN);\
|
|
||||||
UART_BIT_DECL_BASE(UCSR,A,TXC);\
|
|
||||||
UART_BIT_DECL_BASE(UCSR,B,RXCIE);\
|
|
||||||
UART_BIT_DECL_BASE(UCSR,A,UDRE);\
|
|
||||||
UART_BIT_DECL_BASE(UCSR,A,FE);\
|
|
||||||
UART_BIT_DECL_BASE(UCSR,A,DOR);\
|
|
||||||
UART_BIT_DECL_BASE(UCSR,B,UDRIE);\
|
|
||||||
UART_BIT_DECL_BASE(UCSR,A,RXC);\
|
|
||||||
UART_BIT_DECL_BASE(UCSR,A,U2X)
|
|
||||||
|
|
||||||
#define UART_DECL(port) \
|
|
||||||
UART_REGISTER_DECL(port,UCSR,A);\
|
|
||||||
UART_REGISTER_DECL(port,UDR,);\
|
|
||||||
UART_REGISTER_DECL(port,UBRR,H);\
|
|
||||||
UART_REGISTER_DECL(port,UBRR,L);\
|
|
||||||
UART_BIT_DECL(port,UCSR,B,RXEN);\
|
|
||||||
UART_BIT_DECL(port,UCSR,B,TXEN);\
|
|
||||||
UART_BIT_DECL(port,UCSR,A,TXC);\
|
|
||||||
UART_BIT_DECL(port,UCSR,B,RXCIE);\
|
|
||||||
UART_BIT_DECL(port,UCSR,A,UDRE);\
|
|
||||||
UART_BIT_DECL(port,UCSR,A,FE);\
|
|
||||||
UART_BIT_DECL(port,UCSR,A,DOR);\
|
|
||||||
UART_BIT_DECL(port,UCSR,B,UDRIE);\
|
|
||||||
UART_BIT_DECL(port,UCSR,A,RXC);\
|
|
||||||
UART_BIT_DECL(port,UCSR,A,U2X)
|
|
||||||
|
|
||||||
// Declare empty templates
|
|
||||||
UART_DECL_BASE();
|
|
||||||
|
|
||||||
// And all the specializations for each possible serial port
|
|
||||||
#if UART_PRESENT(0)
|
|
||||||
UART_DECL(0);
|
|
||||||
#endif
|
|
||||||
#if UART_PRESENT(1)
|
|
||||||
UART_DECL(1);
|
|
||||||
#endif
|
|
||||||
#if UART_PRESENT(2)
|
|
||||||
UART_DECL(2);
|
|
||||||
#endif
|
|
||||||
#if UART_PRESENT(3)
|
|
||||||
UART_DECL(3);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define BYTE 0
|
|
||||||
|
|
||||||
// Templated type selector
|
|
||||||
template<bool b, typename T, typename F> struct TypeSelector { typedef T type;} ;
|
|
||||||
template<typename T, typename F> struct TypeSelector<false, T, F> { typedef F type; };
|
|
||||||
|
|
||||||
template<typename Cfg>
|
|
||||||
class MarlinSerial {
|
|
||||||
protected:
|
|
||||||
// Registers
|
|
||||||
static constexpr R_UCSRxA<Cfg::PORT> R_UCSRA = 0;
|
|
||||||
static constexpr R_UDRx<Cfg::PORT> R_UDR = 0;
|
|
||||||
static constexpr R_UBRRxH<Cfg::PORT> R_UBRRH = 0;
|
|
||||||
static constexpr R_UBRRxL<Cfg::PORT> R_UBRRL = 0;
|
|
||||||
|
|
||||||
// Bits
|
|
||||||
static constexpr B_RXENx<Cfg::PORT> B_RXEN = 0;
|
|
||||||
static constexpr B_TXENx<Cfg::PORT> B_TXEN = 0;
|
|
||||||
static constexpr B_TXCx<Cfg::PORT> B_TXC = 0;
|
|
||||||
static constexpr B_RXCIEx<Cfg::PORT> B_RXCIE = 0;
|
|
||||||
static constexpr B_UDREx<Cfg::PORT> B_UDRE = 0;
|
|
||||||
static constexpr B_FEx<Cfg::PORT> B_FE = 0;
|
|
||||||
static constexpr B_DORx<Cfg::PORT> B_DOR = 0;
|
|
||||||
static constexpr B_UDRIEx<Cfg::PORT> B_UDRIE = 0;
|
|
||||||
static constexpr B_RXCx<Cfg::PORT> B_RXC = 0;
|
|
||||||
static constexpr B_U2Xx<Cfg::PORT> B_U2X = 0;
|
|
||||||
|
|
||||||
// Base size of type on buffer size
|
|
||||||
typedef typename TypeSelector<(Cfg::RX_SIZE>256), uint16_t, uint8_t>::type ring_buffer_pos_t;
|
|
||||||
|
|
||||||
struct ring_buffer_r {
|
|
||||||
volatile ring_buffer_pos_t head, tail;
|
|
||||||
unsigned char buffer[Cfg::RX_SIZE];
|
|
||||||
};
|
|
||||||
|
|
||||||
struct ring_buffer_t {
|
|
||||||
volatile uint8_t head, tail;
|
|
||||||
unsigned char buffer[Cfg::TX_SIZE];
|
|
||||||
};
|
|
||||||
|
|
||||||
static ring_buffer_r rx_buffer;
|
|
||||||
static ring_buffer_t tx_buffer;
|
|
||||||
static bool _written;
|
|
||||||
|
|
||||||
static constexpr uint8_t XON_XOFF_CHAR_SENT = 0x80, // XON / XOFF Character was sent
|
|
||||||
XON_XOFF_CHAR_MASK = 0x1F; // XON / XOFF character to send
|
|
||||||
|
|
||||||
// XON / XOFF character definitions
|
|
||||||
static constexpr uint8_t XON_CHAR = 17, XOFF_CHAR = 19;
|
|
||||||
static uint8_t xon_xoff_state,
|
|
||||||
rx_dropped_bytes,
|
|
||||||
rx_buffer_overruns,
|
|
||||||
rx_framing_errors;
|
|
||||||
static ring_buffer_pos_t rx_max_enqueued;
|
|
||||||
|
|
||||||
static FORCE_INLINE ring_buffer_pos_t atomic_read_rx_head();
|
|
||||||
|
|
||||||
static volatile bool rx_tail_value_not_stable;
|
|
||||||
static volatile uint16_t rx_tail_value_backup;
|
|
||||||
|
|
||||||
static FORCE_INLINE void atomic_set_rx_tail(ring_buffer_pos_t value);
|
|
||||||
static FORCE_INLINE ring_buffer_pos_t atomic_read_rx_tail();
|
|
||||||
|
|
||||||
public:
|
|
||||||
FORCE_INLINE static void store_rxd_char();
|
|
||||||
FORCE_INLINE static void _tx_udr_empty_irq();
|
|
||||||
|
|
||||||
public:
|
|
||||||
static void begin(const long);
|
|
||||||
static void end();
|
|
||||||
static int peek();
|
|
||||||
static int read();
|
|
||||||
static void flush();
|
|
||||||
static ring_buffer_pos_t available();
|
|
||||||
static void write(const uint8_t c);
|
|
||||||
static void flushTX();
|
|
||||||
#if HAS_DGUS_LCD
|
|
||||||
static ring_buffer_pos_t get_tx_buffer_free();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
enum { HasEmergencyParser = Cfg::EMERGENCYPARSER };
|
|
||||||
static inline bool emergency_parser_enabled() { return Cfg::EMERGENCYPARSER; }
|
|
||||||
|
|
||||||
FORCE_INLINE static uint8_t dropped() { return Cfg::DROPPED_RX ? rx_dropped_bytes : 0; }
|
|
||||||
FORCE_INLINE static uint8_t buffer_overruns() { return Cfg::RX_OVERRUNS ? rx_buffer_overruns : 0; }
|
|
||||||
FORCE_INLINE static uint8_t framing_errors() { return Cfg::RX_FRAMING_ERRORS ? rx_framing_errors : 0; }
|
|
||||||
FORCE_INLINE static ring_buffer_pos_t rxMaxEnqueued() { return Cfg::MAX_RX_QUEUED ? rx_max_enqueued : 0; }
|
|
||||||
};
|
|
||||||
|
|
||||||
template <uint8_t serial>
|
|
||||||
struct MarlinSerialCfg {
|
|
||||||
static constexpr int PORT = serial;
|
|
||||||
static constexpr unsigned int RX_SIZE = RX_BUFFER_SIZE;
|
|
||||||
static constexpr unsigned int TX_SIZE = TX_BUFFER_SIZE;
|
|
||||||
static constexpr bool XONOFF = ENABLED(SERIAL_XON_XOFF);
|
|
||||||
static constexpr bool EMERGENCYPARSER = ENABLED(EMERGENCY_PARSER);
|
|
||||||
static constexpr bool DROPPED_RX = ENABLED(SERIAL_STATS_DROPPED_RX);
|
|
||||||
static constexpr bool RX_OVERRUNS = ENABLED(SERIAL_STATS_RX_BUFFER_OVERRUNS);
|
|
||||||
static constexpr bool RX_FRAMING_ERRORS = ENABLED(SERIAL_STATS_RX_FRAMING_ERRORS);
|
|
||||||
static constexpr bool MAX_RX_QUEUED = ENABLED(SERIAL_STATS_MAX_RX_QUEUED);
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef Serial1Class< MarlinSerial< MarlinSerialCfg<SERIAL_PORT> > > MSerialT1;
|
|
||||||
extern MSerialT1 customizedSerial1;
|
|
||||||
|
|
||||||
#ifdef SERIAL_PORT_2
|
|
||||||
typedef Serial1Class< MarlinSerial< MarlinSerialCfg<SERIAL_PORT_2> > > MSerialT2;
|
|
||||||
extern MSerialT2 customizedSerial2;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef SERIAL_PORT_3
|
|
||||||
typedef Serial1Class< MarlinSerial< MarlinSerialCfg<SERIAL_PORT_3> > > MSerialT3;
|
|
||||||
extern MSerialT3 customizedSerial3;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // !USBCON
|
|
||||||
|
|
||||||
#ifdef MMU2_SERIAL_PORT
|
|
||||||
template <uint8_t serial>
|
|
||||||
struct MMU2SerialCfg {
|
|
||||||
static constexpr int PORT = serial;
|
|
||||||
static constexpr unsigned int RX_SIZE = 32;
|
|
||||||
static constexpr unsigned int TX_SIZE = 32;
|
|
||||||
static constexpr bool XONOFF = false;
|
|
||||||
static constexpr bool EMERGENCYPARSER = false;
|
|
||||||
static constexpr bool DROPPED_RX = false;
|
|
||||||
static constexpr bool RX_FRAMING_ERRORS = false;
|
|
||||||
static constexpr bool MAX_RX_QUEUED = false;
|
|
||||||
static constexpr bool RX_OVERRUNS = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef Serial1Class< MarlinSerial< MMU2SerialCfg<MMU2_SERIAL_PORT> > > MSerialMMU2;
|
|
||||||
extern MSerialMMU2 mmuSerial;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef LCD_SERIAL_PORT
|
|
||||||
|
|
||||||
template <uint8_t serial>
|
|
||||||
struct LCDSerialCfg {
|
|
||||||
static constexpr int PORT = serial;
|
|
||||||
static constexpr unsigned int RX_SIZE = TERN(HAS_DGUS_LCD, DGUS_RX_BUFFER_SIZE, 64);
|
|
||||||
static constexpr unsigned int TX_SIZE = TERN(HAS_DGUS_LCD, DGUS_TX_BUFFER_SIZE, 128);
|
|
||||||
static constexpr bool XONOFF = false;
|
|
||||||
static constexpr bool EMERGENCYPARSER = ENABLED(EMERGENCY_PARSER);
|
|
||||||
static constexpr bool DROPPED_RX = false;
|
|
||||||
static constexpr bool RX_FRAMING_ERRORS = false;
|
|
||||||
static constexpr bool MAX_RX_QUEUED = false;
|
|
||||||
static constexpr bool RX_OVERRUNS = BOTH(HAS_DGUS_LCD, SERIAL_STATS_RX_BUFFER_OVERRUNS);
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef Serial1Class< MarlinSerial< LCDSerialCfg<LCD_SERIAL_PORT> > > MSerialLCD;
|
|
||||||
extern MSerialLCD lcdSerial;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Use the UART for Bluetooth in AT90USB configurations
|
|
||||||
#if defined(USBCON) && ENABLED(BLUETOOTH)
|
|
||||||
typedef Serial1Class<HardwareSerial> MSerialBT;
|
|
||||||
extern MSerialBT bluetoothSerial;
|
|
||||||
#endif
|
|
||||||
@@ -1,216 +0,0 @@
|
|||||||
/**
|
|
||||||
* Marlin 3D Printer Firmware
|
|
||||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
|
||||||
*
|
|
||||||
* Based on Sprinter and grbl.
|
|
||||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* servo.cpp - Interrupt driven Servo library for Arduino using 16 bit timers- Version 2
|
|
||||||
* Copyright (c) 2009 Michael Margolis. All right reserved.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A servo is activated by creating an instance of the Servo class passing the desired pin to the attach() method.
|
|
||||||
* The servos are pulsed in the background using the value most recently written using the write() method
|
|
||||||
*
|
|
||||||
* Note that analogWrite of PWM on pins associated with the timer are disabled when the first servo is attached.
|
|
||||||
* Timers are seized as needed in groups of 12 servos - 24 servos use two timers, 48 servos will use four.
|
|
||||||
*
|
|
||||||
* The methods are:
|
|
||||||
*
|
|
||||||
* Servo - Class for manipulating servo motors connected to Arduino pins.
|
|
||||||
*
|
|
||||||
* attach(pin) - Attach a servo motor to an i/o pin.
|
|
||||||
* attach(pin, min, max) - Attach to a pin, setting min and max values in microseconds
|
|
||||||
* Default min is 544, max is 2400
|
|
||||||
*
|
|
||||||
* write() - Set the servo angle in degrees. (Invalid angles —over MIN_PULSE_WIDTH— are treated as µs.)
|
|
||||||
* writeMicroseconds() - Set the servo pulse width in microseconds.
|
|
||||||
* move(pin, angle) - Sequence of attach(pin), write(angle), safe_delay(servo_delay[servoIndex]).
|
|
||||||
* With DEACTIVATE_SERVOS_AFTER_MOVE it detaches after servo_delay[servoIndex].
|
|
||||||
* read() - Get the last-written servo pulse width as an angle between 0 and 180.
|
|
||||||
* readMicroseconds() - Get the last-written servo pulse width in microseconds.
|
|
||||||
* attached() - Return true if a servo is attached.
|
|
||||||
* detach() - Stop an attached servo from pulsing its i/o pin.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef __AVR__
|
|
||||||
|
|
||||||
#include "../../inc/MarlinConfig.h"
|
|
||||||
|
|
||||||
#if HAS_SERVOS
|
|
||||||
|
|
||||||
#include <avr/interrupt.h>
|
|
||||||
|
|
||||||
#include "../shared/servo.h"
|
|
||||||
#include "../shared/servo_private.h"
|
|
||||||
|
|
||||||
static volatile int8_t Channel[_Nbr_16timers]; // counter for the servo being pulsed for each timer (or -1 if refresh interval)
|
|
||||||
|
|
||||||
|
|
||||||
/************ static functions common to all instances ***********************/
|
|
||||||
|
|
||||||
static inline void handle_interrupts(timer16_Sequence_t timer, volatile uint16_t* TCNTn, volatile uint16_t* OCRnA) {
|
|
||||||
if (Channel[timer] < 0)
|
|
||||||
*TCNTn = 0; // channel set to -1 indicated that refresh interval completed so reset the timer
|
|
||||||
else {
|
|
||||||
if (SERVO_INDEX(timer, Channel[timer]) < ServoCount && SERVO(timer, Channel[timer]).Pin.isActive)
|
|
||||||
extDigitalWrite(SERVO(timer, Channel[timer]).Pin.nbr, LOW); // pulse this channel low if activated
|
|
||||||
}
|
|
||||||
|
|
||||||
Channel[timer]++; // increment to the next channel
|
|
||||||
if (SERVO_INDEX(timer, Channel[timer]) < ServoCount && Channel[timer] < SERVOS_PER_TIMER) {
|
|
||||||
*OCRnA = *TCNTn + SERVO(timer, Channel[timer]).ticks;
|
|
||||||
if (SERVO(timer, Channel[timer]).Pin.isActive) // check if activated
|
|
||||||
extDigitalWrite(SERVO(timer, Channel[timer]).Pin.nbr, HIGH); // it's an active channel so pulse it high
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// finished all channels so wait for the refresh period to expire before starting over
|
|
||||||
if (((unsigned)*TCNTn) + 4 < usToTicks(REFRESH_INTERVAL)) // allow a few ticks to ensure the next OCR1A not missed
|
|
||||||
*OCRnA = (unsigned int)usToTicks(REFRESH_INTERVAL);
|
|
||||||
else
|
|
||||||
*OCRnA = *TCNTn + 4; // at least REFRESH_INTERVAL has elapsed
|
|
||||||
Channel[timer] = -1; // this will get incremented at the end of the refresh period to start again at the first channel
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifndef WIRING // Wiring pre-defines signal handlers so don't define any if compiling for the Wiring platform
|
|
||||||
|
|
||||||
// Interrupt handlers for Arduino
|
|
||||||
#ifdef _useTimer1
|
|
||||||
SIGNAL(TIMER1_COMPA_vect) { handle_interrupts(_timer1, &TCNT1, &OCR1A); }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _useTimer3
|
|
||||||
SIGNAL(TIMER3_COMPA_vect) { handle_interrupts(_timer3, &TCNT3, &OCR3A); }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _useTimer4
|
|
||||||
SIGNAL(TIMER4_COMPA_vect) { handle_interrupts(_timer4, &TCNT4, &OCR4A); }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _useTimer5
|
|
||||||
SIGNAL(TIMER5_COMPA_vect) { handle_interrupts(_timer5, &TCNT5, &OCR5A); }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#else // WIRING
|
|
||||||
|
|
||||||
// Interrupt handlers for Wiring
|
|
||||||
#ifdef _useTimer1
|
|
||||||
void Timer1Service() { handle_interrupts(_timer1, &TCNT1, &OCR1A); }
|
|
||||||
#endif
|
|
||||||
#ifdef _useTimer3
|
|
||||||
void Timer3Service() { handle_interrupts(_timer3, &TCNT3, &OCR3A); }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // WIRING
|
|
||||||
|
|
||||||
/****************** end of static functions ******************************/
|
|
||||||
|
|
||||||
void initISR(timer16_Sequence_t timer) {
|
|
||||||
#ifdef _useTimer1
|
|
||||||
if (timer == _timer1) {
|
|
||||||
TCCR1A = 0; // normal counting mode
|
|
||||||
TCCR1B = _BV(CS11); // set prescaler of 8
|
|
||||||
TCNT1 = 0; // clear the timer count
|
|
||||||
#if defined(__AVR_ATmega8__) || defined(__AVR_ATmega128__)
|
|
||||||
SBI(TIFR, OCF1A); // clear any pending interrupts;
|
|
||||||
SBI(TIMSK, OCIE1A); // enable the output compare interrupt
|
|
||||||
#else
|
|
||||||
// here if not ATmega8 or ATmega128
|
|
||||||
SBI(TIFR1, OCF1A); // clear any pending interrupts;
|
|
||||||
SBI(TIMSK1, OCIE1A); // enable the output compare interrupt
|
|
||||||
#endif
|
|
||||||
#ifdef WIRING
|
|
||||||
timerAttach(TIMER1OUTCOMPAREA_INT, Timer1Service);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _useTimer3
|
|
||||||
if (timer == _timer3) {
|
|
||||||
TCCR3A = 0; // normal counting mode
|
|
||||||
TCCR3B = _BV(CS31); // set prescaler of 8
|
|
||||||
TCNT3 = 0; // clear the timer count
|
|
||||||
#ifdef __AVR_ATmega128__
|
|
||||||
SBI(TIFR, OCF3A); // clear any pending interrupts;
|
|
||||||
SBI(ETIMSK, OCIE3A); // enable the output compare interrupt
|
|
||||||
#else
|
|
||||||
SBI(TIFR3, OCF3A); // clear any pending interrupts;
|
|
||||||
SBI(TIMSK3, OCIE3A); // enable the output compare interrupt
|
|
||||||
#endif
|
|
||||||
#ifdef WIRING
|
|
||||||
timerAttach(TIMER3OUTCOMPAREA_INT, Timer3Service); // for Wiring platform only
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _useTimer4
|
|
||||||
if (timer == _timer4) {
|
|
||||||
TCCR4A = 0; // normal counting mode
|
|
||||||
TCCR4B = _BV(CS41); // set prescaler of 8
|
|
||||||
TCNT4 = 0; // clear the timer count
|
|
||||||
TIFR4 = _BV(OCF4A); // clear any pending interrupts;
|
|
||||||
TIMSK4 = _BV(OCIE4A); // enable the output compare interrupt
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _useTimer5
|
|
||||||
if (timer == _timer5) {
|
|
||||||
TCCR5A = 0; // normal counting mode
|
|
||||||
TCCR5B = _BV(CS51); // set prescaler of 8
|
|
||||||
TCNT5 = 0; // clear the timer count
|
|
||||||
TIFR5 = _BV(OCF5A); // clear any pending interrupts;
|
|
||||||
TIMSK5 = _BV(OCIE5A); // enable the output compare interrupt
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void finISR(timer16_Sequence_t timer) {
|
|
||||||
// Disable use of the given timer
|
|
||||||
#ifdef WIRING
|
|
||||||
if (timer == _timer1) {
|
|
||||||
CBI(
|
|
||||||
#if defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__)
|
|
||||||
TIMSK1
|
|
||||||
#else
|
|
||||||
TIMSK
|
|
||||||
#endif
|
|
||||||
, OCIE1A); // disable timer 1 output compare interrupt
|
|
||||||
timerDetach(TIMER1OUTCOMPAREA_INT);
|
|
||||||
}
|
|
||||||
else if (timer == _timer3) {
|
|
||||||
CBI(
|
|
||||||
#if defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__)
|
|
||||||
TIMSK3
|
|
||||||
#else
|
|
||||||
ETIMSK
|
|
||||||
#endif
|
|
||||||
, OCIE3A); // disable the timer3 output compare A interrupt
|
|
||||||
timerDetach(TIMER3OUTCOMPAREA_INT);
|
|
||||||
}
|
|
||||||
#else // !WIRING
|
|
||||||
// For arduino - in future: call here to a currently undefined function to reset the timer
|
|
||||||
UNUSED(timer);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // HAS_SERVOS
|
|
||||||
|
|
||||||
#endif // __AVR__
|
|
||||||
@@ -1,93 +0,0 @@
|
|||||||
/**
|
|
||||||
* Marlin 3D Printer Firmware
|
|
||||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
|
||||||
*
|
|
||||||
* Based on Sprinter and grbl.
|
|
||||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ServoTimers.h - Interrupt driven Servo library for Arduino using 16 bit timers- Version 2
|
|
||||||
* Copyright (c) 2009 Michael Margolis. All right reserved.
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2.1 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Defines for 16 bit timers used with Servo library
|
|
||||||
*
|
|
||||||
* If _useTimerX is defined then TimerX is a 16 bit timer on the current board
|
|
||||||
* timer16_Sequence_t enumerates the sequence that the timers should be allocated
|
|
||||||
* _Nbr_16timers indicates how many 16 bit timers are available.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* AVR Only definitions
|
|
||||||
* --------------------
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define TRIM_DURATION 2 // compensation ticks to trim adjust for digitalWrite delays
|
|
||||||
#define SERVO_TIMER_PRESCALER 8 // timer prescaler
|
|
||||||
|
|
||||||
// Say which 16 bit timers can be used and in what order
|
|
||||||
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
|
|
||||||
//#define _useTimer1
|
|
||||||
#define _useTimer4
|
|
||||||
#if NUM_SERVOS > SERVOS_PER_TIMER
|
|
||||||
#define _useTimer3
|
|
||||||
#if !HAS_MOTOR_CURRENT_PWM && SERVOS > 2 * SERVOS_PER_TIMER
|
|
||||||
#define _useTimer5 // Timer 5 is used for motor current PWM and can't be used for servos.
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#elif defined(__AVR_ATmega32U4__)
|
|
||||||
#define _useTimer3
|
|
||||||
#elif defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__)
|
|
||||||
#define _useTimer3
|
|
||||||
#elif defined(__AVR_ATmega128__) || defined(__AVR_ATmega1281__) || defined(__AVR_ATmega1284P__) || defined(__AVR_ATmega2561__)
|
|
||||||
#define _useTimer3
|
|
||||||
#else
|
|
||||||
// everything else
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
#ifdef _useTimer1
|
|
||||||
_timer1,
|
|
||||||
#endif
|
|
||||||
#ifdef _useTimer3
|
|
||||||
_timer3,
|
|
||||||
#endif
|
|
||||||
#ifdef _useTimer4
|
|
||||||
_timer4,
|
|
||||||
#endif
|
|
||||||
#ifdef _useTimer5
|
|
||||||
_timer5,
|
|
||||||
#endif
|
|
||||||
_Nbr_16timers
|
|
||||||
} timer16_Sequence_t;
|
|
||||||
@@ -1,74 +0,0 @@
|
|||||||
/**
|
|
||||||
* Marlin 3D Printer Firmware
|
|
||||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
|
||||||
*
|
|
||||||
* Based on Sprinter and grbl.
|
|
||||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
#ifdef __AVR__
|
|
||||||
|
|
||||||
#include "../../inc/MarlinConfig.h"
|
|
||||||
|
|
||||||
#if EITHER(EEPROM_SETTINGS, SD_FIRMWARE_UPDATE)
|
|
||||||
|
|
||||||
/**
|
|
||||||
* PersistentStore for Arduino-style EEPROM interface
|
|
||||||
* with implementations supplied by the framework.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "../shared/eeprom_api.h"
|
|
||||||
|
|
||||||
#ifndef MARLIN_EEPROM_SIZE
|
|
||||||
#define MARLIN_EEPROM_SIZE size_t(E2END + 1)
|
|
||||||
#endif
|
|
||||||
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; }
|
|
||||||
bool PersistentStore::access_start() { return true; }
|
|
||||||
bool PersistentStore::access_finish() { return true; }
|
|
||||||
|
|
||||||
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
|
|
||||||
uint16_t written = 0;
|
|
||||||
while (size--) {
|
|
||||||
uint8_t * const p = (uint8_t * const)pos;
|
|
||||||
uint8_t v = *value;
|
|
||||||
if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed!
|
|
||||||
eeprom_write_byte(p, v);
|
|
||||||
if (++written & 0x7F) delay(2); else safe_delay(2); // Avoid triggering watchdog during long EEPROM writes
|
|
||||||
if (eeprom_read_byte(p) != v) {
|
|
||||||
SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
crc16(crc, &v, 1);
|
|
||||||
pos++;
|
|
||||||
value++;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
|
|
||||||
do {
|
|
||||||
uint8_t c = eeprom_read_byte((uint8_t*)pos);
|
|
||||||
if (writing) *value = c;
|
|
||||||
crc16(crc, &c, 1);
|
|
||||||
pos++;
|
|
||||||
value++;
|
|
||||||
} while (--size);
|
|
||||||
return false; // always assume success for AVR's
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // EEPROM_SETTINGS || SD_FIRMWARE_UPDATE
|
|
||||||
#endif // __AVR__
|
|
||||||