RPLIDAR A1M8 LCD
Dependencies: TS_DISCO_F746NG mbed BufferedSerial LCD_DISCO_F746NG mbed-rtos Trigo BSP_DISCO_F746NG
Diff: Main.cpp
- Revision:
- 6:b6efac82e5f9
- Parent:
- 5:734551a9f4e7
- Child:
- 8:7788cc96e8ad
--- a/Main.cpp Fri Nov 25 10:04:16 2016 +0000 +++ b/Main.cpp Fri Nov 25 10:43:19 2016 +0000 @@ -11,7 +11,7 @@ //Dichiarazione oggetti -//DigitalIn myStopButton(USER_BUTTON); +DigitalIn myStopButton(USER_BUTTON); Motor lid_Motor(PWM_OUT); Communication SendCommands; LCD_DISCO_F746NG lcd; @@ -21,16 +21,14 @@ //Dichiarazione variabili TS_StateTypeDef TS_State; -uint16_t x, y; +uint16_t x,y; uint8_t idx; uint8_t start=1; void StopLidar_thread(void const *args) { - TS_DISCO_F746NG ts_Thread; wait(1); while(true) { - ts_Thread.GetState(&TS_State); - if (TS_State.touchDetected) { + if (myStopButton==1) { SendCommands.Stop(); wait_ms(10); lid_Motor.StopMotor_Scan(); @@ -59,7 +57,6 @@ lcd.DisplayStringAt(0, LINE(2), (uint8_t *)"D. Ruggiero 2016", RIGHT_MODE); // Configure buttons and TFT display -// TS_StateTypeDef TS_State; lcd.SetTextColor(LCD_COLOR_GREEN); lcd.FillRect(136, 200, 200, 50); ///Disegna bottone Verde