Skip to content

AP_Periph: Use battery SOC only when available - #32105

Open
lgarciaos wants to merge 3 commits into
ArduPilot:masterfrom
lgarciaos:apperiph-soc-flag
Open

AP_Periph: Use battery SOC only when available#32105
lgarciaos wants to merge 3 commits into
ArduPilot:masterfrom
lgarciaos:apperiph-soc-flag

Conversation

@lgarciaos

Copy link
Copy Markdown
Contributor

@peterbarker peterbarker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lgarciaos

Copy link
Copy Markdown
Contributor Author

Fixed typo

Comment thread libraries/AP_BattMonitor/AP_BattMonitor_DroneCAN.cpp
Comment on lines +129 to +130
_interim_state.state_of_charge_pct = msg.state_of_charge_pct;
_interim_state.has_state_of_charge_pct = true;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These don't seem to exist?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @IamPete1, I removed those lines and now I think it makes sense to me. SoC is already handled as it should.

Comment thread Tools/AP_Periph/battery.cpp Outdated
@peterbarker

Copy link
Copy Markdown
Contributor

@lgarciaos you have review comments to look at here.

Co-authored-by: Tom Pittenger <magicrub@users.noreply.github.com>
Comment thread Tools/AP_Periph/battery.cpp Outdated
Co-authored-by: Peter Hall <33176108+IamPete1@users.noreply.github.com>
}

uint8_t percentage = 0;
uint8_t percentage = UAVCAN_EQUIPMENT_POWER_BATTERYINFO_STATE_OF_CHARGE_UNKNOWN;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indenting fix required?

@IamPete1

Copy link
Copy Markdown
Member

Looks like this need the dsdl submodule updating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

4 participants