SmartWheels self-driving race car. Designed for NXP Cup. Uses FRDM-KL25Z, area-scan camera, and simple image processing to detect and navigate any NXP spec track.
Dependencies: TSI USBDevice mbed-dev
Fork of SmartWheels by
Diff: StateMachine/StandbyState.cpp
- Branch:
- Drift
- Revision:
- 82:992ba6f31e24
- Parent:
- 80:c85cb93713b3
- Child:
- 86:51048c1f132f
diff -r 32bd7a25a699 -r 992ba6f31e24 StateMachine/StandbyState.cpp --- a/StateMachine/StandbyState.cpp Tue Apr 18 19:42:15 2017 +0000 +++ b/StateMachine/StandbyState.cpp Tue Apr 18 20:51:06 2017 +0000 @@ -1,14 +1,30 @@ #include "StandbyState.h" +#include "ArduUTFT.h" + +#include "StateManager.h" + StandbyState::StandbyState() {} StandbyState::~StandbyState() -{} +{ + ardu_utft_print("X", 10, 10); +} void StandbyState::DrawUserInterface() { + ardu_utft_clr_scr(); + ardu_utft_set_color(0, 0, 255); + ardu_utft_fill_rect(10, 10, 310, 110); + ardu_utft_set_color(255, 255, 255); + ardu_utft_print("Run", 170, 50); + + ardu_utft_set_color(255, 255, 0); + ardu_utft_fill_rect(10, 130, 310, 230); + ardu_utft_set_color(255, 255, 255); + ardu_utft_print("Test system", 200, 180); } void StandbyState::Update(float deltaTime) @@ -18,17 +34,26 @@ uint8_t StandbyState::HasTouchPosFunction() const { - return 0; + return 1; } uint8_t StandbyState::HasTouchIrqFunction() const { - return 1; + return 0; } void StandbyState::TouchPosCallback(int16_t x, int16_t y) { - + if(y <= 110) + { + ardu_utft_print("X", x, y); + state_manager_switch_state(RUNNING_STATE); + + } + else if(y >= 130) + { + + } } void StandbyState::TouchIrqCallback()