mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2024-12-13 03:34:35 +00:00
Quoted unused vars and voided one
This commit is contained in:
parent
19ebf14e8c
commit
b7eb095dd8
@ -43,14 +43,15 @@ void WidebandFMAudio::execute(const buffer_c8_t& buffer) {
|
||||
const buffer_c16_t buffer_c16 {spectrum.data(),spectrum.size(),buffer.sampling_rate};
|
||||
channel_spectrum.feed(buffer_c16);
|
||||
|
||||
int8_t re, im;
|
||||
int8_t mag;
|
||||
int8_t re ;
|
||||
//int8_t im;
|
||||
//int8_t mag;
|
||||
|
||||
for (size_t i = 0; i < 128; i++)
|
||||
{
|
||||
re = buffer.p[i].real();
|
||||
im = buffer.p[i].imag();
|
||||
mag = __builtin_sqrtf((re * re) + (im * im)) ;
|
||||
//im = buffer.p[i].imag();
|
||||
//mag = __builtin_sqrtf((re * re) + (im * im)) ;
|
||||
const unsigned int v = re + 127.0f; //timescope
|
||||
audio_spectrum.db[i] = std::max(0U, std::min(255U, v));
|
||||
}
|
||||
@ -75,6 +76,7 @@ void WidebandFMAudio::on_message(const Message* const message) {
|
||||
}
|
||||
|
||||
void WidebandFMAudio::configure(const WFMConfigureMessage& message) {
|
||||
(void)message; // avoid warning
|
||||
configured = true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user