Commit f3564ccc by gdj

调整参数commanderFlightHeight

parent 762ebec3
...@@ -103,6 +103,11 @@ public class OsdDockDrone { ...@@ -103,6 +103,11 @@ public class OsdDockDrone {
*/ */
private CommanderFlightModeEnum commanderFlightMode; private CommanderFlightModeEnum commanderFlightMode;
/**
* 指点飞行高度
*/
private Float commanderFlightHeight;
public OsdDockDrone() { public OsdDockDrone() {
} }
...@@ -502,4 +507,13 @@ public class OsdDockDrone { ...@@ -502,4 +507,13 @@ public class OsdDockDrone {
return this; return this;
} }
public Float getCommanderFlightHeight() {
return commanderFlightHeight;
}
public OsdDockDrone setCommanderFlightHeight(Float commanderFlightHeight) {
this.commanderFlightHeight = commanderFlightHeight;
return this;
}
} }
\ No newline at end of file
...@@ -17,7 +17,7 @@ public class CommanderFlightHeightReceiver extends BasicDeviceProperty { ...@@ -17,7 +17,7 @@ public class CommanderFlightHeightReceiver extends BasicDeviceProperty {
private static final int HEIGHT_LIMIT_MIN = 20; private static final int HEIGHT_LIMIT_MIN = 20;
private Integer commanderFlightHeight; private Float commanderFlightHeight;
@Override @Override
public boolean valid() { public boolean valid() {
...@@ -26,6 +26,6 @@ public class CommanderFlightHeightReceiver extends BasicDeviceProperty { ...@@ -26,6 +26,6 @@ public class CommanderFlightHeightReceiver extends BasicDeviceProperty {
@Override @Override
public boolean canPublish(OsdDockDrone osd) { public boolean canPublish(OsdDockDrone osd) {
return commanderFlightHeight.intValue() != osd.getHeightLimit(); return commanderFlightHeight.floatValue() != osd.getCommanderFlightHeight();
} }
} }
\ No newline at end of file
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