UnitTests auch G21
This commit is contained in:
@@ -48,6 +48,30 @@ describe('GCode.receiveGCode', () => {
|
||||
expect(robot.y).toBe(8)
|
||||
})
|
||||
|
||||
test('G1 ignore Jogg', () => {
|
||||
const robot = createDummyRobot()
|
||||
robot.moveRelative = true
|
||||
robot.x = 5
|
||||
robot.y = 5
|
||||
|
||||
GCode.receiveGCode(robot, '$J=G91 G1 X2 Y3')
|
||||
|
||||
expect(robot.x).toBe(7)
|
||||
expect(robot.y).toBe(8)
|
||||
})
|
||||
|
||||
test('G1 ignore Jogg absolute, G21 = mm ist OK', () => {
|
||||
const robot = createDummyRobot()
|
||||
robot.moveRelative = true
|
||||
robot.x = 5
|
||||
robot.y = 5
|
||||
|
||||
GCode.receiveGCode(robot, '$J=G90 G21 G1 X20 Y30')
|
||||
|
||||
expect(robot.x).toBe(20)
|
||||
expect(robot.y).toBe(30)
|
||||
})
|
||||
|
||||
test('M1 relativ verändert Motorwerte', () => {
|
||||
const robot = createDummyRobot()
|
||||
robot.moveRelative = true
|
||||
|
||||
Reference in New Issue
Block a user