Skip to content

Commit 93c3dcd

Browse files
committed
added code
Signed-off-by: Taraqur <[email protected]>
1 parent 52ae263 commit 93c3dcd

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
**/secrets.h
44
.DS_Store
55
.vs_code/
6-
.vscode/
6+
.vscode/
7+
rssi/

Beacon/BeaconDuck/BeaconDuck.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ void loop() {
9090
bool runSensor(void *) {
9191
bool result;
9292

93-
string statusMessage = String("QUACK QUACK QUACK QUACK");
93+
String statusMessage = String("QUACK QUACK QUACK QUACK");
9494
Serial.print("[MAMA] status data: ");
9595
Serial.println(statusMessage);
9696

97-
result = sendData(stringToByteVector(healthMessage), status);
97+
result = sendData(stringToByteVector(statusMessage), status);
9898
if (result) {
9999
Serial.println("[MAMA] runSensor ok.");
100100
} else {

Beacon/RepeaterDuck/RepeaterDuck.ino

+7-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const int INTERVAL_MS = 10000; // for sending the counter message
1010
#include <arduino-timer.h>
1111
#include <CDP.h>
1212
#include "FastLED.h"
13+
#include <DuckRadio.h>
1314

1415
// Setup for W2812 (LED)
1516
#define LED_TYPE WS2812
@@ -39,6 +40,7 @@ bool runGPS(void *);
3940

4041
// create a built-in mama duck
4142
MamaDuck duck;
43+
DuckRadio radio;
4244

4345
// create a timer with default settings
4446
auto timer = timer_create_default();
@@ -73,7 +75,6 @@ void setup() {
7375
Serial.println("[MAMA] Setup OK!");
7476
}
7577

76-
7778
std::vector<byte> stringToByteVector(const String& str) {
7879
std::vector<byte> byteVec;
7980
byteVec.reserve(str.length());
@@ -233,4 +234,9 @@ bool runGPS() {
233234
}
234235

235236
return true;
237+
}
238+
239+
void handleDuckData(std::vector<byte> packetBuffer) {
240+
Serial.println("[MAMA] got packet: " + stringToByteVector(packetBuffer.data(), packetBuffer.size()));
241+
processMessageFromDucks(packetBuffer);
236242
}

Beacon/RepeaterDuck/platformio.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ description = DuckLink CDP examples
4848
ARDUINOOTA
4949

5050
[env:local_cdp]
51-
lib_deps = C:\Users\Berna\OneDrive\Documents\Duck Code\ClusterDuck-Protocol ; local CDP library
51+
lib_deps = /Users/tqrahman/Documents/Arduino/libraries/ClusterDuck-Protocol ; local CDP library
5252

5353
[env:release_cdp]
5454
lib_deps =

0 commit comments

Comments
 (0)