Custom waterfall colors (#2617)

* Custom waterfall gradient
* Installing a custom waterfall gradient via fileman
* default file for user friendly swap
Co-authored-by: gullradriel <gullradriel@no-mail.com>
This commit is contained in:
Oleg Belousov 2025-04-11 13:46:04 +03:00 committed by GitHub
parent eff214cc79
commit f941ae871a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 250 additions and 269 deletions

View file

@ -56,6 +56,10 @@ SearchView::SearchView(
: nav_(nav) {
baseband::run_image(portapack::spi_flash::image_tag_wideband_spectrum);
if (!gradient.load_file(default_gradient_file)) {
gradient.set_default();
}
add_children({&labels,
&field_frequency_min,
&field_frequency_max,
@ -290,7 +294,7 @@ void SearchView::on_channel_spectrum(const ChannelSpectrum& spectrum) {
power = spectrum.db[bin - 128];
}
add_spectrum_pixel(spectrum_rgb3_lut[power]);
add_spectrum_pixel(gradient.lut[power]);
mean_acc += power;
if (power > max_power) {