Skip to content

Commit

Permalink
Accept Merge Request #3801: (mr/master/bugfix -> master)
Browse files Browse the repository at this point in the history
Merge Request: other:Add version V3.0.75


Created By: @winter.tian
Accepted By: @pepper.hu
URL: http://codingcorp.coding.anker-in.com/p/zz_3d_platform/d/AnkerMake-Marlin-Release/git/merge/3801
  • Loading branch information
pepperAnker committed Sep 28, 2023
2 parents 0a35bdc + 3452d75 commit bf02972
Show file tree
Hide file tree
Showing 47 changed files with 1,483 additions and 578 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1266,10 +1266,10 @@
* Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
* But: `M851 Z+1` with a CLEARANCE of 2 => 2mm from bed to nozzle.
*/
#define Z_CLEARANCE_DEPLOY_PROBE 2 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_DEPLOY_PROBE 2 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 2 // Z Clearance between probe points
#define Z_CLEARANCE_MULTI_PROBE 2 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_AFTER_PROBING 4 // Z position after probing is done

#define Z_PROBE_LOW_POINT -10 // Farthest distance below the trigger-point to go before stopping

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2064,11 +2064,11 @@
//
#define ARC_SUPPORT // Requires ~3226 bytes
#if ENABLED(ARC_SUPPORT)
#define MIN_ARC_SEGMENT_MM 1//0.5//0.1 // (mm) Minimum length of each arc segment
#define MAX_ARC_SEGMENT_MM 12//1.0 // (mm) Maximum length of each arc segment
#define MIN_ARC_SEGMENT_MM 0.3//0.5//0.1 // (mm) Minimum length of each arc segment
#define MAX_ARC_SEGMENT_MM 1.0//1.0 // (mm) Maximum length of each arc segment
#define MIN_CIRCLE_SEGMENTS 72 // Minimum number of segments in a complete circle
//#define ARC_SEGMENTS_PER_SEC 50 // Use the feedrate to choose the segment length
#define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections
//#define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections
//#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles
//#define SF_ARC_FIX // Enable only if using SkeinForge with "Arc Point" fillet procedure
#endif
Expand Down
1 change: 1 addition & 0 deletions release_marlin2.0/maincode/Marlin/src/MarlinCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -957,6 +957,7 @@ void idle(bool no_stepper_sleep/*=false*/) {
#endif
}

TERN_(ANKER_MAKE_API, stepper.current_status_polling());

IDLE_DONE:
TERN_(MARLIN_DEV_MODE, idle_depth--);
Expand Down
36 changes: 36 additions & 0 deletions release_marlin2.0/maincode/Marlin/src/core/serial.h
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,42 @@ void serialprintPGM(PGM_P str);
#define SERIAL_DECIMAL(V) SERIAL_ECHO(V)
#endif

#if ENABLED(ANKER_MAKE_API)
enum serial_type
{
SERIAL_DEBUG = 0,
SERIAL_HOST = 1,
SERIAL_NOZZLE = 2,
SERIAL_NONE,
};
enum errno_type
{
ERRNO_NOZZLE = 0,
ERRNO_SERIAL_QUEUE = 1,
ERRNO_SERIAL_DEBUG = 2,
ERRNO_MOTION_STATUS = 3,
ERRNO_NONE,
};
enum errno2_motion_status_type
{
MS_REAL_TIME_STATUS = 0,
MS_PROBE_STATUS = 1,
MS_NONE,
};
#define ERR_STR0_CONCAT(err_type, str_var) "Err_<%d-%X><" err_type "> = " str_var "\n" // String concatenation
#define ERR_STR1_CONCAT(str_var) "Err_<%d-%X> = " str_var "\n" // String concatenation
#define DEBUFG_STR_CONCAT(str_var) "echo_<%d-%X> = " str_var "\n" // String concatenation
#define DEBUFG_RESPONSE_CONCAT(str_var) "resp_<%d-%X> = " str_var "\n" // String concatenation
#define SEND_MSG_CODE_TO_NOZZLE(...) do{MYSERIAL1.printLine(__VA_ARGS__);}while (0) // Send the information to the nozzle board
#define SEND_MSG_CODE_TO_HOST(...) do{MYSERIAL2.printLine(__VA_ARGS__);}while (0) // Send the information to the Junzheng board
#define SEND_MSG_CODE_TO_DEBUG(...) do{MYSERIAL3.printLine(__VA_ARGS__);}while (0) // Send the information to the debug board
#define SEND_ERR_STR_CODE(errno, errno2, err_type, str_var, ...) SEND_MSG_CODE_TO_HOST(ERR_STR0_CONCAT(err_type, str_var), errno, errno2, __VA_ARGS__)
#define SEND_ERRNO_TO_HOST(errno, errno2, str_var, ...) SEND_MSG_CODE_TO_HOST(ERR_STR1_CONCAT(str_var), errno, errno2, __VA_ARGS__)
#define SEND_DEBUG_TO_HOST(errno, errno2, str_var, ...) SEND_MSG_CODE_TO_HOST(DEBUFG_STR_CONCAT(str_var), errno, errno2, __VA_ARGS__)
#define SEND_RESPONSE_TO_HOST(errno, errno2, str_var, ...) SEND_MSG_CODE_TO_HOST(DEBUFG_RESPONSE_CONCAT(str_var), errno, errno2, __VA_ARGS__)
#define SEND_ECHO_TO_HOST(...) SEND_DEBUG_TO_HOST(ERRNO_SERIAL_DEBUG, 0, __VA_ARGS__)
#endif

//
// Functions for serial printing from PROGMEM. (Saves loads of SRAM.)
//
Expand Down
2 changes: 1 addition & 1 deletion release_marlin2.0/maincode/Marlin/src/core/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ enum AxisEnum : uint8_t {
#endif

// To refer to all or none
, ALL_AXES_ENUM = 0xFE, NO_AXIS_ENUM = 0xFF
, XY_AXES_ENUM = 0xFD, ALL_AXES_ENUM = 0xFE, NO_AXIS_ENUM = 0xFF
};

typedef IF<(NUM_AXIS_ENUMS > 8), uint16_t, uint8_t>::type axis_bits_t;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
#if ENABLED(ADAPT_DETACHED_NOZZLE)
#include "../interactive/uart_nozzle_rx.h"
#endif
#if ADAPT_DETACHED_NOZZLE
#include "../interactive/uart_nozzle_tx.h"
#endif
#if ENABLED(EVT_HOMING_5X)
#include "../../feature/anker/anker_homing.h"
#endif

Anker_Align anker_align;

Expand Down Expand Up @@ -95,6 +101,9 @@
for(num=0;num<ANLIGN_NUM;num++)
{
do_blocking_move_to_z(current_position.z+ANLIGN_RISE);

TERN_(ADAPT_DETACHED_NOZZLE, if(IS_new_nozzle_board())uart_nozzle_tx_point_type(POINT_G36, num));

const float z1 = probe.probe_at_point(anker_align.xy[0], raise_after, 0, true, false);
if(isnan(z1))
{
Expand Down Expand Up @@ -161,8 +170,14 @@
}
}

if(anker_align.is_g36_cmd_executing == false)
{
SERIAL_ECHO("echo:anker_align stop!\r\n");
break;
}
}
gcode.process_subcommands_now_P(PSTR("G2001\n"));
TERN_(USE_Z_SENSORLESS, anker_homing.is_again_probe_homing = false);
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@
{
anker_homing.trigger_per_ms=millis();
}

int16_t Anker_Homing::triger_Take_time()
{
return (int16_t)(millis() - anker_homing.trigger_per_ms);
}

void Anker_Homing:: set_triger_ms()
{
anker_homing.trigger_ms=millis();
Expand Down Expand Up @@ -160,10 +166,10 @@
return true;
else return false;
}
void Anker_Homing:: set_probe_triger_ms()
void Anker_Homing:: set_probe_triger_ms(const bool debug_out /* = true*/)
{
anker_homing.trigger_ms=millis();
SERIAL_ECHO(" probe trigger!!\r\n");
if(debug_out) SERIAL_ECHO(" probe trigger!!\r\n");
}
bool Anker_Homing:: is_z_probe_no_triger()//If the probe does not trigger for a long time, reset Z to zero
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@
ANKER_Z_AXIS get_first_end_z_axis();
void anker_dual_z_run_align();//Roughly level the two Z axes
void set_triger_per_ms();
int16_t triger_Take_time();
void set_triger_ms();
void set_probe_triger_ms();
void set_probe_triger_ms(const bool debug_out = true);
bool is_z_top_triger();
bool is_anthor_z_no_triger();//The other axis is not firing
bool is_z_probe_no_triger();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
#include "../../module/planner.h"
#include "../../module/stepper.h"
#include "../../module/temperature.h"
#if ENABLED(ANKER_ANLIGN)
#include "anker_align.h"
#endif


#define ANKER_PAUSE_RESET 0 //anker continue after pause reset enable/disable
#define ANKER_PAUSE_PRE_EXTRUDE 0 //anker continue after pause pre-extrude enable/disable
Expand Down Expand Up @@ -233,13 +237,13 @@ static void anker_pause_deal(void)
p_info->pause_queue_state = ANKER_PAUSE_QUEUE_DISABLE;
if(parser.report_layer_num <= PRINT_LAYER_NUM)
{
snprintf(p_info->tmp_cmd_buf, sizeof(p_info->tmp_cmd_buf), "G1 Z%f F12000\r\n", p_info->save_block_buf.cur_pos.z + 2);
snprintf(p_info->tmp_cmd_buf, sizeof(p_info->tmp_cmd_buf), "G1 Z%f F1800\r\n", p_info->save_block_buf.cur_pos.z + 2);
queue.ring_buffer.enqueue(p_info->tmp_cmd_buf);
}
queue.ring_buffer.enqueue("G1 X10 Y0 F12000\r\n");
if(parser.report_layer_num <= PRINT_LAYER_NUM)
{
snprintf(p_info->tmp_cmd_buf, sizeof(p_info->tmp_cmd_buf), "G1 Z%f F12000\r\n", p_info->save_block_buf.cur_pos.z);
snprintf(p_info->tmp_cmd_buf, sizeof(p_info->tmp_cmd_buf), "G1 Z%f F1800\r\n", p_info->save_block_buf.cur_pos.z);
queue.ring_buffer.enqueue(p_info->tmp_cmd_buf);
}
p_info->pause_serial_state = ANKER_PAUSE_SERIAL_DISABLE;
Expand Down Expand Up @@ -268,12 +272,16 @@ static void anker_pause_deal(void)
#endif
if(parser.report_layer_num <= PRINT_LAYER_NUM)
{
snprintf(p_info->tmp_cmd_buf, sizeof(p_info->tmp_cmd_buf), "G1 Z%f F12000\r\n", p_info->save_block_buf.cur_pos.z + 2);
snprintf(p_info->tmp_cmd_buf, sizeof(p_info->tmp_cmd_buf), "G1 Z%f F1800\r\n", p_info->save_block_buf.cur_pos.z + 2);
queue.ring_buffer.enqueue(p_info->tmp_cmd_buf);
}
snprintf(p_info->tmp_cmd_buf, sizeof(p_info->tmp_cmd_buf), "G1 X%f Y%f Z%f F12000\r\n", p_info->save_block_buf.cur_pos.x,
p_info->save_block_buf.cur_pos.y, p_info->save_block_buf.cur_pos.z);
snprintf(p_info->tmp_cmd_buf, sizeof(p_info->tmp_cmd_buf), "G1 X%f Y%f F12000\r\n", p_info->save_block_buf.cur_pos.x,
p_info->save_block_buf.cur_pos.y);
queue.ring_buffer.enqueue(p_info->tmp_cmd_buf);

snprintf(p_info->tmp_cmd_buf, sizeof(p_info->tmp_cmd_buf), "G1 Z%f F1800\r\n", p_info->save_block_buf.cur_pos.z);
queue.ring_buffer.enqueue(p_info->tmp_cmd_buf);

// MYSERIAL1.printf("<==> CONTINUE %s",p_info->tmp_cmd_buf);
snprintf(p_info->tmp_cmd_buf, sizeof(p_info->tmp_cmd_buf), "G1 F%f\r\n", p_info->save_block_buf.cur_fr_mm_s);
queue.ring_buffer.enqueue(p_info->tmp_cmd_buf);
Expand Down Expand Up @@ -370,6 +378,7 @@ static void anker_stop_start(void)
p_info->stop_deal_step = ANKER_STOP_DEAL_STEP_IDLE;

p_info->stop_flag = ANKER_STOP_START;
TERN_(ANKER_ANLIGN, anker_align.is_g36_cmd_executing = false);
}
}

Expand Down
Loading

0 comments on commit bf02972

Please sign in to comment.