|
|
|
@ -132,19 +132,20 @@ func chargeStatus(m chat1.MsgSummary) {
@@ -132,19 +132,20 @@ func chargeStatus(m chat1.MsgSummary) {
|
|
|
|
|
ret := fmt.Sprintf("Status for %+v: ```", v.DisplayName) |
|
|
|
|
ret += fmt.Sprintf("\nCurrent Charge: %+v (%+vmi)", state.BatteryLevel, state.BatteryRange) |
|
|
|
|
if state.ChargingState != "Disconnected" { |
|
|
|
|
|
|
|
|
|
ret += fmt.Sprintf("\nCharging State: %+v", state.ChargingState) |
|
|
|
|
ret += fmt.Sprintf("\nTime to full: %+vmin", state.MinutesToFullCharge) |
|
|
|
|
ret += fmt.Sprintf("\nConnected Cable: %+v", state.ConnChargeCable) |
|
|
|
|
if state.FastChargerPresent { |
|
|
|
|
ret += fmt.Sprintf("\nFast Charger: %+v %+v", state.FastChargerBrand, state.FastChargerType) |
|
|
|
|
ret += fmt.Sprintf("\nCharging State: %+v", state.ChargingState) |
|
|
|
|
if state.ChargingState != "Stopped" { |
|
|
|
|
ret += fmt.Sprintf("\nTime to full: %+vmin", state.MinutesToFullCharge) |
|
|
|
|
if state.FastChargerPresent { |
|
|
|
|
ret += fmt.Sprintf("\nFast Charger: %+v %+v", state.FastChargerBrand, state.FastChargerType) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
ret += "```\n" |
|
|
|
|
if state.BatteryHeaterOn { |
|
|
|
|
ret += "The battery heater is on. " |
|
|
|
|
} |
|
|
|
|
if state.ChargePortDoorOpen { |
|
|
|
|
if state.ChargePortDoorOpen && state.ChargingState == "Disconnected" { |
|
|
|
|
ret += "The charge port is open. " |
|
|
|
|
} |
|
|
|
|
k.SendMessageByConvID(m.ConvID, ret) |
|
|
|
|