clinton/Smoothieware.git
9 years agoput median buffer on stack
Jim Morris [Mon, 22 Dec 2014 05:53:23 +0000 (21:53 -0800)]
put median buffer on stack

9 years agoMerge pull request #569 from Smoothieware/fix/extruder-regression-unstepped-steps
Jim Morris [Mon, 22 Dec 2014 00:57:38 +0000 (16:57 -0800)]
Merge pull request #569 from Smoothieware/fix/extruder-regression-unstepped-steps

add back the unstepped distance to exrtuder follow mode, and refactor tha...

9 years agoadd back the unstepped distance to extuder follow mode, and refactor that code
Jim Morris [Sun, 21 Dec 2014 23:10:33 +0000 (15:10 -0800)]
add back the unstepped distance to extuder follow mode, and refactor that code
Make millimeters_of_travel consistent about what it uses to detect 0.0F

9 years agoMerge pull request #568 from wolfmanjm/upstreamedge
Jim Morris [Sun, 21 Dec 2014 01:45:06 +0000 (17:45 -0800)]
Merge pull request #568 from wolfmanjm/upstreamedge

add M600 as alternative to suspend command

9 years agoadd M600 as alternative to suspend command
Jim Morris [Sun, 21 Dec 2014 01:44:24 +0000 (17:44 -0800)]
add M600 as alternative to suspend command

9 years agoMerge pull request #567 from PetteriAimonen/save_thermistor_ram
Jim Morris [Sat, 20 Dec 2014 08:55:33 +0000 (00:55 -0800)]
Merge pull request #567 from PetteriAimonen/save_thermistor_ram

Save 64 bytes RAM per thermistor by moving median_buffer to AHB0.

9 years agoSave 64 bytes RAM per thermistor by moving median_buffer to AHB0.
Petteri Aimonen [Sat, 20 Dec 2014 08:26:49 +0000 (10:26 +0200)]
Save 64 bytes RAM per thermistor by moving median_buffer to AHB0.

Also we only need one median_buffer (total), because each thermistor
uses it only when quick_median() is running. Actual data is stored
in the queue. So this patch reuses the same buffer for all thermistors.

9 years agoMerge pull request #566 from wolfmanjm/upstreamedge
Jim Morris [Sat, 20 Dec 2014 05:56:30 +0000 (21:56 -0800)]
Merge pull request #566 from wolfmanjm/upstreamedge

semi revert the windup patch, now it is disabled by default can be enabl...

9 years agosemi revert the windup patch, now it is disabled by default can be enabled in config...
Jim Morris [Sat, 20 Dec 2014 05:52:37 +0000 (21:52 -0800)]
semi revert the windup patch, now it is disabled by default can be enabled in config with windup true
needs more work.
Added correct initialization of last temp and iTerm when temp turned on

9 years agoMerge pull request #565 from PetteriAimonen/pid_windup_change
Jim Morris [Sat, 20 Dec 2014 02:26:43 +0000 (18:26 -0800)]
Merge pull request #565 from PetteriAimonen/pid_windup_change

Reduce overshoot in TemperatureControl.

9 years agoReduce overshoot in TemperatureControl.
Petteri Aimonen [Fri, 19 Dec 2014 19:56:58 +0000 (21:56 +0200)]
Reduce overshoot in TemperatureControl.

Implemented suggestion by ElMonkey. Do not update I term when the output
is saturated (0 or 255). This reduces the overshoot to about half.

9 years agoMerge pull request #562 from PetteriAimonen/machining_features
Jim Morris [Fri, 19 Dec 2014 20:16:43 +0000 (12:16 -0800)]
Merge pull request #562 from PetteriAimonen/machining_features

Machining features

9 years agoAdd option to jog by 0.01mm (useful in machining)
Petteri Aimonen [Mon, 1 Dec 2014 18:26:41 +0000 (20:26 +0200)]
Add option to jog by 0.01mm (useful in machining)

9 years agoAdd other common file extensions to FileScreen
Petteri Aimonen [Mon, 1 Dec 2014 18:25:57 +0000 (20:25 +0200)]
Add other common file extensions to FileScreen

9 years agoupdate firmware.bin
Jim Morris [Fri, 19 Dec 2014 09:18:23 +0000 (01:18 -0800)]
update firmware.bin

9 years agoMerge pull request #561 from wolfmanjm/upstreamedge
Jim Morris [Thu, 18 Dec 2014 08:18:39 +0000 (00:18 -0800)]
Merge pull request #561 from wolfmanjm/upstreamedge

cycle main loop before suspend

9 years agocycle main loop a few times before suspending to clear any buffered commands
Jim Morris [Thu, 18 Dec 2014 08:17:00 +0000 (00:17 -0800)]
cycle main loop a few times before suspending to clear any buffered commands

9 years agoMerge remote-tracking branch 'upstream/edge' into upstreamedge
Jim Morris [Thu, 18 Dec 2014 01:21:26 +0000 (17:21 -0800)]
Merge remote-tracking branch 'upstream/edge' into upstreamedge

9 years agoupdate readme
Jim Morris [Thu, 18 Dec 2014 01:21:03 +0000 (17:21 -0800)]
update readme

9 years agoMerge pull request #560 from wolfmanjm/upstreamedge
Jim Morris [Thu, 18 Dec 2014 01:19:11 +0000 (17:19 -0800)]
Merge pull request #560 from wolfmanjm/upstreamedge

add example of filament out switch config

9 years agoadd example of filament out switch config
Jim Morris [Thu, 18 Dec 2014 01:18:09 +0000 (17:18 -0800)]
add example of filament out switch config

9 years agoMerge pull request #559 from wolfmanjm/feature/suspend-resume
Jim Morris [Wed, 17 Dec 2014 22:54:55 +0000 (14:54 -0800)]
Merge pull request #559 from wolfmanjm/feature/suspend-resume

Feature/suspend resume

9 years agoMerge pull request #556 from RepRapMorgan/scara_home_updates
Jim Morris [Wed, 17 Dec 2014 20:08:36 +0000 (12:08 -0800)]
Merge pull request #556 from RepRapMorgan/scara_home_updates

Homing updated for Morgan SCARA

9 years agoHoming updated for Morgan SCARA
Quentin Harley [Wed, 17 Dec 2014 18:13:31 +0000 (20:13 +0200)]
Homing updated for Morgan SCARA

9 years agoadd suspended status to panel
Jim Morris [Wed, 17 Dec 2014 08:09:08 +0000 (00:09 -0800)]
add suspended status to panel

9 years agoadd after suspend gcode and before resume gcode options
Jim Morris [Tue, 16 Dec 2014 23:13:46 +0000 (15:13 -0800)]
add after suspend gcode and before resume gcode options
let extruder save and restore its state, including absolute mode

9 years agoAdded suspend and pause console commands
Jim Morris [Tue, 16 Dec 2014 09:59:16 +0000 (01:59 -0800)]
Added suspend and pause console commands
refactor temperaturecontrolpool to keep a list of temoerature controle module checksums
and update panels and others moduke sot use that rather than storing their own.
allows acces totemperature control pool from kernel so it is globally available
side effect is panel now lazy loads the temperature setting screen, saves a ton of memory.

9 years agoupdate firmware.bin
Jim Morris [Sat, 13 Dec 2014 07:42:10 +0000 (23:42 -0800)]
update firmware.bin

9 years agoMerge pull request #555 from wolfmanjm/fix/harden-homing-zprobe
Jim Morris [Sat, 13 Dec 2014 07:32:02 +0000 (23:32 -0800)]
Merge pull request #555 from wolfmanjm/fix/harden-homing-zprobe

Fix/harden homing zprobe

9 years agoavoid potential race condtion between pendsv and saccleration timer by settin gthem...
Jim Morris [Sat, 13 Dec 2014 07:30:11 +0000 (23:30 -0800)]
avoid potential race condtion between pendsv and saccleration timer by settin gthem to the same priority

9 years agooptimize a bit
Jim Morris [Wed, 10 Dec 2014 21:18:11 +0000 (13:18 -0800)]
optimize a bit

9 years agoclear the last tick flag before homing or running zprobe
Jim Morris [Wed, 10 Dec 2014 00:59:04 +0000 (16:59 -0800)]
clear the last tick flag before homing or running zprobe

9 years agoupdate firmware.bin
Jim Morris [Tue, 9 Dec 2014 22:45:24 +0000 (14:45 -0800)]
update firmware.bin

9 years agoMerge pull request #553 from wolfmanjm/fix/abort
Jim Morris [Tue, 9 Dec 2014 22:42:43 +0000 (14:42 -0800)]
Merge pull request #553 from wolfmanjm/fix/abort

Fix/abort

9 years agoMerge remote-tracking branch 'upstream/edge' into fix/abort
Jim Morris [Tue, 9 Dec 2014 22:39:31 +0000 (14:39 -0800)]
Merge remote-tracking branch 'upstream/edge' into fix/abort

9 years agoupdate firmware.bin
Jim Morris [Tue, 9 Dec 2014 22:36:14 +0000 (14:36 -0800)]
update firmware.bin

9 years agoMerge pull request #551 from wolfmanjm/use-pendsv-handler-for-ticker
Jim Morris [Tue, 9 Dec 2014 22:11:54 +0000 (14:11 -0800)]
Merge pull request #551 from wolfmanjm/use-pendsv-handler-for-ticker

Use pendsv handler for ticker, Overhaul, simplify, refactor ticker and associated code

9 years agoremove debug step pins
Jim Morris [Tue, 9 Dec 2014 21:20:12 +0000 (13:20 -0800)]
remove debug step pins

9 years agomake sure acceleration tick does not intterupt if already triggered on start of block
Jim Morris [Tue, 9 Dec 2014 21:19:01 +0000 (13:19 -0800)]
make sure acceleration tick does not intterupt if already triggered on start of block

9 years agocomments
Jim Morris [Tue, 9 Dec 2014 09:33:35 +0000 (01:33 -0800)]
comments

9 years agoreimplement the acceleration timer sync for start of deceleration
Jim Morris [Tue, 9 Dec 2014 07:36:38 +0000 (23:36 -0800)]
reimplement the acceleration timer sync for start of deceleration

9 years agosynchronize acceleration timer with start of block
Jim Morris [Mon, 8 Dec 2014 09:22:20 +0000 (01:22 -0800)]
synchronize acceleration timer with start of block

9 years agopotential race fixes
Jim Morris [Mon, 8 Dec 2014 05:29:49 +0000 (21:29 -0800)]
potential race fixes

9 years agomake the command queue static so it is shared by all screen instances
Jim Morris [Sun, 7 Dec 2014 20:49:24 +0000 (12:49 -0800)]
make the command queue static so it is shared by all screen instances

9 years agocall base class main loop
Jim Morris [Sun, 7 Dec 2014 10:35:54 +0000 (02:35 -0800)]
call base class main loop

9 years agorefactor send_command to execute in main_loop so all screen do that automatically
Jim Morris [Sun, 7 Dec 2014 10:25:53 +0000 (02:25 -0800)]
refactor send_command to execute in main_loop so all screen do that automatically

9 years agocall abort from main loop not on idle
Jim Morris [Sun, 7 Dec 2014 08:44:34 +0000 (00:44 -0800)]
call abort from main loop not on idle

9 years agorefactor unstep handling, not any faster but easier to understand
Jim Morris [Thu, 4 Dec 2014 04:53:46 +0000 (20:53 -0800)]
refactor unstep handling, not any faster but easier to understand

9 years agofix the tick_since method for the wrap around
Jim Morris [Wed, 3 Dec 2014 06:53:21 +0000 (22:53 -0800)]
fix the tick_since method for the wrap around
limot the number of ticks since to accomodate to handle edge cases

9 years agoGet step averaging to work across blocks, include extruder in that
Jim Morris [Wed, 3 Dec 2014 00:36:17 +0000 (16:36 -0800)]
Get step averaging to work across blocks, include extruder in that

9 years agotry another method to compensate for late steps
Jim Morris [Tue, 2 Dec 2014 21:15:18 +0000 (13:15 -0800)]
try another method to compensate for late steps
If the stepper moved in the last block base next step timing on the last step time for all motors,
 this is different as before it was based on the time of the last motor to finish, and was not compensated

9 years agoMerge remote-tracking branch 'upstream/edge' into use-pendsv-handler-for-ticker
Jim Morris [Tue, 2 Dec 2014 06:45:49 +0000 (22:45 -0800)]
Merge remote-tracking branch 'upstream/edge' into use-pendsv-handler-for-ticker

9 years agoMerge pull request #550 from wolfmanjm/upstreamedge
Jim Morris [Tue, 2 Dec 2014 06:28:55 +0000 (22:28 -0800)]
Merge pull request #550 from wolfmanjm/upstreamedge

fix actuator position inaccuracy on pause

9 years agofix actuator position inaccuracy on pause
Jim Morris [Tue, 2 Dec 2014 06:27:19 +0000 (22:27 -0800)]
fix actuator position inaccuracy on pause

9 years agoKeep ticking fx_counter regardless, this allows all axis to compensate for late block...
Jim Morris [Tue, 2 Dec 2014 06:22:11 +0000 (22:22 -0800)]
Keep ticking fx_counter regardless, this allows all axis to compensate for late block start
added an active flag to steppermotor so it can know when to ignore step or not

9 years agodon't set speed if it didn't change from last time
Jim Morris [Tue, 2 Dec 2014 04:05:04 +0000 (20:05 -0800)]
don't set speed if it didn't change from last time

9 years agoMerge remote-tracking branch 'upstream/edge' into use-pendsv-handler-for-ticker
Jim Morris [Mon, 1 Dec 2014 21:46:07 +0000 (13:46 -0800)]
Merge remote-tracking branch 'upstream/edge' into use-pendsv-handler-for-ticker

9 years agoUse AppendFIleStream for M500 to avoid fatlib/sdcard write bug
Jim Morris [Mon, 1 Dec 2014 21:44:08 +0000 (13:44 -0800)]
Use AppendFIleStream for M500 to avoid fatlib/sdcard write bug

9 years agouse RIT timer for accleration tick lower prioirty than PendSV
Jim Morris [Mon, 1 Dec 2014 10:39:02 +0000 (02:39 -0800)]
use RIT timer for accleration tick lower prioirty than PendSV
don;t start stepticker interrupts until after all setup is complete

9 years agochange fxcounter back to 32 fixed point but 18:14
Jim Morris [Mon, 1 Dec 2014 07:14:29 +0000 (23:14 -0800)]
change fxcounter back to 32 fixed point but 18:14
Do accleration tick in ON_IDLE so it can be pre-empted by ticker
revert StepperMotor::set_step_rate back to just set_speed()

9 years agouse atomic counter for end of move flag to avoid more race conditions
Jim Morris [Sun, 30 Nov 2014 02:26:19 +0000 (18:26 -0800)]
use atomic counter for end of move flag to avoid more race conditions
reset fx_counter if the motor is not going to get any more ticks

9 years agodon't step unless next move is processed
Jim Morris [Sat, 29 Nov 2014 22:26:37 +0000 (14:26 -0800)]
don't step unless next move is processed

9 years agofix deadlock/race condition
Jim Morris [Sat, 29 Nov 2014 22:18:08 +0000 (14:18 -0800)]
fix deadlock/race condition

9 years agoremove acceleration tick from timer3, use the pending sv from stepper tick. this...
Jim Morris [Sat, 29 Nov 2014 07:01:04 +0000 (23:01 -0800)]
remove acceleration tick from timer3, use the pending sv from stepper tick. this keeps it in sync
gets rid of the Timer3 hack to sync it with timer1, and removes a bunch of code.
any module can register with stepticker for an acceleration callback, uses a vector of Lambdas.
right now functionality and period of accleration is the same as it was before.

9 years agoupdate firmware.bin
Jim Morris [Sat, 29 Nov 2014 04:50:48 +0000 (20:50 -0800)]
update firmware.bin

9 years agocomments - this seems to work
Jim Morris [Sat, 29 Nov 2014 03:32:24 +0000 (19:32 -0800)]
comments - this seems to work

9 years agooptimize the stepticker activate/deactivate motor, register motors with stepticker...
Jim Morris [Fri, 28 Nov 2014 23:16:32 +0000 (15:16 -0800)]
optimize the stepticker activate/deactivate motor, register motors with stepticker in stepmotor ctor
remove the num motors stuff and store in vector

9 years agomore anti race condition stuff
Jim Morris [Fri, 28 Nov 2014 09:51:43 +0000 (01:51 -0800)]
more anti race condition stuff

9 years agoavoid multiple trigger of pendsv
Jim Morris [Fri, 28 Nov 2014 07:34:40 +0000 (23:34 -0800)]
avoid multiple trigger of pendsv

9 years agoavoid race conditions, don;t actual step if still processing end block
Jim Morris [Fri, 28 Nov 2014 05:34:02 +0000 (21:34 -0800)]
avoid race conditions, don;t actual step if still processing end block

9 years agoinitial attempt to use pendsv for processing block changes
Jim Morris [Thu, 27 Nov 2014 05:09:43 +0000 (21:09 -0800)]
initial attempt to use pendsv for processing block changes

9 years agoStart extruder retract at first acceleration speed instead of 0
Jim Morris [Tue, 25 Nov 2014 07:00:10 +0000 (23:00 -0800)]
Start extruder retract at first acceleration speed instead of 0

9 years agoMerge remote-tracking branch 'upstream/edge' into fix/trapezoid-symmetry
Jim Morris [Mon, 24 Nov 2014 22:45:48 +0000 (14:45 -0800)]
Merge remote-tracking branch 'upstream/edge' into fix/trapezoid-symmetry

Conflicts:
src/libs/Pin.h

9 years agoMerge pull request #549 from PetteriAimonen/edge
Jim Morris [Mon, 24 Nov 2014 22:22:11 +0000 (14:22 -0800)]
Merge pull request #549 from PetteriAimonen/edge

Added spindle speed control module using PID feedback

9 years agoFix SysTick_Config() so that one can set LOAD = SYSTICK_MAXCOUNT
Petteri Aimonen [Mon, 24 Nov 2014 18:29:05 +0000 (20:29 +0200)]
Fix SysTick_Config() so that one can set LOAD = SYSTICK_MAXCOUNT

9 years agoMove systick initialization from main.cpp to Spindle.cpp
Petteri Aimonen [Mon, 24 Nov 2014 16:48:22 +0000 (18:48 +0200)]
Move systick initialization from main.cpp to Spindle.cpp

9 years agoFix mixed CRLF/LF line ends in score_cm3.h
Petteri Aimonen [Mon, 24 Nov 2014 16:47:27 +0000 (18:47 +0200)]
Fix mixed CRLF/LF line ends in score_cm3.h

9 years agodidn't save any pin memory as classes ar ealwasys rounded up to even 4 byte boundarie...
Jim Morris [Sun, 23 Nov 2014 23:24:28 +0000 (15:24 -0800)]
didn't save any pin memory as classes ar ealwasys rounded up to even 4 byte boundaries so reverted

9 years agooptimize Pin for memory and validity
Jim Morris [Sun, 23 Nov 2014 23:02:49 +0000 (15:02 -0800)]
optimize Pin for memory and validity

9 years agoFix spindle PID D-term scaling
Petteri Aimonen [Sun, 23 Nov 2014 19:43:04 +0000 (21:43 +0200)]
Fix spindle PID D-term scaling

9 years agoAdd PID-loopback spindle speed control
Petteri Aimonen [Sun, 23 Nov 2014 19:12:25 +0000 (21:12 +0200)]
Add PID-loopback spindle speed control

9 years agoAdd hardware_pwm() function to smoothie Pins
Petteri Aimonen [Sun, 23 Nov 2014 19:11:18 +0000 (21:11 +0200)]
Add hardware_pwm() function to smoothie Pins

9 years agoadd debug pins to makefile, ignored if not set origin/fix/trapezoid-symmetry
Jim Morris [Sun, 23 Nov 2014 08:24:02 +0000 (00:24 -0800)]
add debug pins to makefile, ignored if not set

9 years agouse floorf isntead of floor
Jim Morris [Fri, 21 Nov 2014 06:02:25 +0000 (22:02 -0800)]
use floorf isntead of floor

9 years agoget rid of #define max and use stl::max
Jim Morris [Fri, 21 Nov 2014 05:54:08 +0000 (21:54 -0800)]
get rid of #define max and use stl::max
use ceilf instead of ceil
make minimum step rate settabl ewith M205

9 years agoreimplement minimum step speed for synchronized moves of 20steps/sec
Jim Morris [Thu, 20 Nov 2014 23:59:22 +0000 (15:59 -0800)]
reimplement minimum step speed for synchronized moves of 20steps/sec
for direct speed settings will be whatever it is set to
introduce set_step_rate() for synchronized axis to call to set step rate (rather than calling set_speed())
refactor to save some more memory

9 years agofix on_speed getting zero parameter when it shouldn't do
Jim Morris [Thu, 20 Nov 2014 07:14:07 +0000 (23:14 -0800)]
fix on_speed getting zero parameter when it shouldn't do

9 years agofix extruder issue introduced by c1c802b194
Jim Morris [Thu, 20 Nov 2014 06:11:49 +0000 (22:11 -0800)]
fix extruder issue introduced by c1c802b194

9 years agoclean up StepperMotor in StepTicker, the steppermotor array was unsued so removed...
Jim Morris [Thu, 20 Nov 2014 03:57:17 +0000 (19:57 -0800)]
clean up StepperMotor in StepTicker, the steppermotor array was unsued so removed it, refactor some minor thigns to save more memory

9 years agoswitch back to symmetric accel/decel
Jim Morris [Thu, 20 Nov 2014 02:07:28 +0000 (18:07 -0800)]
switch back to symmetric accel/decel
remove the minimum sterps per minute settings as this is no longer needed as it is autoamtically calculated, minimum planner speed is the correct way to set a minimum speed now.

9 years agorename moves_finished to a_move_finsihed to be more explicit
Jim Morris [Wed, 19 Nov 2014 21:55:18 +0000 (13:55 -0800)]
rename moves_finished to a_move_finsihed to be more explicit

9 years agofix step counter logic
Jim Morris [Wed, 19 Nov 2014 21:43:48 +0000 (13:43 -0800)]
fix step counter logic

9 years agouse uint64 for fx counter so minimum speed is now much smaller
Jim Morris [Wed, 19 Nov 2014 07:04:12 +0000 (23:04 -0800)]
use uint64 for fx counter so minimum speed is now much smaller
fix the tick adjustment for interrupt timer overrun
add a number of motors config setting to set the actual number of motors needed and reduce the hardcoded number from 12 to default of 5 to save memory

9 years agoimprove handling of flush queue in extruder
Jim Morris [Tue, 18 Nov 2014 23:38:24 +0000 (15:38 -0800)]
improve handling of flush queue in extruder

9 years agoforgot to remove motor stop in on_halt, will be doine by flush queue
Jim Morris [Tue, 18 Nov 2014 23:28:27 +0000 (15:28 -0800)]
forgot to remove motor stop in on_halt, will be doine by flush queue

9 years agoGo back to unequal acceleration/deceleration as there is an occasional pause with it.
Jim Morris [Tue, 18 Nov 2014 23:24:28 +0000 (15:24 -0800)]
Go back to unequal acceleration/deceleration as there is an occasional pause with it.
Make extruder stop on flush queue once decelerated, if following

9 years agoattempt to remove race condition that makes extruder step a little slower so XY needs...
Jim Morris [Tue, 18 Nov 2014 04:53:45 +0000 (20:53 -0800)]
attempt to remove race condition that makes extruder step a little slower so XY needs to wait

9 years agoremove check on speed in tick()
Jim Morris [Mon, 17 Nov 2014 09:34:35 +0000 (01:34 -0800)]
remove check on speed in tick()

9 years agoadd an initial speed to move() so there is a speed set, default is 2mm/sec this gives...
Jim Morris [Mon, 17 Nov 2014 09:30:17 +0000 (01:30 -0800)]
add an initial speed to move() so there is a speed set, default is 2mm/sec this gives the code time to set the real speed
protect against fx_counter going negative in case where speed is changed when fx_counter is less than the current counter (potential race condition)

9 years agochange the slowest steps per second speed to the lowest we can do using uint32_t...
Jim Morris [Mon, 17 Nov 2014 08:24:29 +0000 (00:24 -0800)]
change the slowest steps per second speed to the lowest we can do using uint32_t as the base ticker (which is 2steps/sec)
This is necessary as setitn git too high (as it was before) can cause things to get out of sync too easily.