Update main.c

pull/10/head
alanbjohnston 7 years ago committed by GitHub
parent f6a0888126
commit f720278ce4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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,6 +460,26 @@ 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);

Loading…
Cancel
Save

Powered by TurnKey Linux.