Commit 574f32e
[RSDK-5810] remove impossible-to-implement functions from digital interrupts (#503)
Within digital interrupts, the `value()` method will get the number of interrupts that have occurred. It's a good thing to have; we'll keep it. However,
- `add_callback()` cannot be implemented without changing the GPRC interface, which will require a scope doc, which will require planning how to do this right. Get rid of it for now: digital interrupts aren't really part of the API yet.
- `add_post_processor()` doesn't exist outside of raspberry pi boards; get rid of it.
- `tick()` is only used in tests (to simulate the interrupt firing). Keep it in `MockDigitalInterrupt`, but get rid of it in the "real" code.
So, how do you use digital interrupts outside of the RDK server? Unfortunately, you kinda can't, and have never been able to. You can repeatedly check its value and do something if you notice the value has changed, but a proper GRPC interface for digital interrupts doesn't currently exist. We shouldn't pretend that it does. It ought to come sometime in 2024.1 parent a87e436 commit 574f32e
File tree
5 files changed
+8
-89
lines changed- examples/server/v1
- src/viam/components/board
- tests
- mocks
5 files changed
+8
-89
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
| |||
241 | 240 | | |
242 | 241 | | |
243 | 242 | | |
244 | | - | |
245 | | - | |
246 | 243 | | |
247 | | - | |
248 | | - | |
249 | 244 | | |
250 | 245 | | |
251 | 246 | | |
252 | 247 | | |
253 | 248 | | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | 249 | | |
266 | 250 | | |
267 | 251 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
12 | | - | |
13 | | - | |
14 | 11 | | |
15 | 12 | | |
16 | 13 | | |
| |||
57 | 54 | | |
58 | 55 | | |
59 | 56 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | 57 | | |
96 | 58 | | |
97 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
| |||
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
34 | | - | |
35 | 33 | | |
36 | 34 | | |
37 | 35 | | |
| |||
59 | 57 | | |
60 | 58 | | |
61 | 59 | | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | 60 | | |
72 | 61 | | |
73 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
21 | | - | |
22 | 20 | | |
23 | 21 | | |
24 | 22 | | |
| |||
262 | 260 | | |
263 | 261 | | |
264 | 262 | | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | 263 | | |
269 | 264 | | |
270 | 265 | | |
271 | | - | |
272 | | - | |
273 | 266 | | |
274 | 267 | | |
275 | | - | |
| 268 | + | |
276 | 269 | | |
277 | 270 | | |
278 | 271 | | |
279 | 272 | | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | 273 | | |
287 | 274 | | |
288 | 275 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
178 | 181 | | |
179 | | - | |
180 | 182 | | |
181 | 183 | | |
182 | | - | |
183 | 184 | | |
184 | | - | |
| 185 | + | |
185 | 186 | | |
186 | | - | |
| 187 | + | |
187 | 188 | | |
188 | 189 | | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | 190 | | |
194 | 191 | | |
195 | 192 | | |
| |||
0 commit comments