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.
Dependencies: mbed mbed-rtos Motor LSM9DS1_Library_cal X_NUCLEO_53L0A1
main.cpp@9:552805fac195, 2019-04-23 (annotated)
- Committer:
- abh15
- Date:
- Tue Apr 23 18:13:07 2019 +0000
- Revision:
- 9:552805fac195
- Parent:
- 8:bfa4bf23522c
- Child:
- 10:8f4183d640d8
Fixes to transmit/receive functions in DataDistributor; changed global arrays to int instead of float
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
abh15 | 6:c119cc5d48d6 | 1 | #include "globals.h" |
rpatelpj | 3:1dce1ba5b8bd | 2 | #include "DataDistributor.h" |
rpatelpj | 3:1dce1ba5b8bd | 3 | #include "RobotController.h" |
rpatelpj | 0:66b7ea9af0dc | 4 | |
abh15 | 6:c119cc5d48d6 | 5 | Serial pc(USBTX, USBRX); |
rpatelpj | 8:bfa4bf23522c | 6 | BusOut led(LED1, LED2, LED3, LED4); |
rpatelpj | 8:bfa4bf23522c | 7 | DigitalIn pb(p23); |
rpatelpj | 8:bfa4bf23522c | 8 | |
abh15 | 9:552805fac195 | 9 | //changed float to int due to serial restrictions |
abh15 | 9:552805fac195 | 10 | int* obstacles = new int[360]; |
rpatelpj | 8:bfa4bf23522c | 11 | int trajectoryLength = 0; |
abh15 | 9:552805fac195 | 12 | int* trajectory = new int[0]; |
rpatelpj | 0:66b7ea9af0dc | 13 | |
rpatelpj | 0:66b7ea9af0dc | 14 | int main() { |
rpatelpj | 8:bfa4bf23522c | 15 | delete []trajectory; |
rpatelpj | 5:77c6821ae418 | 16 | DataDistributor dataDistributor; |
rpatelpj | 8:bfa4bf23522c | 17 | RobotController robotController(p21, p15, p16, p22, p18, p19, p13, p14); |
rpatelpj | 3:1dce1ba5b8bd | 18 | |
abh15 | 9:552805fac195 | 19 | //while(1) { |
abh15 | 9:552805fac195 | 20 | //robotController.detectObstacles(); |
abh15 | 9:552805fac195 | 21 | //dataDistributor.transmitObstacles(); |
rpatelpj | 8:bfa4bf23522c | 22 | dataDistributor.receiveTrajectory(); |
abh15 | 9:552805fac195 | 23 | //robotController.followTrajectory(); |
abh15 | 9:552805fac195 | 24 | //} |
rpatelpj | 0:66b7ea9af0dc | 25 | } |