Skip to content

Commit

Permalink
Fix loading autos with a null starting pose (#442)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjansen4857 authored Oct 30, 2023
1 parent ecacbe8 commit 21052c0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ frc2::CommandPtr AutoBuilder::getAutoCommandFromJson(const wpi::json &json) {
wpi::json::const_reference commandJson = json.at("command");

frc2::CommandPtr autoCommand = CommandUtil::commandFromJson(commandJson);
if (json.find("startingPose") != json.end()) {
if (!json.at("startingPose").is_null()) {
frc::Pose2d startPose = getStartingPoseFromJson(
json.at("startingPose"));
return frc2::cmd::Sequence(frc2::cmd::RunOnce([startPose]() {
Expand Down

0 comments on commit 21052c0

Please sign in to comment.