added missing #ifdef DEBUG_LOGGING around printfs

pull/17/head
alanbjohnston 7 years ago committed by GitHub
parent 09bc98a60a
commit 03261b9cfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -429,8 +429,11 @@ int get_tlm(int tlm[][5]) {
z_voltage = wiringPiI2CReadReg16(z_fd, INA219_REG_BUSVOLTAGE) / 1000;
z_power = wiringPiI2CReadReg16(z_fd, INA219_REG_POWER) * x_powerMultiplier;
}
#ifdef DEBUG_LOGGING
printf("-X %4.2f V %4.2fmA %4.2fmW -Y %4.2fV %4.2fmA %4.2fmW -Z %4.2fV %4.2fmA %4.2fmW \n",
x_voltage, x_current, x_power, y_voltage, y_current, y_power, z_voltage, z_current, z_power);
#endif
// end of master code
int count;
@ -438,7 +441,9 @@ int get_tlm(int tlm[][5]) {
{
if (sensor[count] != OFF)
{
#ifdef DEBUG_LOGGING
printf("Read sensor[%d] ", count);
#endif
setCalibration_16V_400mA(sensor[count]);
voltsShunt[count] = getShuntVoltage_mV(sensor[count])/1000;
voltsBus[count] = getBusVoltage_V(sensor[count]);
@ -459,7 +464,9 @@ int get_tlm(int tlm[][5]) {
}
if (sensor[BUS] != OFF) // For MoPower V2 INA219
{
printf("Reading of sensor[%d] ", BUS);
#ifdef DEBUG_LOGGING
printf("Read sensor[%d] ", BUS);
#endif
setCalibration_16V_2A(sensor[BUS]);
voltsShunt[BUS] = getShuntVoltage_mV(sensor[BUS])/1000;
voltsBus[BUS] = getBusVoltage_V(sensor[BUS]);

Loading…
Cancel
Save

Powered by TurnKey Linux.