Skip to content

Commit

Permalink
Merge pull request #49 from shufps/fix-init-voltage
Browse files Browse the repository at this point in the history
use asicVoltage for initialization if it's higher than initVoltage
  • Loading branch information
shufps authored Jan 9, 2025
2 parents 0de81ab + ba95236 commit 031cfac
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions main/boards/nerdqaxeplus.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#include <math.h>

#include "nvs_flash.h"
#include "esp_log.h"

Expand Down Expand Up @@ -100,8 +102,9 @@ bool NerdQaxePlus::initAsics()
// init buck and enable output
TPS53647_init(m_numPhases, m_imax, m_ifault);

// set the init voltage
setVoltage(m_initVoltage ? m_initVoltage : m_asicVoltage);
// set the init voltage
// use the higher voltage for initialization
setVoltage(fmaxf(m_initVoltage, m_asicVoltage));

// wait 500ms
vTaskDelay(500 / portTICK_PERIOD_MS);
Expand Down

0 comments on commit 031cfac

Please sign in to comment.