Commit d51564f
fix: add sensor type parameter to 'sensor define' command
Extended syntax: sensor define <gpio> <rom> <type> <hwId> <friendlyName>
type = ds18b20 | dht22 | bme280 (case-insensitive)
Legacy syntax (4 tokens) still works — auto-detects type from ROM:
sensor define <gpio> <rom> <hwId> <friendlyName>
Also sets sensorType in SensorRecord explicitly instead of relying
solely on the initRuntimeSensors() legacy fallback.
Added strVal3[32] + setStrVal3() to CliDemand for the type name.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 32aa76d commit d51564f
2 files changed
Lines changed: 16 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
393 | 393 | | |
394 | 394 | | |
395 | 395 | | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
396 | 408 | | |
397 | 409 | | |
398 | 410 | | |
| |||
562 | 574 | | |
563 | 575 | | |
564 | 576 | | |
565 | | - | |
| 577 | + | |
566 | 578 | | |
567 | 579 | | |
568 | 580 | | |
569 | 581 | | |
570 | 582 | | |
571 | 583 | | |
572 | | - | |
| 584 | + | |
573 | 585 | | |
574 | 586 | | |
575 | 587 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
| |||
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
| 108 | + | |
107 | 109 | | |
0 commit comments