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