mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-05 14:31:31 +00:00
Trigger lightbar pattern from charger task if necessary
If we have a lightbar, but no PD, then plugging the device in will not trigger the battery-level pattern. This allows us to trigger it from the charger task instead if we change AC status and don't have a PD. BRANCH=ToT BUG=None TEST=plug and unplug charger from device, make sure the lightbar plays the right pattern Change-Id: I8f37aaff2ddb9d936e13489cb404caee822418a1 Signed-off-by: Eric Caruso <ejcaruso@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/292943 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
This commit is contained in:
committed by
ChromeOS Commit Bot
parent
8ef87c157a
commit
f4ba3b2fa3
@@ -16,6 +16,7 @@
|
||||
#include "gpio.h"
|
||||
#include "hooks.h"
|
||||
#include "host_command.h"
|
||||
#include "lightbar.h"
|
||||
#include "math_util.h"
|
||||
#include "printf.h"
|
||||
#include "sb_fw_update.h"
|
||||
@@ -608,6 +609,9 @@ void charger_task(void)
|
||||
battery_seems_to_be_dead = 0;
|
||||
prev_ac = curr.ac;
|
||||
}
|
||||
#if defined(HAS_TASK_LIGHTBAR) && !defined(HAS_TASK_PDCMD)
|
||||
lightbar_sequence(LIGHTBAR_TAP);
|
||||
#endif
|
||||
}
|
||||
charger_get_params(&curr.chg);
|
||||
battery_get_params(&curr.batt);
|
||||
|
||||
Reference in New Issue
Block a user