AC_AutoTune: use new new macro

Co-authored-by: Peter Hall <33176108+IamPete1@users.noreply.github.com>
This commit is contained in:
Bill Geyer 2024-06-16 07:21:53 -04:00
parent b03203c612
commit 41ed4d1321
2 changed files with 4 additions and 4 deletions

View File

@ -306,8 +306,8 @@ void AC_AutoTune_FreqResp::set_dwell_cycles(uint8_t cycles)
{
dwell_cycles = cycles;
if (meas_peak_info_buffer != nullptr) { delete meas_peak_info_buffer;}
meas_peak_info_buffer = new ObjectBuffer<peak_info>(cycles);
meas_peak_info_buffer = NEW_NOTHROW ObjectBuffer<peak_info>(cycles);
if (tgt_peak_info_buffer != nullptr) { delete tgt_peak_info_buffer;}
tgt_peak_info_buffer = new ObjectBuffer<peak_info>(cycles);
tgt_peak_info_buffer = NEW_NOTHROW ObjectBuffer<peak_info>(cycles);
}

View File

@ -12,8 +12,8 @@ public:
AC_AutoTune_FreqResp()
{
dwell_cycles = 6;
meas_peak_info_buffer = new ObjectBuffer<peak_info>(dwell_cycles);
tgt_peak_info_buffer = new ObjectBuffer<peak_info>(dwell_cycles);
meas_peak_info_buffer = NEW_NOTHROW ObjectBuffer<peak_info>(dwell_cycles);
tgt_peak_info_buffer = NEW_NOTHROW ObjectBuffer<peak_info>(dwell_cycles);
}
// Enumeration of input type