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

Add static IP address as a build feature #509

Merged
merged 4 commits into from
Feb 15, 2022

Conversation

svrotter
Copy link
Collaborator

@svrotter svrotter commented Feb 9, 2022

In some cases it might be advantageous to set a static IP address for Stabilizer e.g. if it is used in an embedded environment that doesn't support DHCP or troubleshooting problems with DHCP negotiation.
This PR add this functionality as a build feature.

@svrotter svrotter added the enhancement New feature or request label Feb 9, 2022
src/hardware/setup.rs Show resolved Hide resolved
src/hardware/setup.rs Outdated Show resolved Hide resolved
src/hardware/setup.rs Outdated Show resolved Hide resolved
src/hardware/setup.rs Outdated Show resolved Hide resolved
src/hardware/setup.rs Outdated Show resolved Hide resolved
@ryan-summers
Copy link
Member

It occurs to me that we could actually do this entirely based on the presence of some input environment variable instead of using a cargo-feature. E.g. use some default UNSPECIFIED IP if nothing's provided on the STATIC_IP variable, otherwise use the provided IP.

@svrotter
Copy link
Collaborator Author

Couldn't set it to UNSPECIFIED somehow, it always panics then. Maybe that's my incompetence but setting it to 0.0.0.0 and checking for is_unspecified () worked

src/hardware/setup.rs Outdated Show resolved Hide resolved
@ryan-summers
Copy link
Member

bors try

bors bot added a commit that referenced this pull request Feb 15, 2022
@bors
Copy link
Contributor

bors bot commented Feb 15, 2022

@ryan-summers
Copy link
Member

Looking good so far, only further changes:

  1. Add an entry to the CHANGELOG
  2. Either update the docs in book/ to mention static IP configuration options or spawn an issue so we can add it later

Copy link
Member

@jordens jordens left a comment

Choose a reason for hiding this comment

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

LGTM
But do update the book or file an issue.

@ryan-summers
Copy link
Member

bors r+

@bors
Copy link
Contributor

bors bot commented Feb 15, 2022

@bors bors bot merged commit 02a791d into quartiq:master Feb 15, 2022
@jordens jordens mentioned this pull request Feb 15, 2022
@svrotter svrotter deleted the sr/feature/static_ip branch February 17, 2022 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants