Tidy up of python autogenerated messages (#1594)

This fixes mostly formatting issues so there is no longer any diff with
things after rerunning the generation script. Yes, most of this can be
fixed by running wpiformat but that doesn't exist as a pre-commit hook
atm, so I think this is nicer.

It also removes any reference to the java encode/decode within the
python message gen
This commit is contained in:
Lucien Morey
2024-11-21 15:43:33 +11:00
committed by GitHub
parent fa66ed866c
commit 61552ad6ca
33 changed files with 172 additions and 186 deletions

View File

@@ -17,15 +17,13 @@
#pragma once
// THIS std::FILE WAS AUTO-GENERATED BY ./photon-serde/generate_messages.py. DO
// NOT MODIFY
// THIS FILE WAS AUTO-GENERATED BY ./photon-serde/generate_messages.py. DO NOT MODIFY
// Includes for dependant types
#include "photon/targeting/PnpResult.h"
#include <stdint.h>
#include <vector>
#include "photon/targeting/PnpResult.h"
namespace photon {
@@ -33,8 +31,7 @@ struct MultiTargetPNPResult_PhotonStruct {
photon::PnpResult estimatedPose;
std::vector<int16_t> fiducialIDsUsed;
friend bool operator==(MultiTargetPNPResult_PhotonStruct const&,
MultiTargetPNPResult_PhotonStruct const&) = default;
friend bool operator==(MultiTargetPNPResult_PhotonStruct const&, MultiTargetPNPResult_PhotonStruct const&) = default;
};
} // namespace photon
} // namespace photon

View File

@@ -17,12 +17,12 @@
#pragma once
// THIS std::FILE WAS AUTO-GENERATED BY ./photon-serde/generate_messages.py. DO
// NOT MODIFY
// THIS FILE WAS AUTO-GENERATED BY ./photon-serde/generate_messages.py. DO NOT MODIFY
// Includes for dependant types
#include <stdint.h>
namespace photon {
struct PhotonPipelineMetadata_PhotonStruct {
@@ -31,8 +31,7 @@ struct PhotonPipelineMetadata_PhotonStruct {
int64_t publishTimestampMicros;
int64_t timeSinceLastPong;
friend bool operator==(PhotonPipelineMetadata_PhotonStruct const&,
PhotonPipelineMetadata_PhotonStruct const&) = default;
friend bool operator==(PhotonPipelineMetadata_PhotonStruct const&, PhotonPipelineMetadata_PhotonStruct const&) = default;
};
} // namespace photon
} // namespace photon

View File

@@ -17,18 +17,16 @@
#pragma once
// THIS std::FILE WAS AUTO-GENERATED BY ./photon-serde/generate_messages.py. DO
// NOT MODIFY
// THIS FILE WAS AUTO-GENERATED BY ./photon-serde/generate_messages.py. DO NOT MODIFY
// Includes for dependant types
#include <stdint.h>
#include <optional>
#include <vector>
#include "photon/targeting/MultiTargetPNPResult.h"
#include "photon/targeting/PhotonPipelineMetadata.h"
#include "photon/targeting/PhotonTrackedTarget.h"
#include <optional>
#include <stdint.h>
#include <vector>
namespace photon {
@@ -37,8 +35,7 @@ struct PhotonPipelineResult_PhotonStruct {
std::vector<photon::PhotonTrackedTarget> targets;
std::optional<photon::MultiTargetPNPResult> multitagResult;
friend bool operator==(PhotonPipelineResult_PhotonStruct const&,
PhotonPipelineResult_PhotonStruct const&) = default;
friend bool operator==(PhotonPipelineResult_PhotonStruct const&, PhotonPipelineResult_PhotonStruct const&) = default;
};
} // namespace photon
} // namespace photon

View File

@@ -17,17 +17,14 @@
#pragma once
// THIS std::FILE WAS AUTO-GENERATED BY ./photon-serde/generate_messages.py. DO
// NOT MODIFY
// THIS FILE WAS AUTO-GENERATED BY ./photon-serde/generate_messages.py. DO NOT MODIFY
// Includes for dependant types
#include "photon/targeting/TargetCorner.h"
#include <frc/geometry/Transform3d.h>
#include <stdint.h>
#include <vector>
#include <frc/geometry/Transform3d.h>
#include "photon/targeting/TargetCorner.h"
namespace photon {
@@ -45,8 +42,7 @@ struct PhotonTrackedTarget_PhotonStruct {
std::vector<photon::TargetCorner> minAreaRectCorners;
std::vector<photon::TargetCorner> detectedCorners;
friend bool operator==(PhotonTrackedTarget_PhotonStruct const&,
PhotonTrackedTarget_PhotonStruct const&) = default;
friend bool operator==(PhotonTrackedTarget_PhotonStruct const&, PhotonTrackedTarget_PhotonStruct const&) = default;
};
} // namespace photon
} // namespace photon

View File

@@ -17,13 +17,12 @@
#pragma once
// THIS std::FILE WAS AUTO-GENERATED BY ./photon-serde/generate_messages.py. DO
// NOT MODIFY
// THIS FILE WAS AUTO-GENERATED BY ./photon-serde/generate_messages.py. DO NOT MODIFY
// Includes for dependant types
#include <frc/geometry/Transform3d.h>
#include <stdint.h>
#include <frc/geometry/Transform3d.h>
namespace photon {
@@ -34,8 +33,7 @@ struct PnpResult_PhotonStruct {
double altReprojErr;
double ambiguity;
friend bool operator==(PnpResult_PhotonStruct const&,
PnpResult_PhotonStruct const&) = default;
friend bool operator==(PnpResult_PhotonStruct const&, PnpResult_PhotonStruct const&) = default;
};
} // namespace photon
} // namespace photon

View File

@@ -17,20 +17,19 @@
#pragma once
// THIS std::FILE WAS AUTO-GENERATED BY ./photon-serde/generate_messages.py. DO
// NOT MODIFY
// THIS FILE WAS AUTO-GENERATED BY ./photon-serde/generate_messages.py. DO NOT MODIFY
// Includes for dependant types
#include <stdint.h>
namespace photon {
struct TargetCorner_PhotonStruct {
double x;
double y;
friend bool operator==(TargetCorner_PhotonStruct const&,
TargetCorner_PhotonStruct const&) = default;
friend bool operator==(TargetCorner_PhotonStruct const&, TargetCorner_PhotonStruct const&) = default;
};
} // namespace photon
} // namespace photon