Teacup_Firmware/simulator
Phil Hord 750acb41bc Simulator: calculate position for corexy correctly
CoreXY turns the X and Y motors to render a target position differently
than straight cartesian printer does.  From the theory page on corexy.com,
where the motors are called A and B instead of X and Y:

    dx = 1/2(dA + dB), dY = 1/2(dA - dB)
    dA = dX + dY
    dB = dX - dY

Accordingly, each step of a single motor results in half of a step in the
X or Y axis.  To simplify this and not lose steps, make the pos[] array
hold 2*steps instead of single steps.  Adjust back to single steps with
/2 where needed.  Store 2*steps whenever writing to pos[] variables
which are not coreXY driven.

Since each step of X or Y (A or B) affects both X and Y position, send
updates to record_pin for all axes instead of only the "affected" axis.
The function record_pin will ignore reports for pins which did not change
from the previous call.  This also helps us keep from reporting duplicate
positions for half-steps in coreXY mode, too.
2016-05-26 11:16:11 +02:00
..
analog_sim.c Sim: add --report-temptables option 2016-04-16 00:59:55 +02:00
data_recorder.c Simulator: record serial data as comments, not as G-code. 2015-07-17 16:34:20 +02:00
data_recorder.h simulator: Make time-scale=0 a cmdline option 2013-12-06 19:24:58 +01:00
delay_sim.c Restore simulation build target. 2013-12-06 19:24:58 +01:00
heater_sim.c heater_sim.c: Note that the heater isn't implemented in the simulator. 2014-08-31 19:06:23 +02:00
intercom_sim.c Restore simulation build target. 2013-12-06 19:24:58 +01:00
pff_diskio_sim.c Add simulator SD card (and SPI, PFF) support. 2015-07-17 16:02:59 +02:00
pff_sim.c Add simulator SD card (and SPI, PFF) support. 2015-07-17 16:02:59 +02:00
sd_sim.c SD card: remove sd_read_char() also from the simulator. 2015-07-17 16:06:19 +02:00
serial_sim.c Simulator: record serial data as comments, not as G-code. 2015-07-17 16:34:20 +02:00
simulator.c Simulator: calculate position for corexy correctly 2016-05-26 11:16:11 +02:00
spi_sim.c Introduce #ifdef SPI. 2015-08-13 17:12:12 +02:00
timer_ext.c Move pin I/O macros from arduino.h to pinio.h. 2015-08-12 14:26:34 +02:00