Skip to content

Commit

Permalink
Merge branch 'Panics-hotfix/hotfix_ue5.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
xxEoD2242 committed Jun 27, 2024
2 parents 60b28ad + 7aad6c5 commit c115fdc
Show file tree
Hide file tree
Showing 24 changed files with 315 additions and 170 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "ExternalRepositories/Colosseum_Eigen"]
path = ExternalRepositories/Colosseum_Eigen
url = https://github.com/Panics/Colosseum_Eigen.git
1 change: 0 additions & 1 deletion AirLib/.gitignore

This file was deleted.

8 changes: 4 additions & 4 deletions AirLib/AirLib.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -212,14 +212,14 @@
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<WholeProgramOptimization>false</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<WholeProgramOptimization>false</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
Expand All @@ -232,14 +232,14 @@
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<WholeProgramOptimization>false</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<WholeProgramOptimization>false</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1198,6 +1198,24 @@ namespace airlib
return logviewer_proxy_ != nullptr;
}

void qgcCallback(std::shared_ptr<mavlinkcom::MavLinkConnection> connection_val, const mavlinkcom::MavLinkMessage& msg)
{
unused(connection_val);
processQgcMessages(msg);
}

void controlCallback(std::shared_ptr<mavlinkcom::MavLinkConnection> connection_val, const mavlinkcom::MavLinkMessage& msg)
{
unused(connection_val);
processControlMessages(msg);
}

void mavCallback(std::shared_ptr<mavlinkcom::MavLinkConnection> connection_val, const mavlinkcom::MavLinkMessage& msg)
{
unused(connection_val);
processMavMessages(msg);
}

bool connectToQGC()
{
if (connection_info_.qgc_ip_address.size() > 0) {
Expand All @@ -1209,10 +1227,12 @@ namespace airlib
qgc_proxy_ = nullptr;
}
else {
connection->subscribe([=](std::shared_ptr<mavlinkcom::MavLinkConnection> connection_val, const mavlinkcom::MavLinkMessage& msg) {
unused(connection_val);
processQgcMessages(msg);
});
mavlinkcom::MessageHandler handler = std::bind(&MavLinkMultirotorApi::qgcCallback, this, std::placeholders::_1, std::placeholders::_2);
connection->subscribe(handler);
//connection->subscribe([=](std::shared_ptr<mavlinkcom::MavLinkConnection> connection_val, const mavlinkcom::MavLinkMessage& msg) {
// unused(connection_val);
// processQgcMessages(msg);
//});
}
}
return qgc_proxy_ != nullptr;
Expand Down Expand Up @@ -1314,10 +1334,13 @@ namespace airlib
}

// start listening to the SITL connection.
connection_->subscribe([=](std::shared_ptr<mavlinkcom::MavLinkConnection> connection, const mavlinkcom::MavLinkMessage& msg) {
unused(connection);
processMavMessages(msg);
});
mavlinkcom::MessageHandler handler = std::bind(&MavLinkMultirotorApi::mavCallback, this, std::placeholders::_1, std::placeholders::_2);
connection_->subscribe(handler);

//connection_->subscribe([=](std::shared_ptr<mavlinkcom::MavLinkConnection> connection, const mavlinkcom::MavLinkMessage& msg) {
// unused(connection);
// processMavMessages(msg);
//});

hil_node_ = std::make_shared<mavlinkcom::MavLinkNode>(connection_info_.sim_sysid, connection_info_.sim_compid);
hil_node_->connect(connection_);
Expand Down Expand Up @@ -1428,10 +1451,13 @@ namespace airlib
// listen to this UDP mavlink connection also
auto mavcon = mav_vehicle_->getConnection();
if (mavcon != nullptr && mavcon != connection_) {
mavcon->subscribe([=](std::shared_ptr<mavlinkcom::MavLinkConnection> connection, const mavlinkcom::MavLinkMessage& msg) {
unused(connection);
processControlMessages(msg);
});
mavlinkcom::MessageHandler handler = std::bind(&MavLinkMultirotorApi::controlCallback, this, std::placeholders::_1, std::placeholders::_2);
mavcon->subscribe(handler);

//mavcon->subscribe([=](std::shared_ptr<mavlinkcom::MavLinkConnection> connection, const mavlinkcom::MavLinkMessage& msg) {
// unused(connection);
// processControlMessages(msg);
//});
}
else {
mav_vehicle_->connect(connection_);
Expand Down Expand Up @@ -1497,10 +1523,13 @@ namespace airlib
addStatusMessage(Utils::stringf("Connected to PX4 over serial port: %s", port_name_auto.c_str()));

// start listening to the HITL connection.
connection_->subscribe([=](std::shared_ptr<mavlinkcom::MavLinkConnection> connection, const mavlinkcom::MavLinkMessage& msg) {
unused(connection);
processMavMessages(msg);
});
mavlinkcom::MessageHandler handler = std::bind(&MavLinkMultirotorApi::mavCallback, this, std::placeholders::_1, std::placeholders::_2);
connection_->subscribe(handler);

//connection_->subscribe([=](std::shared_ptr<mavlinkcom::MavLinkConnection> connection, const mavlinkcom::MavLinkMessage& msg) {
// unused(connection);
// processMavMessages(msg);
//});

mav_vehicle_ = std::make_shared<mavlinkcom::MavLinkVehicle>(connection_info_.vehicle_sysid, connection_info_.vehicle_compid);

Expand Down
3 changes: 0 additions & 3 deletions AirLib/update_mavlibkcom.bat

This file was deleted.

1 change: 1 addition & 0 deletions ExternalRepositories/Colosseum_Eigen
Submodule Colosseum_Eigen added at 4a8ac6
23 changes: 0 additions & 23 deletions Unreal/Environments/Blocks/.gitignore

This file was deleted.

2 changes: 1 addition & 1 deletion Unreal/Environments/Blocks/Blocks.uproject
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"FileVersion": 3,
"EngineAssociation": "5.3",
"EngineAssociation": "5.4",
"Category": "",
"Description": "",
"Modules": [
Expand Down
4 changes: 2 additions & 2 deletions Unreal/Environments/Blocks/Config/DefaultEngine.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ThreePlayerSplitscreenLayout=FavorTop
GameInstanceClass=/Script/Engine.GameInstance
GameDefaultMap=/Game/FlyingCPP/Maps/FlyingExampleMap
ServerDefaultMap=/Engine/Maps/Entry
GlobalDefaultGameMode=/Script/Blocks.BlocksGameMode
GlobalDefaultGameMode=/Script/AirSim.AirSimGameMode
GlobalDefaultServerGameMode=None

[/Script/IOSRuntimeSettings.IOSRuntimeSettings]
Expand Down Expand Up @@ -71,7 +71,7 @@ PhysXTreeRebuildRate=10
[/Script/AndroidFileServerEditor.AndroidFileServerRuntimeSettings]
bEnablePlugin=True
bAllowNetworkConnection=True
SecurityToken=811F8F1C4E41692A119A55BE04E6DB61
SecurityToken=E4EBEAA64CDE3B39980008BE0CBB1C01
bIncludeInShipping=False
bAllowExternalStartInShipping=False
bCompileAFSProject=False
Expand Down
1 change: 0 additions & 1 deletion Unreal/Environments/Blocks/Config/DefaultInput.ini
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,3 @@ DefaultInputComponentClass=/Script/EnhancedInput.EnhancedInputComponent
DefaultTouchInterface=/Engine/MobileResources/HUD/DefaultVirtualJoysticks.DefaultVirtualJoysticks
-ConsoleKeys=Tilde
+ConsoleKeys=Tilde

3 changes: 2 additions & 1 deletion Unreal/Environments/Blocks/Source/Blocks.Target.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ public class BlocksTarget : TargetRules
{
public BlocksTarget(TargetInfo Target) : base(Target)
{
Type = TargetType.Game;
DefaultBuildSettings = BuildSettingsVersion.V5;
Type = TargetType.Game;
ExtraModuleNames.AddRange(new string[] { "Blocks" });
DefaultBuildSettings = BuildSettingsVersion.V4;
//bUseUnityBuild = false;
Expand Down
6 changes: 5 additions & 1 deletion Unreal/Environments/Blocks/Source/BlocksEditor.Target.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ public class BlocksEditorTarget : TargetRules
{
public BlocksEditorTarget(TargetInfo Target) : base(Target)
{
Type = TargetType.Editor;
DefaultBuildSettings = BuildSettingsVersion.V5;
Type = TargetType.Editor;
ExtraModuleNames.AddRange(new string[] { "Blocks" });
<<<<<<< HEAD
DefaultBuildSettings = BuildSettingsVersion.V4;
=======
>>>>>>> f5f6cc1d17237900be5e04cfe99ceb9293f1b14b
//bUseUnityBuild = false;
//bUsePCHFiles = false;
}
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion Unreal/Plugins/AirSim/Source/AirBlueprintLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class UAirBlueprintLib : public UBlueprintFunctionLibrary
FName name_n = FName(*name);
for (TActorIterator<AActor> It(context->GetWorld(), T::StaticClass()); It; ++It) {
AActor* Actor = *It;
if (IsValid(Actor) && (Actor->ActorHasTag(name_n) || Actor->GetName().Compare(name) == 0)) {
if (!Actor->IsPendingKillPending() && (Actor->ActorHasTag(name_n) || Actor->GetName().Compare(name) == 0)) {
return static_cast<T*>(Actor);
}
}
Expand Down
Loading

0 comments on commit c115fdc

Please sign in to comment.