Commit de3026b6 authored by Julian Zobel's avatar Julian Zobel
Browse files

Bugfix

parent b8dd7521
......@@ -77,7 +77,7 @@ public class SimpleMulticopterMovement implements UAVMovementModel {
@Override
public void move(long timeBetweenMovementOperations) {
if(first) {
if(false) {
System.out.println(hoverThrustRequired());
System.out.println(motor.getMaxThrust());
......@@ -191,6 +191,21 @@ public class SimpleMulticopterMovement implements UAVMovementModel {
}
}
else if(motor.isOn()) {
if(currentSpeed != 0) {
throw new UnsupportedOperationException("no route but speed not 0?");
}
PositionVector position = new PositionVector(topologyComponent.getRealPosition());
if(position.getAltitude() == 0) {
motor.requestThrust(0);
}
else {
motor.requestThrust(hoverThrustRequired());
}
}
}
/*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment