New Morse TX app (#2948)

* morse tx
* global button repeat function improvement
This commit is contained in:
Pezsma
2026-01-30 17:18:13 +01:00
committed by GitHub
parent 106d9b1207
commit e2b642ae25
25 changed files with 1684 additions and 11 deletions
+8 -2
View File
@@ -26,6 +26,7 @@
#include "string_format.hpp"
#include "ui_receiver.hpp"
#include "ui_freqman.hpp"
#include "audio.hpp"
using namespace portapack;
@@ -591,8 +592,13 @@ AudioVolumeField::AudioVolumeField(
/* fill char */ ' '} {
set_value(receiver_model.normalized_headphone_volume());
on_change = [](int32_t v) {
receiver_model.set_normalized_headphone_volume(v);
on_change = [](int32_t vol) {
// don't call receiver model, because this widget shuld be able to handle volume settinsg from any app, regardless of the receiver model's enables state. like the tx apps should be able to set volume too.
// this is identical to the receiver model's method
uint8_t v = clip<uint8_t>(vol, 0, 99);
auto new_volume = volume_t::decibel(v - 99) + audio::headphone::volume_range().max;
persistent_memory::set_headphone_volume(new_volume);
audio::headphone::set_volume(new_volume);
};
}