Skip to content

Commit

Permalink
Fix compilation & API docs build error (microsoft#2998)
Browse files Browse the repository at this point in the history
* [Pythonclient] Fix tabs->spaces error for Sphinx build

* Fix hidden previous declaration error
  • Loading branch information
rajat2004 authored Sep 3, 2020
1 parent 235bc80 commit 43c3fa5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions PythonClient/airsim/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def simGetImages(self, requests, vehicle_name = ''):
"""
responses_raw = self.client.call('simGetImages', requests, vehicle_name)
return [ImageResponse.from_msgpack(response_raw) for response_raw in responses_raw]

def simRunConsoleCommand(self, command):
"""
Allows the client to execute a command in Unreal's native console, via an API.
Expand All @@ -267,7 +267,7 @@ def simRunConsoleCommand(self, command):
Returns:
[bool]: Success
"""
return self.client.call('simRunConsoleCommand', command)
return self.client.call('simRunConsoleCommand', command)

# gets the static meshes in the unreal scene
def simGetMeshPositionVertexBuffers(self):
Expand Down
12 changes: 6 additions & 6 deletions Unreal/Plugins/AirSim/Source/SimHUD/SimHUD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,16 +319,16 @@ void ASimHUD::initializeSubWindows()
if (!simmode_)
return;

auto vehicle_sim_api = simmode_->getVehicleSimApi();
auto default_vehicle_sim_api = simmode_->getVehicleSimApi();

if (vehicle_sim_api) {
auto camera_count = vehicle_sim_api->getCameraCount();
if (default_vehicle_sim_api) {
auto camera_count = default_vehicle_sim_api->getCameraCount();

//setup defaults
if (camera_count > 0) {
subwindow_cameras_[0] = vehicle_sim_api->getCamera("");
subwindow_cameras_[1] = vehicle_sim_api->getCamera(""); //camera_count > 3 ? 3 : 0
subwindow_cameras_[2] = vehicle_sim_api->getCamera(""); //camera_count > 4 ? 4 : 0
subwindow_cameras_[0] = default_vehicle_sim_api->getCamera("");
subwindow_cameras_[1] = default_vehicle_sim_api->getCamera(""); //camera_count > 3 ? 3 : 0
subwindow_cameras_[2] = default_vehicle_sim_api->getCamera(""); //camera_count > 4 ? 4 : 0
}
else
subwindow_cameras_[0] = subwindow_cameras_[1] = subwindow_cameras_[2] = nullptr;
Expand Down

0 comments on commit 43c3fa5

Please sign in to comment.