Skip to content

Commit

Permalink
Merge pull request #5 from WantClue/main
Browse files Browse the repository at this point in the history
adding wattage before tps into account
  • Loading branch information
WantClue authored Aug 23, 2024
2 parents 7f6ecad + 11f34bf commit b909155
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main/tasks/power_management_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ void POWER_MANAGEMENT_task(void * pvParameters)
power_management->voltage = TPS546_get_vin() * 1000;
power_management->current = TPS546_get_iout() * 1000;

// calculate regulator power (in milliwatts)
power_management->power = (TPS546_get_vout() * power_management->current) / 1000;
// calculate regulator power (in milliwatts), added +12 W to count for the missing parts before TPS
power_management->power = ((TPS546_get_vout() * power_management->current) / 1000)+12;

break;
default:
Expand Down

0 comments on commit b909155

Please sign in to comment.