|
|
|
@ -440,7 +440,7 @@ int get_tlm(int tlm[][5]) {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
int count;
|
|
|
|
int count;
|
|
|
|
for (count = 0; count < 8; count++)
|
|
|
|
for (count = 0; count < 7; count++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (sensor[count] != OFF)
|
|
|
|
if (sensor[count] != OFF)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -460,7 +460,27 @@ int get_tlm(int tlm[][5]) {
|
|
|
|
printf(" sensor[%d] voltsBus %4.2f voltsShunt %4.2f current %4.2f power %4.2f \n",
|
|
|
|
printf(" sensor[%d] voltsBus %4.2f voltsShunt %4.2f current %4.2f power %4.2f \n",
|
|
|
|
count, voltsBus[count], voltsShunt[count], current[count], power[count]);
|
|
|
|
count, voltsBus[count], voltsShunt[count], current[count], power[count]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (sensor[count] != OFF) // count = 7 MoPower V2 INA219
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
setCalibration_16V_400mA(sensor[count]);
|
|
|
|
|
|
|
|
voltsShunt[count] = getShuntVoltage_mV(sensor[count])/1000;
|
|
|
|
|
|
|
|
voltsBus[count] = getBusVoltage_V(sensor[count]);
|
|
|
|
|
|
|
|
current[count] = getCurrent_mA(sensor[count]) * 4;
|
|
|
|
|
|
|
|
power[count] = getPower_mW(sensor[count]) *2;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
voltsShunt[count] = 0;
|
|
|
|
|
|
|
|
voltsBus[count] = 0;
|
|
|
|
|
|
|
|
current[count] = 0;
|
|
|
|
|
|
|
|
power[count] = 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
printf(" sensor[%d] voltsBus %4.2f voltsShunt %4.2f current %4.2f power %4.2f \n",
|
|
|
|
|
|
|
|
count, voltsBus[count], voltsShunt[count], current[count], power[count]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// delay(500);
|
|
|
|
// delay(500);
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|