Skip to content

Commit a5b888b

Browse files
authored
Merge pull request #352 from marios-stam/master
Step by Step Swarm Guide
2 parents 8b6f740 + a984e62 commit a5b888b

File tree

10 files changed

+643
-14
lines changed

10 files changed

+643
-14
lines changed

cflib/bootloader/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def flash(self, filename: str, targets: List[Target], cf=None):
144144
content = open(filename, 'br').read()
145145
artifacts = [FlashArtifact(content, targets[0])]
146146
else:
147-
raise(Exception('Cannot flash a .bin to more than one target!'))
147+
raise (Exception('Cannot flash a .bin to more than one target!'))
148148

149149
# Separate artifacts for flash and decks
150150
flash_artifacts = [a for a in artifacts if a.target.platform == platform]

cflib/cpx/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def transport(self):
134134
return self._transport
135135

136136
def run(self):
137-
while(self._connected):
137+
while (self._connected):
138138
# Read one packet from the transport
139139

140140
# Packages might have been split up along the

cflib/crtp/radiodriver.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def set_data_rate(self, dr):
105105
self._datarate = dr
106106

107107
def send_packet(self, data: List[int]) -> crazyradio._radio_ack:
108-
assert(self._opened)
108+
assert (self._opened)
109109
self._cmd_queue.put((self._instance_id,
110110
_RadioCommands.SEND_PACKET,
111111
(self._channel,
@@ -116,29 +116,29 @@ def send_packet(self, data: List[int]) -> crazyradio._radio_ack:
116116
return ack
117117

118118
def set_arc(self, arc):
119-
assert(self._opened)
119+
assert (self._opened)
120120
self._cmd_queue.put((self._instance_id,
121121
_RadioCommands.SET_ARC,
122122
arc))
123123

124124
def scan_selected(self, selected, packet):
125-
assert(self._opened)
125+
assert (self._opened)
126126
self._cmd_queue.put((self._instance_id,
127127
_RadioCommands.SCAN_SELECTED,
128128
(self._datarate, self._address,
129129
selected, packet)))
130130
return self._rsp_queue.get()
131131

132132
def scan_channels(self, start: int, stop: int, packet: Iterable[int]):
133-
assert(self._opened)
133+
assert (self._opened)
134134
self._cmd_queue.put((self._instance_id,
135135
_RadioCommands.SCAN_CHANNELS,
136136
(self._datarate, self._address,
137137
start, stop, packet)))
138138
return self._rsp_queue.get()
139139

140140
def close(self):
141-
assert(self._opened)
141+
assert (self._opened)
142142
self._cmd_queue.put((self._instance_id, _RadioCommands.STOP, None))
143143
self._opened = False
144144

cflib/localization/_ippe.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ def mat_run(U, Q, hEstMethod='DLT'):
5858
print('hEstMethod Error')
5959

6060
# Inputs shape checking
61-
assert(U.shape[0] == 2 or U.shape[0] == 3)
62-
assert(U.shape[1] == Q.shape[1])
63-
assert(Q.shape[0] == 2)
61+
assert (U.shape[0] == 2 or U.shape[0] == 3)
62+
assert (U.shape[1] == Q.shape[1])
63+
assert (Q.shape[0] == 2)
6464

6565
n = U.shape[1]
6666
modelDims = U.shape[0]

0 commit comments

Comments
 (0)