svoe

Dependencies:   mbed mbed-STM32F103C8T6 MPU6050_1

Committer:
Stas285
Date:
Sat May 06 19:27:01 2017 +0000
Revision:
2:f170902b3a15
Parent:
1:e2a6e523bf1f
Child:
3:8e8458f45d19
wifi + echo + rc

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Stas285 1:e2a6e523bf1f 1 void command_process(){
Stas285 1:e2a6e523bf1f 2 char tm_command = wifi.getc();
Stas285 1:e2a6e523bf1f 3 if (tm_command == 255) stop_flag = 1;
Stas285 1:e2a6e523bf1f 4 else{
Stas285 1:e2a6e523bf1f 5 if (tm_command < 128){speed = tm_command - 20;}
Stas285 2:f170902b3a15 6 else {if ((tm_command - 128 - 20) == 0)radius = 1e5; else radius = 100/(tm_command - 128 - 20);}
Stas285 1:e2a6e523bf1f 7 stop_flag = 0; infinite_flag = 1;
Stas285 1:e2a6e523bf1f 8 }
Stas285 1:e2a6e523bf1f 9 }
Stas285 1:e2a6e523bf1f 10
Stas285 0:e9488589a8ee 11 void wifi_init(){
Stas285 1:e2a6e523bf1f 12 wifi.attach(&command_process);
Stas285 1:e2a6e523bf1f 13 }