[hal] Report previous allocation location for indexed resource duplicates (#3322)

This commit is contained in:
Thad House
2021-05-01 10:28:30 -07:00
committed by GitHub
parent e338f9f190
commit 23d2326d1d
54 changed files with 573 additions and 251 deletions

View File

@@ -10,6 +10,7 @@
#include <hal/HALBase.h>
#include <hal/PWM.h>
#include <hal/Ports.h>
#include <wpi/StackTrace.h>
#include "frc/Errors.h"
#include "frc/SensorUtil.h"
@@ -26,8 +27,10 @@ PWM::PWM(int channel, bool registerSendable) {
return;
}
auto stack = wpi::GetStackTrace(1);
int32_t status = 0;
m_handle = HAL_InitializePWMPort(HAL_GetPort(channel), &status);
m_handle =
HAL_InitializePWMPort(HAL_GetPort(channel), stack.c_str(), &status);
FRC_CheckErrorStatus(status, "PWM Channel " + wpi::Twine{channel});
m_channel = channel;