mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-01 02:41:48 +00:00
Removed modules from the HAL and JNI bindings
Modules aren't used anymore in wpilibc and wpilibj, so the hal functions that references them and and JNI bindings for these functions have been pulled out. Both Counter classes were also modified because they still referenced modules. Change-Id: Ic01feb145a4ed5f08cd55f140867c721f5ee7b10
This commit is contained in:
@@ -185,40 +185,6 @@ float getAnalogSampleRate(int32_t *status) {
|
||||
return (float)kTimebase / (float)ticksPerSample;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the sample rate on the module.
|
||||
*
|
||||
* This is a global setting for the module and effects all channels.
|
||||
*
|
||||
* @param module The module to use
|
||||
* @param samplesPerSecond The number of samples per channel per second.
|
||||
*/
|
||||
void setAnalogSampleRateWithModule(uint8_t module, double samplesPerSecond, int32_t *status) {
|
||||
if (checkAnalogModule(module)) {
|
||||
setAnalogSampleRate(samplesPerSecond, status);
|
||||
} else {
|
||||
// XXX: Set error status
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current sample rate on the module.
|
||||
*
|
||||
* This assumes one entry in the scan list.
|
||||
* This is a global setting for the module and effects all channels.
|
||||
*
|
||||
* @param module The module to use
|
||||
* @return Sample rate.
|
||||
*/
|
||||
float getAnalogSampleRateWithModule(uint8_t module, int32_t *status) {
|
||||
if (checkAnalogModule(module)) {
|
||||
return getAnalogSampleRate(status);
|
||||
} else {
|
||||
return -1; // XXX: Set error status
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the number of averaging bits.
|
||||
*
|
||||
@@ -736,10 +702,6 @@ int getAnalogSampleRateIntHack(int32_t *status) {
|
||||
return floatToInt(getAnalogSampleRate(status));
|
||||
}
|
||||
|
||||
int getAnalogSampleRateWithModuleIntHack(uint8_t module, int32_t *status) {
|
||||
return floatToInt(getAnalogSampleRateWithModuleIntHack(module, status));
|
||||
}
|
||||
|
||||
int getAnalogVoltageIntHack(void* analog_port_pointer, int32_t *status) {
|
||||
return floatToInt(getAnalogVoltage(analog_port_pointer, status));
|
||||
}
|
||||
@@ -754,10 +716,6 @@ void setAnalogSampleRateIntHack(int samplesPerSecond, int32_t *status) {
|
||||
setAnalogSampleRate(intToFloat(samplesPerSecond), status);
|
||||
}
|
||||
|
||||
void setAnalogSampleRateWithModuleIntHack(uint8_t module, int samplesPerSecond, int32_t *status) {
|
||||
setAnalogSampleRateWithModule(module, intToFloat(samplesPerSecond), status);
|
||||
}
|
||||
|
||||
int32_t getAnalogVoltsToValueIntHack(void* analog_port_pointer, int voltage, int32_t *status) {
|
||||
return getAnalogVoltsToValue(analog_port_pointer, intToFloat(voltage), status);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user