Skip to content

Commit

Permalink
fix: (hack) Ensure vizinterface knows about RWModels enum.
Browse files Browse the repository at this point in the history
  • Loading branch information
dpad committed Nov 11, 2024
1 parent 0e3e6d5 commit a9e2ff2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/simulation/vizard/vizInterface/vizInterface.i
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,16 @@ namespace std {
%include "vizInterface.h"
%include "simulation/vizard/_GeneralModuleFiles/vizStructures.h"

// XXX: Include the reactionWheelSupport to ensure that SWIG knows about the
// RWModels enum, and can correctly interpret it as an integer and destroy it
// without leaking memory. This needs to be imported here because of the way
// that Basilisk is built, which causes copies of types to be scattered across
// different modules. This means that instead of a model using the correct
// message type of `Basilisk.architecture.messaging.RWConfigLogMsgPayload`, they
// use `Basilisk.simulation.vizInterface.RWConfigLogMsgPayload` instead... :(
// TODO: We should clean up the SWIG build system so such issues don't occur.
%include "simulation/dynamics/reactionWheels/reactionWheelSupport.h"

%include "architecture/msgPayloadDefC/CameraConfigMsgPayload.h"
struct CameraConfigMsg_C;
%include "architecture/msgPayloadDefC/RWConfigLogMsgPayload.h"
Expand Down

0 comments on commit a9e2ff2

Please sign in to comment.