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
Diff: main_slave.cpp
- Revision:
- 4:1a2c1e5e5516
- Parent:
- 1:c070ca30da80
- Child:
- 5:1928eb8c417a
diff -r 56db2114ba53 -r 1a2c1e5e5516 main_slave.cpp
--- a/main_slave.cpp Sat Feb 13 17:13:27 2016 +0000
+++ b/main_slave.cpp Tue Mar 29 10:00:43 2016 +0000
@@ -7,17 +7,14 @@
#include <DW1000Utils.h>
#include <mavlink_bridge/mavlink_bridge.h>
-#include "PC.h"
+#include "BufferedSerial.h"
#include "UWBSlave.h"
using ait::UWBSlave;
-using ait::MAVLinkBridge;
-using ait::UART_Mbed;
-
const int SPI_FREQUENCY = 1000000;
-const int SLAVE_ADDRESS = 10;
+const int SLAVE_ADDRESS = 20;
const bool USE_NLOS_SETTINGS = true;
@@ -28,13 +25,10 @@
const PinName DW_IRQ_PIN = D14;
const PinName DW_CS_PIN = D10;
-PC pc(USBTX, USBRX, 115200); // USB UART Terminal
+BufferedSerial pc(USBTX, USBRX, 115200, 8 * 1024); // USB UART Terminal
int main()
{
- UART_Mbed uart(USBTX, USBRX, 115200);
- MAVLinkBridge mb(&uart);
-
pc.printf("==== AIT UWB Multi Range Slave ====\r\n");
SPI spi(DW_MOSI_PIN, DW_MISO_PIN, DW_SCLK_PIN);