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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moves WiFi tester from system-part2 into user module #1378

Merged
merged 2 commits into from Nov 21, 2017

Conversation

@avtolstoy
Copy link
Member

commented Aug 30, 2017

Problem

We are currently running low on flash space in system-part2. As WiFiTester code is mainly used during manufacturing and testing, we can move it out of system firmware into a user module and enable it conditionally.

Solution

Moves WiFiTester into the user module 馃槃

Sizes comparisons:
0.7.0-rc.3:

   text	   data	    bss	    dec	    hex	filename
 261108	    156	    268	 261532	  3fd9c	../../../build/target/system-part1/platform-6-m/system-part1.elf
   text	   data	    bss	    dec	    hex	filename
 252972	   2260	  38484	 293716	  47b54	../../../build/target/system-part2/platform-6-m/system-part2.elf
   text	   data	    bss	    dec	    hex	filename
   6468	    156	   1400	   8024	   1f58	../../../build/target/user-part/platform-6-m/tinker.elf

This branch

   text	   data	    bss	    dec	    hex	filename
 261108	    156	    268	 261532	  3fd9c	../../../build/target/system-part1/platform-6-m/system-part1.elf
   text	   data	    bss	    dec	    hex	filename
 249788	   2260	  38508	 290556	  46efc	../../../build/target/system-part2/platform-6-m/system-part2.elf
   text	   data	    bss	    dec	    hex	filename
  10900	    156	   1400	  12456	   30a8	../../../build/target/user-part/platform-6-m/tinker.elf

Steps to Test

  • tinker
  • app/listen_mode test
  • wifitester app

Example App

#include "application.h"

// Enables WiFiTester 
STARTUP(System.enable(SYSTEM_FLAG_WIFITESTER_OVER_SERIAL1));
STARTUP(System.enableFeature(FEATURE_WIFITESTER));

void setup() {
}

void loop() {
}

References

  • CH7262

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)

@m-mcgowan m-mcgowan self-requested a review Sep 7, 2017

#define SETUP_WIFITESTER_IMPL()
#endif

#define SETUP_WIFITESTER() STARTUP(SETUP_WIFITESTER_IMPL())

This comment has been minimized.

Copy link
@m-mcgowan

m-mcgowan Sep 7, 2017

Contributor

Doesn't look to me like this macro is used? Is it possible to replace the SETUP_WIFITESTER_IMPL() macro with a regular function? It would be simpler to read and maintain as a function.

This comment has been minimized.

Copy link
@m-mcgowan

m-mcgowan Nov 16, 2017

Contributor

ping @avtolstoy - any thoughts on that?

This comment has been minimized.

Copy link
@avtolstoy

avtolstoy Nov 16, 2017

Author Member

SETUP_WIFITESTER() is not used and instead we now enable it via STARTUP(System.enableFeature(FEATURE_WIFITESTER));, so it can be removed.

I'll try moving the implementation into a function today.

@m-mcgowan m-mcgowan added this to the 0.8.0 milestone Nov 14, 2017

avtolstoy added 2 commits Aug 30, 2017
WiFiTester moved into user module. The applications that require this鈥
鈥 feature need to enable it using System.enableFeature(FEATURE_WIFITESTER)

@avtolstoy avtolstoy force-pushed the feature/ch7262-wifitester-user-module branch from e13f3e4 to 393a77b Nov 16, 2017

@m-mcgowan m-mcgowan merged commit 509dff3 into develop Nov 21, 2017

0 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/travis-ci/push The Travis CI build failed
Details
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鈥檛 perform that action at this time.