Skip to content

Conversation

@magwo
Copy link
Contributor

@magwo magwo commented Jan 29, 2024

Appears to have been a mistake when the RecoveryTanker task was added but not added to the tasks map.
Also missing default parameters which I think is preventing deserialization.

@magwo magwo force-pushed the fix-recovery-tanker branch from 6d1f0d8 to c8fa7be Compare January 29, 2024 21:55
@magwo magwo force-pushed the fix-recovery-tanker branch from c8fa7be to ae85851 Compare January 29, 2024 21:57
@magwo
Copy link
Contributor Author

magwo commented Jan 30, 2024

Not sure if we need None handling of the lastWaypoint thing.

@SnappyComebacks
Copy link
Contributor

Thanks for catching the missing entry.

Id = "RecoveryTanker"

def __init__(self, groupId: int, speed: float, altitude: float, lastWaypoint: Optional[int]):
def __init__(self, groupId=None, speed=600, altitude=4000, lastWaypoint: Optional[int] = None):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't delete the type annotations. You've changed this signature from float to int here.

@DanAlbert
Copy link
Collaborator

Also missing default parameters which I think is preventing deserialization.

Isn't that because it's missing a create_from_dict override? That seems the better fix, unless there's a good reason why one of these tasks should be creatable with no group ID.

(making the optional last waypoint argument optional makes sense, of course)

@magwo
Copy link
Contributor Author

magwo commented Feb 9, 2024

Good points, will take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants