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

Listening mode fixes #1337

Merged
merged 4 commits into from
May 25, 2017
Merged

Conversation

sergeuz
Copy link
Member

@sergeuz sergeuz commented May 18, 2017

Problem

The system attempts to enter listening mode every 1ms when the SETUP button is pressed.

Solution

Restore pre-0.6.0 behavior and make ManagedNetworkInterface::listening() return true not only when listening mode is already active, but also if it's pending for execution.

Steps to Test

Add some logging before network.listen() gets called in HAL_SysTick_Handler().

Example App

N/A

References

Original issue due to which WLAN_SMART_CONFIG_START flag was separated into WLAN_SMART_CONFIG_START and WLAN_SMART_CONFIG_ACTIVE flags: https://github.com/spark/firmware/issues/1013


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)

Bug fix

  • [PR #1337] Fixed system attempting to enter listening mode every 1ms when the SETUP button is pressed.

@sergeuz sergeuz added this to the 0.7.0 milestone May 18, 2017
@sergeuz sergeuz requested a review from avtolstoy May 18, 2017 12:45
@sergeuz sergeuz changed the title Listening mode flags fixes Listening mode fixes May 18, 2017
@m-mcgowan
Copy link
Contributor

how about using 2 flags - listening (for real) and listening pending?

@sergeuz
Copy link
Member Author

sergeuz commented May 18, 2017

There are 2 flags already: WLAN_SMART_CONFIG_START (listening mode is pending) and WLAN_SMART_CONFIG_ACTIVE (listening loop is actually running) – the latter one was introduced to fix https://github.com/spark/firmware/issues/1013. In this PR I just updated network_listening() to return true if any of the flags are set – previously it was checking only WLAN_SMART_CONFIG_ACTIVE.

@technobly technobly added the bug label May 25, 2017
@technobly technobly merged commit f1eee9d into feature/photon/wiced-3.7.0-7 May 25, 2017
@technobly technobly deleted the fix/listen_mode_flags branch May 25, 2017 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants