mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-20 00:51:41 +00:00
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:
@@ -15,8 +15,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// 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
|
||||
|
||||
#include "photon/serde/PhotonPipelineResultSerde.h"
|
||||
|
||||
@@ -27,17 +26,15 @@ using StructType = SerdeType<PhotonPipelineResult>;
|
||||
void StructType::Pack(Packet& packet, const PhotonPipelineResult& value) {
|
||||
packet.Pack<photon::PhotonPipelineMetadata>(value.metadata);
|
||||
packet.Pack<std::vector<photon::PhotonTrackedTarget>>(value.targets);
|
||||
packet.Pack<std::optional<photon::MultiTargetPNPResult>>(
|
||||
value.multitagResult);
|
||||
packet.Pack<std::optional<photon::MultiTargetPNPResult>>(value.multitagResult);
|
||||
}
|
||||
|
||||
PhotonPipelineResult StructType::Unpack(Packet& packet) {
|
||||
return PhotonPipelineResult{PhotonPipelineResult_PhotonStruct{
|
||||
.metadata = packet.Unpack<photon::PhotonPipelineMetadata>(),
|
||||
.targets = packet.Unpack<std::vector<photon::PhotonTrackedTarget>>(),
|
||||
.multitagResult =
|
||||
packet.Unpack<std::optional<photon::MultiTargetPNPResult>>(),
|
||||
return PhotonPipelineResult{ PhotonPipelineResult_PhotonStruct{
|
||||
.metadata = packet.Unpack<photon::PhotonPipelineMetadata>(),
|
||||
.targets = packet.Unpack<std::vector<photon::PhotonTrackedTarget>>(),
|
||||
.multitagResult = packet.Unpack<std::optional<photon::MultiTargetPNPResult>>(),
|
||||
}};
|
||||
}
|
||||
|
||||
} // namespace photon
|
||||
} // namespace photon
|
||||
|
||||
Reference in New Issue
Block a user