Skip to content

Commit 0293441

Browse files
committed
refactor car keyboard controls
1 parent f327504 commit 0293441

File tree

11 files changed

+275
-231
lines changed

11 files changed

+275
-231
lines changed

AirLib/include/api/VehicleApiBase.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class VehicleApiBase {
1414
public:
1515
virtual GeoPoint getHomeGeoPoint() = 0;
1616
virtual void enableApiControl(bool is_enabled) = 0;
17-
virtual bool isApiControlEnabled() = 0;
17+
virtual bool isApiControlEnabled() const = 0;
1818
virtual void reset() = 0;
1919

2020
virtual vector<VehicleCameraBase::ImageResponse> simGetImages(const vector<VehicleCameraBase::ImageRequest>& request) = 0;

AirLib/include/vehicles/car/api/CarApiBase.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ class CarApiBase : public VehicleApiBase {
6565

6666
virtual void setCarControls(const CarControls& controls) = 0;
6767
virtual CarState getCarState() = 0;
68+
virtual const CarApiBase::CarControls& getCarControls() const = 0;
69+
6870
virtual ~CarApiBase() = default;
6971
};
7072

AirLib/include/vehicles/multirotor/api/DroneApi.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ class DroneApi : public VehicleApiBase {
278278
vehicle_->printLogMessage(message, message_param, severity);
279279
}
280280

281-
virtual bool isApiControlEnabled() override
281+
virtual bool isApiControlEnabled() const override
282282
{
283283
return controller_->isApiControlEnabled();
284284
}

Unreal/Plugins/AirSim/Source/AirBlueprintLib.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class UAirBlueprintLib : public UBlueprintFunctionLibrary
3434

3535
public:
3636
static void LogMessageString(const std::string &prefix, const std::string &suffix, LogDebugLevel level, float persist_sec = 60);
37+
UFUNCTION(BlueprintCallable, Category = "Utils")
3738
static void LogMessage(const FString &prefix, const FString &suffix, LogDebugLevel level, float persist_sec = 60);
3839
static float GetWorldToMetersScale(const AActor* context);
3940

0 commit comments

Comments
 (0)