The TB2 is a Indiegogo funded 3d printer. It uses a MKS SMELZI V1.0
main board (based on MELZI, i.e. Sanguinololu). I comes as a complete kit,
including display and panel.
Two variants exists, L10 and L16, with a height of 100 and 160 mm.
The heating function of the provided bed can enabled by soldering a
thermistor and some wires to it.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
The OLED is driven by an SSD1306, connected to the board via
I2C, the rotary encoder is connected to 3 GPIO pins.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
- Make all `unified_bed_leveling` data/methods static
- Move some UBL-related variables into the class
- Replace `map_[xy]_index_to_bed_location` with `mesh_index_to_[xy]pos`
With the the current definition of echo_command I cannot compile RCBugFix (Arduino IDE 1.8.1) with the error "invalid conversion from 'const char*' to 'char*'". This change resolves that.
After wraparound, pwm_count <= pwm_mask holds, thus soft_pwm_X <= pwm_count
guarantees soft_pwm_X < pwm_mask is true, and the heater will be switched
off in the first branch.
Do not evaluate the pwm conditions a second time, this reduces the
instruction count (4 instructions per PWM) and text size (6 byte).
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
The compiler is not able to reuse the value of pwm_count, but reloads it
on every evaluation, if is stored in a static variable, as it cannot prove
it will be unchanged. A variable with local scope may not be modified from
the outside, so its value can be reused.
Doing so reduces text size and instruction count.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
If dithering is enabled, the remainder of the soft_pwm_X duty value at
turnoff time is added to the next cycle. If e.g. the duty is set to 9 and
SCALE is set to 2, the PWM will be active for 8 counts for 3 cycles and
12 counts on each fourth cycle, i.e. the average is 9 cycles.
This compensates the resolution loss at higher scales and allows running
fans with SOFT_PWM with significantly reduced noise.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
A 128 step PWM has 127 intervals (0/127 ... 127/127 duty). Currently, a
PWM setting of 1/127 is active for 2/128, i.e. double the expected time,
or, in general n+1/128 instead of n/127.
Fixes issue#6003.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>