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
Core.cpp@11:676ea42afd56, 2017-02-07 (annotated)
- Committer:
- Bobymicjohn
- Date:
- Tue Feb 07 21:58:20 2017 +0000
- Revision:
- 11:676ea42afd56
- Child:
- 54:f1f5648dfacf
Finished Core, and Servo classes.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Bobymicjohn | 11:676ea42afd56 | 1 | #include "Core.h" |
Bobymicjohn | 11:676ea42afd56 | 2 | |
Bobymicjohn | 11:676ea42afd56 | 3 | #include "SWUSBServer.h" |
Bobymicjohn | 11:676ea42afd56 | 4 | |
Bobymicjohn | 11:676ea42afd56 | 5 | namespace SW |
Bobymicjohn | 11:676ea42afd56 | 6 | { |
Bobymicjohn | 11:676ea42afd56 | 7 | |
Bobymicjohn | 11:676ea42afd56 | 8 | Core::Core() : |
Bobymicjohn | 11:676ea42afd56 | 9 | m_usbServer(new USBServer) |
Bobymicjohn | 11:676ea42afd56 | 10 | { |
Bobymicjohn | 11:676ea42afd56 | 11 | |
Bobymicjohn | 11:676ea42afd56 | 12 | } |
Bobymicjohn | 11:676ea42afd56 | 13 | |
Bobymicjohn | 11:676ea42afd56 | 14 | Core::~Core() |
Bobymicjohn | 11:676ea42afd56 | 15 | { |
Bobymicjohn | 11:676ea42afd56 | 16 | delete m_usbServer; |
Bobymicjohn | 11:676ea42afd56 | 17 | } |
Bobymicjohn | 11:676ea42afd56 | 18 | |
Bobymicjohn | 11:676ea42afd56 | 19 | void Core::Update(float deltaTime) |
Bobymicjohn | 11:676ea42afd56 | 20 | { |
Bobymicjohn | 11:676ea42afd56 | 21 | m_usbServer->Update(deltaTime); |
Bobymicjohn | 11:676ea42afd56 | 22 | |
Bobymicjohn | 11:676ea42afd56 | 23 | } |
Bobymicjohn | 11:676ea42afd56 | 24 | |
Bobymicjohn | 11:676ea42afd56 | 25 | USBServer& Core::GetUSBServer() |
Bobymicjohn | 11:676ea42afd56 | 26 | { |
Bobymicjohn | 11:676ea42afd56 | 27 | return *m_usbServer; |
Bobymicjohn | 11:676ea42afd56 | 28 | } |
Bobymicjohn | 11:676ea42afd56 | 29 | |
Bobymicjohn | 11:676ea42afd56 | 30 | |
Bobymicjohn | 11:676ea42afd56 | 31 | } |