fix power calculation

This commit is contained in:
macphyter 2024-02-11 23:05:03 -07:00 committed by Georges Palauqui
parent bd1bd73d0e
commit ef6a25102b
No known key found for this signature in database
GPG Key ID: 1E45F544CE4D04A5

View File

@ -294,7 +294,7 @@ void POWER_MANAGEMENT_HEX_task(void * pvParameters)
power_management->voltage = TPS546_get_vin() * 1000;
power_management->current = TPS546_get_iout();
power_management->current = TPS546_get_iout() * 1000;
// calculate regulator power (in milliwatts)
power_management->power = (TPS546_get_vout() * power_management->current) / 1000;