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: DW1000 ait_link BufferedSerial mbed
settings.h@2:5af0f0006f40, 2016-02-13 (annotated)
- Committer:
- bhepp
- Date:
- Sat Feb 13 17:11:04 2016 +0000
- Revision:
- 2:5af0f0006f40
- Parent:
- 1:c070ca30da80
- Child:
- 4:1a2c1e5e5516
Added mavlink status messages and fixed use of buffered serial port
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| bhepp | 0:6d63b6992cbf | 1 | #pragma once |
| bhepp | 0:6d63b6992cbf | 2 | |
| bhepp | 1:c070ca30da80 | 3 | #include "DW1000Utils.h" |
| bhepp | 2:5af0f0006f40 | 4 | #include "BufferedSerial.h" |
| bhepp | 2:5af0f0006f40 | 5 | |
| bhepp | 2:5af0f0006f40 | 6 | extern BufferedSerial pc; |
| bhepp | 1:c070ca30da80 | 7 | |
| bhepp | 0:6d63b6992cbf | 8 | // Global settings |
| bhepp | 0:6d63b6992cbf | 9 | |
| bhepp | 1:c070ca30da80 | 10 | const DW1000Utils::PrfSetting PRF_SETTING = DW1000Utils::PRF_16_MHz; |
| bhepp | 1:c070ca30da80 | 11 | |
| bhepp | 2:5af0f0006f40 | 12 | //const DW1000Utils::DataRateSetting DATA_RATE_SETTING = DW1000Utils::RATE_110_kbps; |
| bhepp | 1:c070ca30da80 | 13 | //const uint32_t PREAMBLE_SETTING = DW1000Utils::PREAMBLE_LENGTH_256; |
| bhepp | 2:5af0f0006f40 | 14 | //#define ANSWER_DELAY_US_OVERWRITE 1500 |
| bhepp | 2:5af0f0006f40 | 15 | |
| bhepp | 2:5af0f0006f40 | 16 | //const DW1000Utils::DataRateSetting DATA_RATE_SETTING = DW1000Utils::RATE_110_kbps; |
| bhepp | 1:c070ca30da80 | 17 | //const uint32_t PREAMBLE_SETTING = DW1000Utils::PREAMBLE_LENGTH_512; |
| bhepp | 2:5af0f0006f40 | 18 | //#define ANSWER_DELAY_US_OVERWRITE 2000 |
| bhepp | 2:5af0f0006f40 | 19 | |
| bhepp | 2:5af0f0006f40 | 20 | const DW1000Utils::DataRateSetting DATA_RATE_SETTING = DW1000Utils::RATE_110_kbps; |
| bhepp | 1:c070ca30da80 | 21 | const uint32_t PREAMBLE_SETTING = DW1000Utils::PREAMBLE_LENGTH_1024; |
| bhepp | 2:5af0f0006f40 | 22 | #define ANSWER_DELAY_US_OVERWRITE 2500 |
| bhepp | 1:c070ca30da80 | 23 | |
| bhepp | 0:6d63b6992cbf | 24 | //#undef _DEBUG |
| bhepp | 1:c070ca30da80 | 25 | #define _DEBUG 0 |
| bhepp | 1:c070ca30da80 | 26 | #define PRINT_ERRORS 0 |
| bhepp | 0:6d63b6992cbf | 27 | #define SLAVE_REPLY_WITH_STATS 0 |
| bhepp | 1:c070ca30da80 | 28 | #define BUILD_SLAVE 0 |
| bhepp | 0:6d63b6992cbf | 29 | |
| bhepp | 0:6d63b6992cbf | 30 | #if _DEBUG |
| bhepp | 0:6d63b6992cbf | 31 | #ifndef _DEBUG_PC_DEFINED |
| bhepp | 0:6d63b6992cbf | 32 | #define _DEBUG_PC_DEFINED |
| bhepp | 2:5af0f0006f40 | 33 | #define _pc_debug pc |
| bhepp | 0:6d63b6992cbf | 34 | #endif |
| bhepp | 2:5af0f0006f40 | 35 | #define DEBUG_PRINTF(x_) _pc_debug.printf((x_)) |
| bhepp | 2:5af0f0006f40 | 36 | #define DEBUG_PRINTF_VA(x_, ...) _pc_debug.printf((x_), __VA_ARGS__) |
| bhepp | 0:6d63b6992cbf | 37 | #else |
| bhepp | 0:6d63b6992cbf | 38 | #define DEBUG_PRINTF(x_) |
| bhepp | 0:6d63b6992cbf | 39 | #define DEBUG_PRINTF_VA(x_, ...) |
| bhepp | 0:6d63b6992cbf | 40 | #endif |
| bhepp | 0:6d63b6992cbf | 41 | |
| bhepp | 0:6d63b6992cbf | 42 | #if PRINT_ERRORS |
| bhepp | 0:6d63b6992cbf | 43 | #ifndef _ERROR_PC_DEFINED |
| bhepp | 0:6d63b6992cbf | 44 | #define _ERROR_PC_DEFINED |
| bhepp | 2:5af0f0006f40 | 45 | #define _pc_error pc |
| bhepp | 0:6d63b6992cbf | 46 | #endif |
| bhepp | 2:5af0f0006f40 | 47 | #define ERROR_PRINTF(x_) _pc_error.printf((x_)) |
| bhepp | 2:5af0f0006f40 | 48 | #define ERROR_PRINTF_VA(x_, ...) _pc_error.printf((x_), __VA_ARGS__) |
| bhepp | 0:6d63b6992cbf | 49 | #else |
| bhepp | 0:6d63b6992cbf | 50 | #define ERROR_PRINTF(x_) |
| bhepp | 0:6d63b6992cbf | 51 | #define ERROR_PRINTF_VA(x_, ...) |
| bhepp | 0:6d63b6992cbf | 52 | #endif |