To my understanding, the first might be for charging battery energy using remaining solar panel power (energy), and the second is for drawing power from battery and using it. Just let me know if I got wrong way.
Anyway, it seems that for the second one, the current of avionics and payload should be considered as well just as we did in Battery_Propeller.py.
- battery.inputs.current = solar_logic.inputs.currentesc
+ avionics_payload_power = avionics.outputs.power + payload.outputs.power
+ avionics_payload_current = avionics_payload_power/self.voltage
+ battery.inputs.current = solar_logic.inputs.currentesc + avionics_payload_current