Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: 4DGL-uLCD-SE mbed
Diff: src/Whiffy.cpp
- Revision:
- 19:b2adc97f4700
- Parent:
- 18:94536dca963c
--- a/src/Whiffy.cpp Wed Oct 21 19:08:18 2015 +0000 +++ b/src/Whiffy.cpp Wed Oct 21 19:56:21 2015 +0000 @@ -5,7 +5,7 @@ Serial pc(USBTX, USBRX); pc.baud(115200); - pc.printf("\r\nReporter & WifiControl created\r\n"); + pc.printf("\r\nReporter & WifiControl created \r\n"); @@ -19,6 +19,19 @@ AnalogIn moder(p16); + bool mode; + if(moder > 0.5f) { + mode = true; + wait(2); + pc.printf("\n\rMode: AVERAGE\n\r"); + wait(2); + } else { + mode = false; + wait(2); + pc.printf("\r\nMode: CONNECTED\r\n"); + wait(2); + } + wait(2); pc.printf("\r\n\r\nCreating APVectorBuilder\r\n"); @@ -27,14 +40,7 @@ wait(2); while(true) { - bool mode; - if(moder > 0.5f) { - mode = true; - pc.printf("Mode: AVERAGE"); - } else { - mode = false; - pc.printf("Mode: CONNECTED"); - } + pc.printf("\r\nGetting AP list\r\n"); wait(2); string real(wifi.pollAP()); //Get list of APs @@ -47,6 +53,14 @@ reporter.update(APList, mode, "AndroidAP"); + + if(moder > 0.5f) { + mode = true; + pc.printf("Mode: AVERAGE"); + } else { + mode = false; + pc.printf("Mode: CONNECTED"); + } }