Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added RpcLibPort to change rpc port easily (#1711) #1981

Closed
wants to merge 2 commits into from
Closed

Added RpcLibPort to change rpc port easily (#1711) #1981

wants to merge 2 commits into from

Conversation

rapsealk
Copy link
Contributor

I found issue number #1711 while I was trying to change default rpc port,

and thought it might be handy if there is a variable with common value.

Thank you!

@msftclas
Copy link

msftclas commented May 23, 2019

CLA assistant check
All CLA requirements met.

@@ -16,6 +16,11 @@
#include "physics/Environment.hpp"
#include "api/WorldSimApiBase.hpp"

#include "api/RpcLibPort.hpp"

const extern uint16_t RpcLibPort;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh.. thank you for the link! I will fix it.


const uint16_t RpcLibPort = 41451;

#endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea of const in a separate file in general, but we don't quite have it in place in the airsim code base.
I think it might make more sense to define rpclibport=41451 in common/Common.hpp?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your feedback! I agree with you; separating variables in each file can make code look unclean.
May I change and make a PR again?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, just saw this now.
Sure, you can also force-push on your current branch, if that's easier.

#ifndef air_RpcLibPort_hpp
#define air_RpcLibPort_hpp

#include "common/Common.hpp"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don't need this?

msb336 pushed a commit to msb336/AirSim that referenced this pull request Sep 12, 2019
@msb336
Copy link
Contributor

msb336 commented Sep 12, 2019

Closing to and opening another PR with compatibility fixes & added settings.json functionality

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants