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 field to light.proto to define if a light is on or off #223

Merged
merged 1 commit into from
Feb 17, 2022

Conversation

ahcorde
Copy link
Contributor

@ahcorde ahcorde commented Feb 16, 2022

Signed-off-by: ahcorde [email protected]

🎉 New feature

Related with :

Summary

Added field to light.proto to define if a light is on or off

Test it

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

@ahcorde ahcorde self-assigned this Feb 16, 2022
@github-actions github-actions bot added the 🌱 garden Ignition Garden label Feb 16, 2022
@ahcorde
Copy link
Contributor Author

ahcorde commented Feb 16, 2022

@osrf-jenkins retest this please

@codecov
Copy link

codecov bot commented Feb 16, 2022

Codecov Report

Merging #223 (0bb9f48) into main (400764d) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #223   +/-   ##
=======================================
  Coverage   85.46%   85.46%           
=======================================
  Files           9        9           
  Lines         956      956           
=======================================
  Hits          817      817           
  Misses        139      139           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 400764d...0bb9f48. Read the comment docs.

@ahcorde ahcorde merged commit c154be2 into main Feb 17, 2022
@ahcorde ahcorde deleted the ahcorde/main/light_onoff branch February 17, 2022 08:41
@chapulina
Copy link
Contributor

Something to keep in mind regarding boolean fields is that they default to false if unset. This means that any message not populating this field will have the light turned off. This may cause issues for users migrating from Fortress to Garden.

I'd suggest flipping the field's name so that the default behavior (light on) happens when the field is unset. i.e.

msgs::Light lightMsg;
assert(!lightMsg.is_light_off());

@ahcorde ahcorde mentioned this pull request Mar 11, 2022
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌱 garden Ignition Garden
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants