Skip to content

Commit

Permalink
Add fast mode and program optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
WinterAnker committed Apr 23, 2023
1 parent 33711d3 commit 288522c
Show file tree
Hide file tree
Showing 20 changed files with 1,195 additions and 318 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
*
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
#define BAUDRATE 115200
#define BAUDRATE 1000000//115200
#define BAUD_RATE_GCODE // Enable G-code M575 to set the baud rate

/**
Expand Down Expand Up @@ -998,6 +998,17 @@

#define DEFAULT_EJERK 3.0//10.0 // May be used by Linear Advance


#define LA_V1_DEFAULT_MAX_FEEDRATE { 600, 600, 50, 80 }
#define LA_V1_MAX_FEEDRATE_EDIT_VALUES { 600, 600, 100, 100 }
#define LA_V1_DEFAULT_MAX_ACCELERATION { 6000, 6000, 100, 4000 }
#define LA_V1_MAX_ACCEL_EDIT_VALUES { 8000, 8000, 500, 8000 }
#define LA_V1_MAX_JERK_EDIT_VALUES { 100, 100, 100, 100 }
#define LA_V1_DEFAULT_EJERK 18.0 // May be used by Linear Advance
#define LA_V1_DEFAULT_ACCELERATION 6000 // X, Y, Z and E acceleration for printing moves
#define LA_V1_DEFAULT_RETRACT_ACCELERATION 4000 // E acceleration for retracts
#define LA_V1_DEFAULT_TRAVEL_ACCELERATION 6000 // X, Y, Z acceleration for travel (non printing) moves

/**
* Junction Deviation Factor
*
Expand All @@ -1022,7 +1033,7 @@
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
//#define S_CURVE_ACCELERATION
#define S_CURVE_ACCELERATION

//===========================================================================
//============================= Z Probe Options =============================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,7 @@
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
#define ADAPTIVE_STEP_SMOOTHING

/**
* Custom Microstepping
Expand Down Expand Up @@ -1916,6 +1916,9 @@
#define LIN_ADVANCE_K 0.06 // Unit: mm compression per 1mm/s extruder speed
//#define LA_DEBUG // If enabled, this will generate debug information output over USB.
#define EXPERIMENTAL_SCURVE // Enable this option to permit S-Curve Acceleration
#define DIR_THRESHOLD_SPEED 0.2f// mm/s Speed threshold for direction switching
#define MAX_EXTRA_K_SPEED 25.0f// mm/s max Speed of K-values
#define MAX_EXTRA_K_ACC 420//400//600// mm/s2 Acceleration of the smoothing algorithm
#endif

// @section leveling
Expand Down Expand Up @@ -2613,7 +2616,7 @@
#endif

#if AXIS_IS_TMC(Y)
#define Y_CURRENT 1400
#define Y_CURRENT 1600
#define Y_CURRENT_HOME Y_CURRENT
#define Y_MICROSTEPS 32
#define Y_RSENSE 0.11
Expand Down Expand Up @@ -2694,7 +2697,7 @@
#endif

#if AXIS_IS_TMC(E0)
#define E0_CURRENT 1000
#define E0_CURRENT 1200
#define E0_MICROSTEPS 16
#define E0_RSENSE 0.11
#define E0_CHAIN_POS -1
Expand Down Expand Up @@ -3677,7 +3680,7 @@
* - M206 and M428 are disabled.
* - G92 will revert to its behavior from Marlin 1.0.
*/
//#define NO_WORKSPACE_OFFSETS
#define NO_WORKSPACE_OFFSETS

// Extra options for the M114 "Current Position" report
//#define M114_DETAIL // Use 'M114` for details to check planner calculations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ void Board_Configure:: init(void)
board_configure.adc1=board_configure.Get_Adc_Average(0,10);
board_configure.adc2=board_configure.Get_Adc_Average(1,10);

if((board_configure.adc1>=0)&&(board_configure.adc1<=100))
if((board_configure.adc1>496)&&(board_configure.adc1<869)) //100K/20K 0.55V => 0.4~0.7V
{
strcpy(board_configure.board_version,MAIN_BOARD_V8111_V0_5);
}
else if((board_configure.adc1>=0)&&(board_configure.adc1<=100))
{
strcpy(board_configure.board_version,MAIN_BOARD_V8111_V0_2);
}
Expand All @@ -77,12 +81,5 @@ void Board_Configure:: init(void)
{
strcpy(board_configure.board_chip,STM32F407VGT6_CHIP);
}


}





#endif
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
//M116 M116 S0 Check the firmware version number
//M116 S1 Check the hardware version number
//M116 S2 Check the model of the main control chip
void GcodeSuite::M116() {
void GcodeSuite::M116()
{
if (parser.seen('S'))
{
switch (parser.value_int())
Expand All @@ -32,7 +32,9 @@ void GcodeSuite::M116() {
}
else
{
SERIAL_ECHOLNPGM(DETAILED_BUILD_VERSION);
char tmpbuf[64] = {0};
snprintf(tmpbuf, sizeof(tmpbuf), "%s,%s", DETAILED_BUILD_VERSION, board_configure.board_version);
SERIAL_ECHOLN(tmpbuf);
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author : winter
* @Date : 2022-05-24 14:08:20
* @LastEditors: winter.tian
* @LastEditTime: 2023-03-07 10:40:55
* @LastEditTime: 2023-04-23 20:41:15
* @Description :
*/
#include "../../inc/MarlinConfig.h"
Expand Down Expand Up @@ -290,6 +290,35 @@ void GcodeSuite::M3009()
}
}

//=>M3011 S0/S1
//<=ANKER_V8111_HW_V1.0.0_SW_V1.0.0
void GcodeSuite::M3011()
{
int16_t num = 0;

if (parser.seen('S'))
{
num = parser.value_int();

switch(num)
{
case 0:
{
SERIAL_ECHOPAIR("ANKER_V8111_BOOT_V0.0.0\r\n");
break;
}
case 1:
{
SERIAL_ECHOPAIR("ANKER_V8111_HW_V0.0.0_SW_V0.0.0\r\n");
break;
}
default:
{
break;
}
}
}
}
#if 0
static bool flash_sector_read(uint32_t addr, uint32_t *data)
{
Expand Down

0 comments on commit 288522c

Please sign in to comment.