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

Use type-safe wrapper for flag values #1315

Merged
merged 1 commit into from May 4, 2017

Conversation

@sergeuz
Copy link
Member

commented Apr 27, 2017

Problem

This PR fixes a regression introduced into current develop by #1236, which allowed Particle.publish() flags to be converted to int implicitly.

@technobly, thanks for finding out this!

Solution

Use type-safe wrapper for individual flag values, similarly to how it was implemented in 0.6.1.

Steps to Test

Run unit tests, compile wiring/api tests.

Example App

void setup() {
    // NO_ACK flag should disable acknowledgement of the event (previously it was changing event's TTL instead)
    Particle.publish("event", "data", NO_ACK);
}

void loop() {
}

Completeness

  • User is totes amazing for contributing!
  • Contributor has signed CLA (Info here)
  • Problem and Solution clearly stated
  • Run unit/integration/application tests on device
  • Added documentation
  • Added to CHANGELOG.md after merging (add links to docs and issues)

Bugfix

  • [PR #1315] Fixes Particle Publish flag implicit conversion issue. E.g. Particle.publish("event", "data", NO_ACK); was previously changing event's TTL instead disabling acknowledgement of the event)

@sergeuz sergeuz added this to the 0.7.0 milestone Apr 27, 2017

@technobly technobly self-requested a review May 4, 2017

@technobly technobly merged commit ef6c8e3 into develop May 4, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@technobly technobly deleted the fix/type_safe_flags branch May 4, 2017

@technobly technobly added the bug label Jun 14, 2017

@avtolstoy avtolstoy referenced this pull request Jul 7, 2017
2 of 2 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.