Skip to content

Commit 43af4c9

Browse files
committed
update V4.10.0
update V4.10.0
1 parent 4e24acf commit 43af4c9

28 files changed

+3764
-1897
lines changed

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# Swift Pro Firmware V4.9.0 (Base on [Grbl v0.9j](https://github.com/grbl/grbl) )
22

33
----------
4-
## Update Summary for v4.9.0
4+
## Update Summary for v4.10.0
55

6-
* Fix M2410 bug
7-
* Add M2413 interface
6+
* Fix M2210 frequency bug
7+
* Fix G0 Speed bug
8+
* Fix stop and recover bug
9+
* Add P2236 G2207 G2208 interface
810
* Add M2400 S7 work mode
911

1012
## Caution
@@ -20,11 +22,11 @@
2022

2123
First, connect to uArm using the serial terminal of your choice.Set the baud rate to 115200 as 8-N-1 (8-bits, no parity, and 1-stop bit.) .Cmd list reference to [protocol documents](doc/).
2224

23-
* move cmd support **G0,G1,G2004,G2201,G2202,G2204,G2205**.
25+
* move cmd support **G0,G1,G2004,G2201,G2202,G2204,G2205,G2206,G2207,G2208**.
2426
* setting cmd support **M17,M204,M2019,M2120,M2121,M2122,M2201,M2202,M2203,M2210,M2215,M2220,M2221,M2222,M2231,M2232,M2233,M2400,M2401,M2410,M2411,M2240,M2241**.
2527
not support currently **M2211,M2212,M2213,M2234,M2245**.
2628
* query cmd support
27-
**P2200,P2201,P2202,P2203,P2204,P2205,P2206,P2220,P2221,P2231,P2231,P2232,P2233,P2234,P2240,P2241,P2242,P2400**.
29+
**P2200,P2201,P2202,P2203,P2204,P2205,P2206,P2220,P2221,P2231,P2231,P2232,P2233,P2234,P2236,P2240,P2241,P2242,P2400**.
2830
----------
2931
## How to upgrade uArm
3032

-719 KB
Binary file not shown.
-913 KB
Binary file not shown.
306 KB
Binary file not shown.
635 KB
Binary file not shown.

src/README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# uArmMini_develop
2+
3+
#### 介绍
4+
{**以下是 Gitee 平台说明,您可以替换此简介**
5+
Gitee 是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台
6+
无论是个人、团队、或是企业,都能够用 Gitee 实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)}
7+
8+
#### 软件架构
9+
软件架构说明
10+
11+
12+
#### 安装教程
13+
14+
1. xxxx
15+
2. xxxx
16+
3. xxxx
17+
18+
#### 使用说明
19+
20+
1. xxxx
21+
2. xxxx
22+
3. xxxx
23+
24+
#### 参与贡献
25+
26+
1. Fork 本仓库
27+
2. 新建 Feat_xxx 分支
28+
3. 提交代码
29+
4. 新建 Pull Request
30+
31+
32+
#### 特技
33+
34+
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
35+
2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com)
36+
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目
37+
4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
38+
5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
39+
6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)

src/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@
292292
// value. This also ensures that a planned motion always completes and accounts for any floating-point
293293
// round-off errors. Although not recommended, a lower value than 1.0 mm/min will likely work in smaller
294294
// machines, perhaps to 0.1mm/min, but your success may vary based on multiple factors.
295-
#define MINIMUM_FEED_RATE 1.0 // (mm/min)
295+
#define MINIMUM_FEED_RATE 0.0 // (mm/min)
296296

297297
// Number of arc generation iterations by small angle approximation before exact arc trajectory
298298
// correction with expensive sin() and cos() calcualtions. This parameter maybe decreased if there

src/main.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,12 @@ int main(void)
8585
sys_rt_exec_alarm = 0;
8686
sys.suspend = false;
8787
sys.soft_limit = false;
88-
88+
sys.print_reset_flag = false;
89+
if(uarm.reset_flag)
90+
{
91+
DB_PRINT_STR("ok\n");
92+
uarm.reset_flag=false;
93+
}
8994
// Start Grbl main loop. Processes program inputs and executes them.
9095
protocol_main_loop();
9196

src/motion_control.c

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
// If enabled, check for soft limit violations. Placed here all line motions are picked up
4343
// from everywhere in Grbl.
4444
if (bit_istrue(settings.flags,BITFLAG_SOFT_LIMIT_ENABLE)) { limits_soft_check(target); }
45-
4645
// If in check gcode mode, prevent motion by blocking planner. Soft limits still work.
4746
if (sys.state == STATE_CHECK_MODE) { return; }
4847

@@ -67,7 +66,7 @@
6766
float final_angle[3];
6867

6968
float x= target[X_AXIS], y= target[Y_AXIS], z = target[Z_AXIS];
70-
69+
if ((uarm.motor_state_bits&0x07)!=0x07) return UARM_ENABLE_ERROR;
7170
coord_effect2arm( &x, &y, &z ); // calculate the arm current coord
7271
coord_to_angle( x, y, z,
7372
&final_angle[X_AXIS], &final_angle[Y_AXIS], &final_angle[Z_AXIS] ); // calculate final angle
@@ -84,14 +83,15 @@
8483
if( is_angle_legal( final_angle[X_AXIS], final_angle[Y_AXIS], final_angle[Z_AXIS] ) == false ){ // check the angle
8584
return UARM_COORD_ERROR;
8685
}
87-
86+
8887
// angle_to_coord( final_angle[X_AXIS], final_angle[Y_AXIS], final_angle[Z_AXIS], &x, &y, &z );
8988
// coord_arm2effect( &x, &y, &z );
9089

9190
// target[X_AXIS] = x;
9291
// target[Y_AXIS] = y;
9392
// target[Z_AXIS] = z;
94-
93+
if(feed_rate!=0)
94+
{
9595
step_to_coord( uarm.target_step[X_AXIS], uarm.target_step[Y_AXIS], uarm.target_step[Z_AXIS],
9696
&current_coord[X_AXIS], &current_coord[Y_AXIS], &current_coord[Z_AXIS]); // calculate the arm current coord
9797
coord_arm2effect( &current_coord[X_AXIS], &current_coord[Y_AXIS], &current_coord[Z_AXIS] ); // calculate the effect current coord
@@ -138,7 +138,8 @@
138138
coord_effect2arm( &final_coord[X_AXIS], &final_coord[Y_AXIS], &final_coord[Z_AXIS] ); // <! convert the position
139139

140140
coord_to_angle( final_coord[X_AXIS], final_coord[Y_AXIS], final_coord[Z_AXIS],
141-
&angle_x, &angle_y, &angle_z ); // <! calculate final angle
141+
&angle_x, &angle_y
142+
, &angle_z ); // <! calculate final angle
142143

143144
if( is_angle_legal( angle_x, angle_y, angle_z ) == false ){ // check the angle
144145
continue;
@@ -160,19 +161,25 @@
160161
else { break; }
161162
} while (1);
162163

163-
uarm.target_step[X_AXIS] = final_step[X_AXIS];
164+
uarm.target_step[X_AXIS] = final_step[X_AXIS];
164165
uarm.target_step[Y_AXIS] = final_step[Y_AXIS];
165166
uarm.target_step[Z_AXIS] = final_step[Z_AXIS];
166167

167168
final_step[X_AXIS] = (final_step[X_AXIS]) / (settings.steps_per_mm[X_AXIS]);
168169
final_step[Y_AXIS] = (final_step[Y_AXIS]) / (settings.steps_per_mm[Y_AXIS]);
169170
final_step[Z_AXIS] = (final_step[Z_AXIS]) / (settings.steps_per_mm[Z_AXIS]);
171+
172+
plan_buffer_line(final_step, feed_rate, invert_feed_rate);
170173

171-
plan_buffer_line(final_step, feed_rate, invert_feed_rate);
172-
173-
//DB_PRINT_STR( "%d %d %d\r\n", final_step[X_AXIS], final_step[Y_AXIS], final_step[Z_AXIS] );
174-
uarm.run_flag = true;
175-
174+
//DB_PRINT_STR( "%d %d %d\r\n", final_step[X_AXIS], final_step[Y_AXIS], final_step[Z_AXIS] );
175+
uarm.run_flag = true;
176+
177+
178+
}
179+
}
180+
else
181+
{
182+
return STATUS_OK;
176183
}
177184
return STATUS_OK;
178185
}
@@ -459,7 +466,7 @@ void mc_reset()
459466
if ((sys.state & (STATE_CYCLE | STATE_HOMING)) || (sys.suspend == SUSPEND_ENABLE_HOLD)) {
460467
if (sys.state == STATE_HOMING) { bit_true_atomic(sys_rt_exec_alarm, EXEC_ALARM_HOMING_FAIL); }
461468
else { bit_true_atomic(sys_rt_exec_alarm, EXEC_ALARM_ABORT_CYCLE); }
462-
st_go_idle(); // Force kill steppers. Position has likely been lost.
469+
st_go_idle_2(); // Force kill steppers. Position has likely been lost.
463470
}
464471
}
465472
}

src/protocol.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,13 +166,21 @@ void protocol_main_loop()
166166
protocol_auto_cycle_start();
167167
protocol_execute_realtime(); // Runtime command check point.
168168
if (sys.abort) { return; } // Bail to main() program loop to reset system.
169-
169+
170170
report_parse_result();
171171
if( uarm.motor_position_check ){
172172
check_motor_positon();
173173
}
174+
if ((uarm.restart_flag==true)&&(sys.state == STATE_IDLE))
175+
{
176+
update_motor_position();
177+
uarm.restart_flag=false;
178+
}
179+
if(sys.print_reset_flag==true)
180+
sys.print_reset_flag = false;
174181

175182
}
183+
176184
}
177185

178186
return; /* Never reached */

0 commit comments

Comments
 (0)