Repository navigation
Commit 0ba4b93
fix(charger): don't follow planned Octopus dispatches while Smart Control is off (#5339)
Predbat-led charger control (#5448) starts the charger whenever a dispatch
on the car's dispatch sensor is running, reading the sensor's raw
planned_dispatches, or its on/off state when it lists no times. While
Octopus Smart Control is off the sensor goes on listing the plan Octopus
made before, which Predbat's own plan already ignores - so with the
charger driven (control: true, or charger_follows_car), the charger was
switched on for dispatches that will not happen, and a car with its own
timers charged at the normal rate.
charger_control_dispatch_active() now filters the planned dispatches
through the same smart_control_off_slots() the plan uses (bump/boost
kept), and does not fall back on the sensor's state, while the car's
Smart Control switch is off. The docs say so, and that a driven charger
follows the sensor's dispatch times as well as the plan.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 1d916cc commit 0ba4b93
3 files changed
Lines changed: 48 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
467 | 467 | | |
468 | 468 | | |
469 | 469 | | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
470 | 475 | | |
471 | 476 | | |
472 | 477 | | |
473 | 478 | | |
474 | 479 | | |
475 | 480 | | |
| 481 | + | |
476 | 482 | | |
477 | 483 | | |
478 | 484 | | |
479 | 485 | | |
| 486 | + | |
| 487 | + | |
480 | 488 | | |
481 | 489 | | |
482 | | - | |
| 490 | + | |
483 | 491 | | |
484 | 492 | | |
485 | 493 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
46 | 50 | | |
47 | 51 | | |
48 | 52 | | |
49 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
50 | 60 | | |
51 | 61 | | |
52 | 62 | | |
| |||
577 | 587 | | |
578 | 588 | | |
579 | 589 | | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
580 | 616 | | |
581 | 617 | | |
582 | 618 | | |
| |||
951 | 987 | | |
952 | 988 | | |
953 | 989 | | |
| 990 | + | |
954 | 991 | | |
955 | 992 | | |
956 | 993 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
609 | 609 | | |
610 | 610 | | |
611 | 611 | | |
| 612 | + | |
| 613 | + | |
612 | 614 | | |
613 | 615 | | |
614 | 616 | | |
| |||
0 commit comments