Skip to content

Commit

Permalink
Return list of ints for HSV.
Browse files Browse the repository at this point in the history
  • Loading branch information
teiszler committed Mar 15, 2024
1 parent 60f8d44 commit 2d6fbe0
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ public String toJson() {
return String.format("{'lng': %s, 'lat': %s, 'alt': %s}", x, y, z);
}
}
public record HSV(double x, double y, double z) {
public record HSV(double h, double s, double v) {
public String toString() {
return String.format("(%s, %s, %s)", x, y, z);
return String.format("[%s, %s, %s]", int(h), int(s), int(v));
}
}

Expand Down Expand Up @@ -57,8 +57,8 @@ public String generateDefineTaskCode() {
task_attr_%s["hover_delay"] = "%s"
task_attr_%s["coords"] = "%s"
task_attr_%s["model"] = "%s"
task_attr_%s["upper_bound"] = "%s"
task_attr_%s["lower_bound"] = "%s"
task_attr_%s["upper_bound"] = %s
task_attr_%s["lower_bound"] = %s
""".formatted(taskID, taskID, taskID, gimbalPitch, taskID, droneRotation, taskID, sampleRate, taskID, hoverDelay, taskID, waypointsStr, taskID, model, taskID, upperBound.toString(), taskID, lowerBound.toString())
+ this.generateTaskTransCode() +
"""
Expand Down

0 comments on commit 2d6fbe0

Please sign in to comment.