Skip to content

Commit

Permalink
Add new pattern 2 for nozzle pattern test
Browse files Browse the repository at this point in the history
  • Loading branch information
junonara committed Feb 15, 2022
1 parent f57f4ee commit b669691
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Marlin/src/HAL/STM32/timers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@
#define MCU_PITTA_TIMER 6
#endif
#elif defined(STM32F401xC) || defined(STM32F401xE)
#define MCU_STEP_TIMER 9
#define MCU_STEP_TIMER 9 // STM32F401 has no TIM6, TIM7, or TIM8
#define MCU_TEMP_TIMER 10
#elif defined(STM32F4xx) || defined(STM32F7xx) || defined(STM32H7xx)
#define MCU_STEP_TIMER 6 // STM32F401 has no TIM6, TIM7, or TIM8
#define MCU_STEP_TIMER 6
#define MCU_TEMP_TIMER 14 // TIM7 is consumed by Software Serial if used.
// PITTA
#if HAS_PITTA_MMU
Expand Down
100 changes: 99 additions & 1 deletion Marlin/src/feature/pitta/pitta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -836,6 +836,90 @@ void ext_snap()
ext_flat(INV_DIR, 60/* +pitta_extrude_return_spd */, 10000);//
}
break;
case 2:
{
ext_flat(INV_DIR, 1500, 300);
// ext_flat(INV_DIR, 1500, 2100);

for (int i = 0; i<10; i++ ) { //10//pitta_val_3
ext_flat(INV_DIR, 300, 15);
ext_flat(INV_DIR, 90, 60);
ext_flat(INV_DIR, 60, 110*5);// 110
ext_flat(INV_DIR, 90, 60);
ext_flat(INV_DIR, 300, 15);

ext_flat(NOM_DIR, 300, 15);
ext_flat(NOM_DIR, 150, 60);
ext_flat(NOM_DIR, 120, 110*5);//110
ext_flat(NOM_DIR, 150, 60);
ext_flat(NOM_DIR, 300, 15);
}

ext_flat(INV_DIR, 200, 20);
ext_flat(INV_DIR, 150, 30);
ext_flat(INV_DIR, 100, 40);
ext_flat(INV_DIR, 70, 50);
ext_flat(INV_DIR, 60, 60);
ext_flat(INV_DIR, 50, 70);
ext_flat(INV_DIR, 45, 80);
ext_flat(INV_DIR, 45, 10000);
ext_flat(INV_DIR, 60, 50);
ext_flat(INV_DIR, 100, 50);
ext_flat(INV_DIR, 200, 100);
ext_flat(INV_DIR, 1000, 4000);
ext_flat(INV_DIR, 200, 10);
ext_flat(INV_DIR, 150, 20);
ext_flat(INV_DIR, 100, 30);
ext_flat(INV_DIR, 70, 40);
ext_flat(INV_DIR, 60, 50);
ext_flat(INV_DIR, 50, 50);
ext_flat(INV_DIR, 45, 50);

// ext_flat(INV_DIR, 500, 1000);
// ext_flat(INV_DIR, 70, 2000);
// for (int i = 0; i<1; i++ ) {
// ext_flat(INV_DIR, 300, 15);
// ext_flat(INV_DIR, 90, 60);
// ext_flat(INV_DIR, 60, pitta_val_2*500);// 110
// ext_flat(INV_DIR, 90, 60);
// ext_flat(INV_DIR, 300, 15);

// ext_flat(NOM_DIR, 300, 15);
// ext_flat(NOM_DIR, 150, 60);
// ext_flat(NOM_DIR, 120, pitta_val_2*500);//110
// ext_flat(NOM_DIR, 150, 60);
// ext_flat(NOM_DIR, 300, 15);
// }
// ext_flat(NOM_DIR, 300, 4000);
// ext_flat(NOM_DIR, 100, 12000-750);
// ext_flat(NOM_DIR, 100, 350 + pitta_val_4*10);//15
// ext_flat(NOM_DIR, 500+1000*pitta_val_5, 50); //5


// for (int i = 0; i<pitta_val_3; i++ ) { //5
// ext_flat(INV_DIR, 300, 15);
// ext_flat(INV_DIR, 90, 60);
// ext_flat(INV_DIR, 60, 110*6);// 110
// ext_flat(INV_DIR, 90, 60);
// ext_flat(INV_DIR, 300, 15);

// ext_flat(NOM_DIR, 300, 15);
// ext_flat(NOM_DIR, 150, 60);
// ext_flat(NOM_DIR, 120, 110*6);//110
// ext_flat(NOM_DIR, 150, 60);
// ext_flat(NOM_DIR, 300, 15);
// }

// ext_flat(INV_DIR, 150, 100);
// ext_flat(INV_DIR, 80, 100);
// ext_flat(INV_DIR, 60, 14000);
ext_flat(INV_DIR, 45, 28000);

pitta_set_temp((temp_temp_extruder), 0);
ext_flat(INV_DIR, 45/* +pitta_extrude_return_spd */, 20000);//
ext_flat(INV_DIR, 60/* +pitta_extrude_return_spd */, 10000);//
}
break;
case 100: // old setting 0
{
ext_flat(INV_DIR, 100, 200);
Expand Down Expand Up @@ -2121,7 +2205,7 @@ void PITTA::on_receiving() {
chk_high8 = chk_high8 & 0xff;
SERIAL_ECHOLNPGM("rcv chk: ", (unsigned)received_chk8);

if (chk_high8 == received_chk8) {
if (chk_high8 == received_chk8&&received_packet!=0) {
b_byte_receive_done = true;
SERIAL_ECHO("Rcv: ");
SERIAL_ECHOLN(received_data);
Expand All @@ -2135,6 +2219,9 @@ void PITTA::on_receiving() {
SERIAL_ECHOLN(received_data);
SERIAL_ECHOLN((unsigned)received_packet);
SERIAL_ECHOLN("Resend Request H");
if (received_packet == 0) {
SERIAL_ECHOLN("Wrong command Received!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
}
b_pitta_data_init = false;
b_resend_req = true;
SERIAL_ECHOLN("move from RCV to PREPAIR for resend request");
Expand Down Expand Up @@ -2274,6 +2361,17 @@ void PITTA::parsing() {
pitta_data_state = PREPAIR;
pitta_val_6 = received_data;
}
else {
// SERIAL_ECHO("Rcv: ");
// SERIAL_ECHOLN(received_data);
// SERIAL_ECHOLN((unsigned)received_packet);
SERIAL_ECHOLN("Wrong command received... *********************************************************");
b_pitta_data_init = false;
b_resend_req = true;
SERIAL_ECHOLN("move from PARSER to PREPAIR for resend request");
confirmed_set_output_low();
pitta_data_state = PREPAIR;
}
/* else if (received_cmd == TUNE_VAL7 ) {
proc_state = PROC_CONTINUE;
SERIAL_ECHO("tune val 7 set:");
Expand Down

0 comments on commit b669691

Please sign in to comment.