[hal, wpilib] Remove analog output (#7696)

This commit is contained in:
Thad House
2025-01-16 23:20:44 -08:00
committed by GitHub
parent 5017393b3a
commit ff1b2a205e
45 changed files with 0 additions and 1685 deletions

View File

@@ -1,51 +0,0 @@
// Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include "hal/AnalogOutput.h"
#include <string>
#include "HALInitializer.h"
#include "HALInternal.h"
#include "PortsInternal.h"
#include "hal/Errors.h"
#include "hal/handles/HandlesInternal.h"
#include "hal/handles/IndexedHandleResource.h"
using namespace hal;
namespace hal::init {
void InitializeAnalogOutput() {}
} // namespace hal::init
extern "C" {
HAL_AnalogOutputHandle HAL_InitializeAnalogOutputPort(
HAL_PortHandle portHandle, const char* allocationLocation,
int32_t* status) {
hal::init::CheckInit();
*status = HAL_HANDLE_ERROR;
return HAL_kInvalidHandle;
}
HAL_Bool HAL_CheckAnalogOutputChannel(int32_t channel) {
return channel < kNumAnalogOutputs && channel >= 0;
}
void HAL_FreeAnalogOutputPort(HAL_AnalogOutputHandle analogOutputHandle) {}
void HAL_SetAnalogOutput(HAL_AnalogOutputHandle analogOutputHandle,
double voltage, int32_t* status) {
*status = HAL_HANDLE_ERROR;
return;
}
double HAL_GetAnalogOutput(HAL_AnalogOutputHandle analogOutputHandle,
int32_t* status) {
*status = HAL_HANDLE_ERROR;
return 0;
}
} // extern "C"

View File

@@ -53,7 +53,6 @@ void InitializeHAL() {
InitializeAnalogAccumulator();
InitializeAnalogGyro();
InitializeAnalogInput();
InitializeAnalogOutput();
InitializeAnalogTrigger();
InitializeCAN();
InitializeCANAPI();

View File

@@ -24,7 +24,6 @@ extern void InitializeAnalogAccumulator();
extern void InitializeAnalogGyro();
extern void InitializeAnalogInput();
extern void InitializeAnalogInternal();
extern void InitializeAnalogOutput();
extern void InitializeAnalogTrigger();
extern void InitializeCAN();
extern void InitializeCANAPI();

View File

@@ -23,9 +23,6 @@ int32_t HAL_GetNumAnalogTriggers(void) {
int32_t HAL_GetNumAnalogInputs(void) {
return kNumAnalogInputs;
}
int32_t HAL_GetNumAnalogOutputs(void) {
return kNumAnalogOutputs;
}
int32_t HAL_GetNumCounters(void) {
return kNumCounters;
}

View File

@@ -1,22 +0,0 @@
// Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include "hal/simulation/AnalogOutData.h"
#include "hal/simulation/SimDataValue.h"
extern "C" {
void HALSIM_ResetAnalogOutData(int32_t index) {}
#define DEFINE_CAPI(TYPE, CAPINAME, RETURN) \
HAL_SIMDATAVALUE_STUB_CAPI(TYPE, HALSIM, AnalogOut##CAPINAME, RETURN)
DEFINE_CAPI(double, Voltage, 0)
DEFINE_CAPI(HAL_Bool, Initialized, false)
void HALSIM_RegisterAnalogOutAllCallbacks(int32_t index,
HAL_NotifyCallback callback,
void* param, HAL_Bool initialNotify) {
}
} // extern "C"