diff --git a/main_fw/src/main.c b/main_fw/src/main.c index 1b00ea0c6bff0bf745248a51c6267af15f2b0650..d433c797ee592d1af55fbf5c1955cae0640c7e8d 100644 --- a/main_fw/src/main.c +++ b/main_fw/src/main.c @@ -85,7 +85,7 @@ uint16_t temp_control_on __xMR = 0; // Voltages: P12V, P1V2, P3V3, PPERIPH const float volt_scaling_coeff[4] = {(10.0+2.0)/2.0, 1.0/(1.0+(1.0/1.0)), (4.7+10.0)/10.0, (4.7+2.0)/2.0}; // Current: P12V -const float curr_scaling_coeff[3] = {1000.0*(1.0/10.0)/0.05, 0, 0}; +const float curr_scaling_coeff[3] = {(1.0/10.0)/0.05, 0, 0}; // Temperatures: ambient, 2.5V LDO, FPGA const float temp_coeff_a[3] = {0, 0, 0}; const float temp_coeff_b[3] = {100.0/(1.0+10.0/10.0), 100.0/(1.0+10.0/10.0), 100.0/(1.0+10.0/10.0)}; @@ -100,7 +100,7 @@ const float temp_coeff_b[3] = {0, 0, 0}; // Voltages: P12V, P5V const float volt_scaling_coeff[3] = {(10.0+2.0)/2.0, (16.0+10.0)/10.0, 0.0}; // Currents: P12V, P5V -const float curr_scaling_coeff[3] = {1000.0*((16.0+10.0)/10.0), 1000.0*((16.0+10.0)/10.0), 0.0}; +const float curr_scaling_coeff[3] = {(16.0+10.0)/10.0, (16.0+10.0)/10.0, 0.0}; // Temperatures: ambient const float temp_coeff_a[3] = {0, 0, 0}; const float temp_coeff_b[3] = {100.0/(1.0+10.0/10.0), 0, 0}; @@ -109,7 +109,7 @@ const float temp_coeff_b[3] = {100.0/(1.0+10.0/10.0), 0, 0}; // Voltages: P12V, P5V, P5V const float volt_scaling_coeff[3] = {(10.0+2.0)/2.0, (18.0+10.0)/10.0, (10.0+10.0)/10.0}; // Currents: P12V, P5V, P5V -const float curr_scaling_coeff[3] = {1000.0*(1.0/10)/0.1, 1000.0*(1.0/10)/10.0, 1000*(1.0/10)/10.0}; +const float curr_scaling_coeff[3] = {(1.0/10.0)/0.1, (1.0/10.0)/10.0, (1.0/10.0)/10.0}; const float temp_coeff_a[3] = {0, -1e-3*100.0*19.0, -1e-3*100.0*19.0}; const float temp_coeff_b[3] = {100.0, 100.0/(1e-3*19.0*(138.5-100.0)), 100.0/(1e-3*19.0*(138.5-100.0))}; #else