Skip to content

Commit 724df2d

Browse files
authored
fix megagenial (#177)
1 parent 883a7c9 commit 724df2d

File tree

4 files changed

+6
-13
lines changed

4 files changed

+6
-13
lines changed

Diff for: src/bittybuzz/buzz_scripts/behaviors/blinky.bzz

+3-10
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,20 @@
11
include "utils/executor.bzz"
22

33
ctx = {
4-
.led = 0,
5-
.hex = 0
4+
.led = 0
65
}
76

87
function tick(context){
9-
log("Led set to : ", context.led, " and hex set to :", context.hex);
8+
log("Led set to : ", context.led);
109
ui.set_led(context.led);
11-
ui.set_hex(context.hex);
10+
ui.set_hex(neighbors.count());
1211

1312
# led = !led
1413
if(context.led){
1514
context.led = nil;
1615
} else{
1716
context.led = 1;
1817
}
19-
20-
if(context.hex >= 15){
21-
context.hex = 0;
22-
} else {
23-
context.hex = context.hex + 1;
24-
}
2518
}
2619

2720
function create_exec(delay_ms){

Diff for: src/bittybuzz/buzz_scripts/behaviors/follow_leader.bzz

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function tick_follow_leader(stig){
1111
log("Trying to get leader: ", leader)
1212
leader_obj = neighbors.get(leader) # Global to be accessible in filter
1313
if (istable(leader_obj)){
14-
if(leader_obj.distance > 1.25){
14+
if(leader_obj.distance > 0.75){
1515
# Getting neighbors in LOS
1616
var obstructing_neighbors = neighbors.filter(function(rid, data){
1717
if(rid != leader and data.distance < 1){

Diff for: src/bsp/src/stm32/src/interloc/include/interloc/InterlocTimeManager.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#define RESPONSE_PROCESSING_GUARD 360U
1111
#define RESPONSE_PROCESSING_GUARD_GUARD 50U
1212
#define RESPONSE_TO_FINAL_GUARD 600U
13-
#define FINAL_PROCESSING_GUARD 2000U
13+
#define FINAL_PROCESSING_GUARD 5000U
1414
#define RX_BEFORE_TX_GUARD_US 10U
1515
#define TIMEOUT_GUARD_US 100U
1616
#define DEAD_TIME 200U

Diff for: src/bsp/src/stm32/src/interloc/src/InterlocTimeManager.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ uint64_t InterlocTimeManager::getPollTxStartTs(uint64_t startOfFrameTs) const {
234234

235235
uint32_t InterlocTimeManager::getSyncTimeoutUs() const {
236236
uint32_t slotToSlotOffsetUs = getFrameLengthUs();
237-
return slotToSlotOffsetUs * NUM_TWR_FRAMES + (m_bsp.generateRandomNumber() % 25) * 150;
237+
return slotToSlotOffsetUs * NUM_TWR_FRAMES + (m_bsp.generateRandomNumber() % 25) * 500;
238238
}
239239

240240
uint64_t InterlocTimeManager::getAngleTxStartTs(uint64_t startOfFrameTs, uint32_t angleId) const {

0 commit comments

Comments
 (0)