Commit bb706194 authored by MagoKimbra's avatar MagoKimbra

Merge remote-tracking branch 'refs/remotes/origin/master' into dev

parents 0d88052d 8359dbf8
......@@ -675,12 +675,12 @@ void setup() {
setup_statled();
#endif
#if ENABLED(MIXING_EXTRUDER_FEATURE) && MIXING_VIRTUAL_TOOLS > 1
#if ENABLED(COLOR_MIXING_EXTRUDER) && MIXING_VIRTUAL_TOOLS > 1
// Initialize mixing to 100% color 1
for (uint8_t i = 0; i < DRIVER_EXTRUDERS; i++) {
mixing_factor[i] = (i == 0) ? 1 : 0;
}
for (uint8_t t = 0; t < EXTRUDERS; t++) {
for (uint8_t t = 0; t < MIXING_VIRTUAL_TOOLS; t++) {
for (uint8_t i = 0; i < DRIVER_EXTRUDERS; i++) {
mixing_virtual_tool_mix[t][i] = mixing_factor[i];
}
......@@ -2555,7 +2555,7 @@ static void clean_up_after_endstop_move() {
}
}
#endif //DELTA
#endif // DELTA
#if ENABLED(COLOR_MIXING_EXTRUDER)
void normalize_mix() {
......
......@@ -614,7 +614,7 @@ float junction_deviation = 0.1;
// For a mixing extruder, get steps for each
#if ENABLED(COLOR_MIXING_EXTRUDER)
for (uint8_t i = 0; i < DRIVER_EXTRUDERS; i++)
block->mix_event_count[i] = block->step_event_count / mixing_factor[i];
block->mix_event_count[i] = (mixing_factor[i] < 0.0001) ? 9999999999999999 : block->step_event_count / mixing_factor[i];
#endif
// Add update block variables for LASER BEAM control
......
......@@ -161,7 +161,9 @@ volatile signed char count_direction[NUM_AXIS] = { 1 };
#define Z_APPLY_STEP(v,Q) Z_STEP_WRITE(v)
#endif
#define E_APPLY_STEP(v,Q) E_STEP_WRITE(v)
#if DISABLED(COLOR_MIXING_EXTRUDER)
#define E_APPLY_STEP(v,Q) E_STEP_WRITE(v)
#endif
// intRes = intIn1 * intIn2 >> 16
// uses:
......@@ -611,13 +613,7 @@ FORCE_INLINE void trapezoid_generator_reset() {
advance = current_block->initial_advance;
final_advance = current_block->final_advance;
// Do E steps + advance steps
#if ENABLED(COLOR_MIXING_EXTRUDER)
// Move mixing steppers proportionally
for (int8_t j = 0; j < DRIVER_EXTRUDERS; j++)
e_steps[j] += ((advance >> 8) - old_advance) * current_block->mix_steps[j] / current_block->step_event_count;
#else
e_steps[current_block->active_driver] += ((advance >> 8) - old_advance);
#endif
old_advance = advance >>8;
#endif
deceleration_time = 0;
......@@ -759,7 +755,7 @@ ISR(TIMER1_COMPA_vect) {
}
for (uint8_t j = 0; j < DRIVER_EXTRUDERS; j++) {
if (counter_m[j] > 0) {
counter_m[j] -= current_block->step_event_count;
counter_m[j] -= current_block->mix_event_count[j];
En_STEP_WRITE(j, INVERT_E_STEP_PIN);
}
}
......
......@@ -30,7 +30,7 @@
NexPage Psdcard = NexPage(4, 0, "sdcard");
NexPage Psetup = NexPage(5, 0, "setup");
NexPage Pmove = NexPage(6, 0, "move");
NexPage Pfeed = NexPage(7, 0, "feed");
NexPage Pspeed = NexPage(7, 0, "speed");
// Page 0 Start
NexTimer startimer = NexTimer(0, 1, "tm0");
......@@ -61,7 +61,8 @@
NexPicture NStop = NexPicture(1, 25, "p8");
NexVar SD = NexVar(1, 26, "sd");
NexVar RFID = NexVar(1, 27, "rfid");
NexPicture Feedpic = NexPicture(1, 18, "p9");
NexPicture Speedpic = NexPicture(1, 28, "p9");
NexVar VSpeed = NexVar(1, 29, "vspeed");
// Page 2 Temp
NexText set0 = NexText(2, 2, "set0");
......@@ -112,8 +113,7 @@
NexText LedCoord6 = NexText(6, 19, "mcoord");
// Page 7 Feed
NexVar Feedrate = NexVar(7, 1, "feedrate");
NexPicture Feedok = NexPicture(7, 3, "p0");
NexPicture SpeedOk = NexPicture(7, 2, "p0");
NexTouch *nex_listen_list[] =
{
......@@ -125,7 +125,7 @@
&MSD6,
&MSetup,
&Fanpic,
&Feedpic,
&Speedpic,
&NPlay,
&NStop,
&hot0,
......@@ -155,7 +155,7 @@
&ZHome,
&ZUp,
&ZDown,
&Feedok,
&SpeedOk,
NULL
};
......@@ -206,7 +206,7 @@
Hotend21.setText("BED");
#endif
Feedrate.setValue(100);
VSpeed.setValue(100);
#if HAS(FAN)
Fan.setValue(1);
......@@ -433,9 +433,9 @@
NextionPage = 5;
Psetup.show();
}
else if (ptr == &Feedpic) {
else if (ptr == &Speedpic) {
NextionPage = 7;
Pfeed.show();
Pspeed.show();
}
}
......@@ -523,7 +523,7 @@
Menu.attachPop(setpagePopCallback, &Menu);
MSetup.attachPop(setpagePopCallback, &MSetup);
Feedpic.attachPop(setpagePopCallback, &Feedpic);
Speedpic.attachPop(setpagePopCallback, &Speedpic);
Fanpic.attachPop(setfanPopCallback, &Fanpic);
m11.attachPop(sethotPopCallback, &m11);
tup.attachPop(settempPopCallback, &tup);
......@@ -536,7 +536,7 @@
ZHome.attachPop(setmovePopCallback);
ZUp.attachPop(setmovePopCallback);
ZDown.attachPop(setmovePopCallback);
Feedok.attachPop(ExitPopCallback);
SpeedOk.attachPop(ExitPopCallback);
startimer.enable();
}
......@@ -610,8 +610,8 @@
if (fanSpeed > 0) fantimer.enable();
else fantimer.disable();
uint32_t* temp_feedrate;
Feedrate.getValue(temp_feedrate);
uint32_t temp_feedrate = 0;
VSpeed.getValue(&temp_feedrate);
feedrate_multiplier = (int)temp_feedrate;
#if HAS(TEMP_0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment