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.
Diff: LaosMenu/LaosMenu.cpp
- Revision:
- 2:609dd3a73f33
- Parent:
- 1:f5ac63519541
--- a/LaosMenu/LaosMenu.cpp Wed Mar 05 06:14:02 2014 -0800 +++ b/LaosMenu/LaosMenu.cpp Sat Mar 08 17:55:59 2014 -0800 @@ -184,6 +184,7 @@ int xt, yt, zt, cnt=0, nodisplay = 0; extern LaosFileSystem sd; extern LaosMotion *mot; + extern GlobalConfig *cfg; static int count=0; int c = dsp->read(); @@ -334,6 +335,11 @@ break; case IP: // IP + int myip[4], mynm[4], mygw[4], mydns[4]; + IpParse(cfg->ip, myip); + IpParse(cfg->nm, mynm); + IpParse(cfg->gw, mygw); + IpParse(cfg->dns, mydns); switch ( c ) { case K_RIGHT: ipfield++; waitup=1; break; case K_LEFT: ipfield--; waitup=1; break; @@ -343,11 +349,11 @@ ipfield %= 4; sarg = (char*)ipfields[ipfield]; switch (ipfield) { - case 0: memcpy(args, cfg->ip, 4*sizeof(int) ); break; - case 1: memcpy(args, cfg->nm, 4*sizeof(int) ); break; - case 2: memcpy(args, cfg->gw, 4*sizeof(int) ); break; - case 3: memcpy(args, cfg->dns, 4*sizeof(int) ); break; - default: memset(args,0,4*sizeof(int)); break; + case 0: memcpy(args, myip, 4*sizeof(int) ); break; + case 1: memcpy(args, mynm, 4*sizeof(int) ); break; + case 2: memcpy(args, mygw, 4*sizeof(int) ); break; + case 3: memcpy(args, mydns, 4*sizeof(int) ); break; + default: memset(args, 0, 4*sizeof(int)); break; } break;