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

[hal] Fixes USBSerial SOS issue when removing USB cable from battery … #1707

Merged
merged 2 commits into from Mar 6, 2019

Conversation

@YutingYou
Copy link
Contributor

commented Mar 2, 2019

Problem

Fixes USBSerial SOS issue when removing USB cable from battery powered device

Solution

This issue is caused when sending data in an invalid state, the solution is to check the power state and allow the error return of USB sending API.

Steps to Test

  1. Flash the example application to a battery powered device
  2. Disconnect and reconnect the USB cable
  3. Observe the LED status, whether it will enter SOS mode

Example App

void setup() {
    Serial.begin();
}

void loop() {
    Serial.print("millis: ");
    Serial.println(millis());
    delay(1000);
}

References


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)

  • [Mesh] [hal] Fixes USBSerial SOS issue when removing USB cable from battery powered device #1707

@YutingYou YutingYou requested a review from avtolstoy Mar 2, 2019

@avtolstoy avtolstoy added the mesh label Mar 4, 2019

@YutingYou YutingYou force-pushed the fix/hal/usbserial-sos branch from ea776f5 to eb7b7ce Mar 5, 2019

@avtolstoy avtolstoy changed the base branch from mesh-develop to develop Mar 5, 2019

@avtolstoy avtolstoy force-pushed the fix/hal/usbserial-sos branch from eb7b7ce to 4395678 Mar 5, 2019

@avtolstoy avtolstoy merged commit 08a3373 into develop Mar 6, 2019

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

@avtolstoy avtolstoy deleted the fix/hal/usbserial-sos branch Mar 6, 2019

@technobly technobly added this to the 1.0.2-rc.1 milestone Mar 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.