Skip to content

Commit

Permalink
correct PowerLimiter Modul regarding DischargeCurrentLimitat handling
Browse files Browse the repository at this point in the history
	modified:   src/PowerLimiter.cpp
  • Loading branch information
skippermeister committed Sep 3, 2024
1 parent edf5080 commit eb9cc16
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
; https://docs.platformio.org/page/projectconf.html

[platformio]
;default_envs = my_very_special_board
default_envs = my_very_special_board
;default_envs = opendtufusionv2
default_envs = generic_esp32s3_16mb_psram_usb
;default_envs = generic_esp32s3_16mb_psram_usb
;default_envs = generic_esp32s3
;default_envs = generic_esp32_4mb_no_ota
extra_configs =
Expand Down
2 changes: 1 addition & 1 deletion src/PowerLimiter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ int32_t PowerLimiterClass::getSolarPower()

int32_t PowerLimiterClass::getBatteryDischargeLimit()
{
auto currentLimit = Battery.getStats()->getDischargeCurrentLimitation();
auto currentLimit = fabs(Battery.getStats()->getDischargeCurrentLimitation());

if (currentLimit == FLT_MAX) {
// the returned value is arbitrary, as long as it's
Expand Down

0 comments on commit eb9cc16

Please sign in to comment.