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.
Node/Beacon/Beacon.cpp@0:99928431bb44, 2015-07-07 (annotated)
- Committer:
- millanea
- Date:
- Tue Jul 07 09:36:12 2015 +0000
- Revision:
- 0:99928431bb44
First commit. Committing the entire project such that it can be published.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| millanea | 0:99928431bb44 | 1 | #include "Beacon.h" |
| millanea | 0:99928431bb44 | 2 | |
| millanea | 0:99928431bb44 | 3 | Beacon::Beacon( MM2WayRanging& newRanging, DW1000& newDw ) : Node( newRanging, newDw ) |
| millanea | 0:99928431bb44 | 4 | { |
| millanea | 0:99928431bb44 | 5 | debugprintf("Beacon Initialized\r\n") ; |
| millanea | 0:99928431bb44 | 6 | } |
| millanea | 0:99928431bb44 | 7 | |
| millanea | 0:99928431bb44 | 8 | void Beacon::execute() |
| millanea | 0:99928431bb44 | 9 | { |
| millanea | 0:99928431bb44 | 10 | // Requesting ranging from node at address #1 TODO: 1 is hardcoded. |
| millanea | 0:99928431bb44 | 11 | ranging.requestRanging(1) ; |
| millanea | 0:99928431bb44 | 12 | // Printing received distance to serial |
| millanea | 0:99928431bb44 | 13 | debugprintf("%f\r\n", ranging.distances[1]) ; |
| millanea | 0:99928431bb44 | 14 | } |