Skip to content

Commit

Permalink
ArdupilotManager: fix issue when sitl_frame is not set in the setting…
Browse files Browse the repository at this point in the history
…s file
  • Loading branch information
Williangalvani committed Oct 3, 2024
1 parent cef0aee commit 6871b45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/services/ardupilot_manager/ArduPilotManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def set_sitl_frame(self, frame: SITLFrame) -> None:
self.settings.save(self.configuration)

def load_sitl_frame(self) -> SITLFrame:
if self.configuration["sitl_frame"] != SITLFrame.UNDEFINED:
if self.configuration.get("sitl_frame", SITLFrame.UNDEFINED) != SITLFrame.UNDEFINED:
return SITLFrame(self.configuration["sitl_frame"])
frame = SITLFrame.VECTORED
logger.warning(f"SITL frame is undefined. Setting {frame} as current frame.")
Expand Down

0 comments on commit 6871b45

Please sign in to comment.