Fixed bad initialization of PDP.

Change-Id: I4603c7d51cfb8962d012aff0b6a1dac2e7525e40
This commit is contained in:
James Kuszmaul
2015-06-29 12:40:24 -04:00
parent 2c392d1813
commit 35ccbb9c90
2 changed files with 16 additions and 17 deletions

View File

@@ -4,7 +4,7 @@
static const int NUM_MODULE_NUMBERS = 63;
PDP *pdp[NUM_MODULE_NUMBERS] = { NULL };
static PDP *pdp[NUM_MODULE_NUMBERS] = { NULL };
void initializePDP(int module) {
if(!pdp[module]) {
@@ -14,49 +14,49 @@ void initializePDP(int module) {
double getPDPTemperature(int32_t *status, uint8_t module) {
double temperature;
*status = pdp[module]->GetTemperature(temperature);
return temperature;
}
double getPDPVoltage(int32_t *status, uint8_t module) {
double voltage;
*status = pdp[module]->GetVoltage(voltage);
return voltage;
}
double getPDPChannelCurrent(uint8_t channel, int32_t *status, uint8_t module) {
double current;
*status = pdp[module]->GetChannelCurrent(channel, current);
return current;
}
double getPDPTotalCurrent(int32_t *status, uint8_t module) {
double current;
*status = pdp[module]->GetTotalCurrent(current);
return current;
}
double getPDPTotalPower(int32_t *status, uint8_t module) {
double power;
*status = pdp[module]->GetTotalPower(power);
return power;
}
double getPDPTotalEnergy(int32_t *status, uint8_t module) {
double energy;
*status = pdp[module]->GetTotalEnergy(energy);
return energy;
}