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.
Revision 5:8a9cb632e91b, committed 2021-03-25
- Comitter:
- khaiminhvn
- Date:
- Thu Mar 25 02:29:16 2021 +0000
- Parent:
- 4:4643a545bcf9
- Commit message:
- Minor changes
Changed in this revision
GUI.cpp | Show annotated file Show diff for this revision Revisions of this file |
GUI.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/GUI.cpp Thu Mar 25 01:17:19 2021 +0000 +++ b/GUI.cpp Thu Mar 25 02:29:16 2021 +0000 @@ -32,6 +32,12 @@ } } +bool GUI::isConnected(bool *flag){ + nsapi_connection_status_t ind = eth->get_connection_status(); + *flag = (ind == NSAPI_STATUS_DISCONNECTED) ? false : true; + return *flag; +} + bool GUI::receives(int *survivalSpeed, bool *activeTracking, bool *powerOn, float *sunAngle) { char recvSer[500];
--- a/GUI.h Thu Mar 25 01:17:19 2021 +0000 +++ b/GUI.h Thu Mar 25 02:29:16 2021 +0000 @@ -15,6 +15,7 @@ //Functions void refreshConnection(char *GUI_URL, bool* flag); bool receives(int *survivalSpeed, bool *activeTracking, bool *powerOn, float *sunAngle); //Read messages from GUI and reurns JSON to main + bool isConnected(bool *flag); //Check if there is connection void windSpeed(float windSpeed); //Send wind speed to the GUI void state(int mode); //Send state to GUI void survivalSpeed(int survivalSpeed); //Send new wind survival speedto GUI