Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabled usbPluggedIn function for Bolt as it doesn't work. #82

Merged
merged 1 commit into from
Dec 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions src/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,11 @@ uint8_t getPowerStatusFlags() {
powerFlags.usbPluggedIn = !pGood; // Active LOW
powerFlags.canCharge = 1; //
} else {
// Bolt doesn't have a battery charger, but a DC-DC converter that sets the
// pGood signal instead. pGood thus means that the output power from the DC regulator is good.
// We don't technically know if we're connected to USB, only if we are connected
// to the battery or not. So if we're NOT connected to the battery, we're probably connected to USB.
powerFlags.usbPluggedIn = !pGood; // No battery? Must be USB
// Bolt doesn't have a battery charger and the nRF can't detect if
// USB is pluggged in.
powerFlags.usbPluggedIn = 0; // We don't know
powerFlags.isCharging = 0; // Not used
powerFlags.canCharge = 0; // No charger on bolt

// Also note: If we power bolt with Battery, then plug in USB, then unplug battery, the pGood value
// will remain the same! Thus we cannot notice WHEN we plug into USB.
}

return *( (uint8_t*) &powerFlags );
Expand Down