Commit 985b3d9
Move PybricksHub client creation into constructor
Moves client creation into the PybricksHub constructor. A
future change will move this into a subclass specific for
BLE or USB, so configuring this is more appropriately done
in the constructor instead of the connect method.
The disconnect logic is moved into a class method so that
it can be shared by both BLE and USB implementations.
Temporarily comments out a message that prints the device
name as this is no longer available in the connect method.
Signed-off-by: Nate Karstens <[email protected]>1 parent bae50f7 commit 985b3d9
3 files changed
+22
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | | - | |
187 | 186 | | |
| 187 | + | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
191 | 190 | | |
192 | 191 | | |
| 192 | + | |
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | | - | |
197 | 196 | | |
198 | 197 | | |
199 | 198 | | |
200 | 199 | | |
201 | | - | |
| 200 | + | |
202 | 201 | | |
203 | 202 | | |
204 | 203 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
21 | 24 | | |
22 | 25 | | |
23 | 26 | | |
24 | | - | |
| 27 | + | |
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
| |||
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
36 | | - | |
| 39 | + | |
37 | 40 | | |
38 | | - | |
| 41 | + | |
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
123 | 128 | | |
124 | 129 | | |
125 | 130 | | |
| |||
227 | 232 | | |
228 | 233 | | |
229 | 234 | | |
230 | | - | |
231 | | - | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
232 | 238 | | |
233 | | - | |
234 | | - | |
| 239 | + | |
| 240 | + | |
235 | 241 | | |
236 | 242 | | |
237 | 243 | | |
238 | 244 | | |
239 | 245 | | |
240 | 246 | | |
241 | | - | |
| 247 | + | |
| 248 | + | |
242 | 249 | | |
243 | 250 | | |
244 | 251 | | |
| |||
252 | 259 | | |
253 | 260 | | |
254 | 261 | | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | 262 | | |
262 | 263 | | |
263 | 264 | | |
| |||
0 commit comments