"Add capability to deactivate a battery" #1658

Merged
korina.cordero merged 6 commits from 733-add-capability-to-deactivate-a-battery into staging 2023-02-08 03:31:14 +00:00
Showing only changes of commit ab2d6be08e - Show all commits

View file

@ -43,14 +43,10 @@ class GenerateBatteryCompatibilityCommand extends Command
$vehicles = $vm->getVehicles();
foreach ($vehicles as $vehicle)
{
$batteries = $vehicle->getBatteries();
$batteries = $vehicle->getActiveBatteries();
$comp_batt = [];
foreach ($batteries as $battery)
{
// check if battery is active
if (!($battery->isActive()))
continue;
// set to the first compatible battery found until a more expensive one is found
$comp_batt['id'] = $battery->getID();
$comp_batt['name'] = $battery->getModel()->getName() . ' ' .