Commit d596014
committed
Error on missing middle reflectance sensor
Add a runtime check in Reflectance.get_middle that raises RuntimeError when the middle reflectance pin is not supported on the board. Update the docstring to document the raised error and clarify the return value (reflectance 0..1). This prevents calling _get_value with a None sensor and gives a clearer failure mode for unsupported hardware configurations.1 parent 89fa5b8 commit d596014
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
59 | 63 | | |
60 | 64 | | |
61 | 65 | | |
| |||
0 commit comments