Skip to content

Commit

Permalink
refactor car keyboard controls
Browse files Browse the repository at this point in the history
  • Loading branch information
sytelus committed Nov 30, 2017
1 parent f327504 commit 0293441
Show file tree
Hide file tree
Showing 11 changed files with 275 additions and 231 deletions.
2 changes: 1 addition & 1 deletion AirLib/include/api/VehicleApiBase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class VehicleApiBase {
public:
virtual GeoPoint getHomeGeoPoint() = 0;
virtual void enableApiControl(bool is_enabled) = 0;
virtual bool isApiControlEnabled() = 0;
virtual bool isApiControlEnabled() const = 0;
virtual void reset() = 0;

virtual vector<VehicleCameraBase::ImageResponse> simGetImages(const vector<VehicleCameraBase::ImageRequest>& request) = 0;
Expand Down
2 changes: 2 additions & 0 deletions AirLib/include/vehicles/car/api/CarApiBase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ class CarApiBase : public VehicleApiBase {

virtual void setCarControls(const CarControls& controls) = 0;
virtual CarState getCarState() = 0;
virtual const CarApiBase::CarControls& getCarControls() const = 0;

virtual ~CarApiBase() = default;
};

Expand Down
2 changes: 1 addition & 1 deletion AirLib/include/vehicles/multirotor/api/DroneApi.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ class DroneApi : public VehicleApiBase {
vehicle_->printLogMessage(message, message_param, severity);
}

virtual bool isApiControlEnabled() override
virtual bool isApiControlEnabled() const override
{
return controller_->isApiControlEnabled();
}
Expand Down
1 change: 1 addition & 0 deletions Unreal/Plugins/AirSim/Source/AirBlueprintLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class UAirBlueprintLib : public UBlueprintFunctionLibrary

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

Expand Down
Loading

0 comments on commit 0293441

Please sign in to comment.