Skip to content
Open
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions src/saic_ismart_client/ota_v3_0/data_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ def get_current(self) -> float:
def get_voltage(self) -> float:
return self.bmsPackVol * 0.25

def is_battery_heating(self) -> bool:
return self.bmsPTCHeatReqDspCmd == 1

def get_power(self) -> float:
return self.get_current() * self.get_voltage() / 1000.0

Expand Down
2 changes: 1 addition & 1 deletion src/saic_ismart_client/saic_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ def get_charging_status_with_retry(self, vin_info: VinInfo) -> MessageV30:

def control_battery_heating(self, enable: bool, vin_info: VinInfo, event_id: str = None) -> MessageV30:
chrg_heat_req = OtaChrgHeatReq()
chrg_heat_req.ptcHeatReq = bool_to_int(enable)
chrg_heat_req.ptcHeatReq = 1 if enable else 2
chrg_heat_req_msg = MessageV30(MessageBodyV30(), chrg_heat_req)
application_id = '516'
application_data_protocol_version = 768
Expand Down