Add multi PDP getter and sim PCM/PDP multi arg functions (#2014)

This commit is contained in:
Thad House
2019-11-01 21:55:35 -07:00
committed by Peter Johnson
parent 931b8ceefd
commit 2ad15cae19
11 changed files with 174 additions and 6 deletions

View File

@@ -138,6 +138,16 @@ class PCMSim {
HALSIM_SetPCMCompressorCurrent(m_index, compressorCurrent);
}
uint8_t GetAllSolenoidOutputs() {
uint8_t ret = 0;
HALSIM_GetPCMAllSolenoids(m_index, &ret);
return ret;
}
void SetAllSolenoidOutputs(uint8_t outputs) {
HALSIM_SetPCMAllSolenoids(m_index, outputs);
}
void ResetData() { HALSIM_ResetPCMData(m_index); }
private:

View File

@@ -79,6 +79,14 @@ class PDPSim {
HALSIM_SetPDPCurrent(m_index, channel, current);
}
void GetAllCurrents(double* currents) {
HALSIM_GetPDPAllCurrents(m_index, currents);
}
void SetAllCurrents(const double* currents) {
HALSIM_SetPDPAllCurrents(m_index, currents);
}
void ResetData() { HALSIM_ResetPDPData(m_index); }
private: