Compare commits

...

6 Commits

Author SHA1 Message Date
Ondřej Hruška 972eb280d0 Enable scroll wrap-around 7 days ago
Ondřej Hruška 2ab4e9d8a6 Changed volume to go in 5pct steps 7 days ago
cooljqln 71ac67bad3 Merge pull request 'Include more character sets.' (#304) from leper/tangara-fw:extended_latin_a_b_greek into main 2 weeks ago
jacqueline 0278d0e3df version bump 3 weeks ago
jacqueline 4d7893cb97 Quick fix unmount requests getting dropped when there's no sd card 3 weeks ago
leper 9cc5fec1f5 Include more character sets. 4 weeks ago
  1. BIN
      lua/fonts/fusion10
  2. BIN
      lua/fonts/fusion12
  3. 1
      src/tangara/audio/audio_fsm.cpp
  4. 13
      src/tangara/audio/bt_audio_output.cpp
  5. 19
      src/tangara/audio/i2s_audio_output.cpp
  6. 2
      src/tangara/ui/screen.cpp
  7. 2
      tools/cmake/common.cmake
  8. 9
      tools/fonts/mkfonts.sh

Binary file not shown.

Binary file not shown.

@ -539,6 +539,7 @@ void Standby::react(const system_fsm::UnmountRequest& ev) {
sServices->bg_worker().Dispatch<void>([=]() { sServices->bg_worker().Dispatch<void>([=]() {
auto db = sServices->database().lock(); auto db = sServices->database().lock();
if (!db) { if (!db) {
events::System().Dispatch(UnmountReady{.idle = ev.idle});
return; return;
} }
auto& queue = sServices->track_queue(); auto& queue = sServices->track_queue();

@ -32,6 +32,7 @@
namespace audio { namespace audio {
static constexpr uint16_t kVolumeRange = 60; static constexpr uint16_t kVolumeRange = 60;
static constexpr uint16_t kVolumeStep = 5; // CUSTOM - added
using ConnectionState = drivers::Bluetooth::ConnectionState; using ConnectionState = drivers::Bluetooth::ConnectionState;
@ -101,7 +102,11 @@ auto BluetoothAudioOutput::AdjustVolumeUp() -> bool {
if (volume_ == 100) { if (volume_ == 100) {
return false; return false;
} }
volume_++; if (volume_ > 100 - kVolumeStep) {
volume_ = 100;
} else {
volume_ += kVolumeStep;
}
SetVolume(volume_); SetVolume(volume_);
return true; return true;
} }
@ -110,7 +115,11 @@ auto BluetoothAudioOutput::AdjustVolumeDown() -> bool {
if (volume_ == 0) { if (volume_ == 0) {
return false; return false;
} }
volume_--; if (volume_ < kVolumeStep) {
volume_ = 0;
} else {
volume_ -= kVolumeStep;
}
SetVolume(volume_); SetVolume(volume_);
return true; return true;
} }

@ -40,6 +40,7 @@ static constexpr uint16_t kMinVolume = 0b0;
static constexpr uint16_t kMaxVolumeBeforeClipping = 0x185; static constexpr uint16_t kMaxVolumeBeforeClipping = 0x185;
static constexpr uint16_t kLineLevelVolume = 0x13d; static constexpr uint16_t kLineLevelVolume = 0x13d;
static constexpr uint16_t kDefaultVolume = 0x100; static constexpr uint16_t kDefaultVolume = 0x100;
static constexpr uint16_t kVolumeStep = 5; // CUSTOM - added
I2SAudioOutput::I2SAudioOutput(drivers::IGpios& expander, I2SAudioOutput::I2SAudioOutput(drivers::IGpios& expander,
drivers::OutputBuffers& buffers) drivers::OutputBuffers& buffers)
@ -140,21 +141,29 @@ auto I2SAudioOutput::SetVolumeDb(int_fast16_t val) -> bool {
} }
auto I2SAudioOutput::AdjustVolumeUp() -> bool { auto I2SAudioOutput::AdjustVolumeUp() -> bool {
if (GetVolume() >= max_volume_) { uint16_t vol = GetVolume();
if (vol >= max_volume_) {
return false; return false;
} }
SetVolume(GetVolume() + 1);
if (vol > max_volume_ - kVolumeStep) {
SetVolume(max_volume_);
} else {
SetVolume(vol + kVolumeStep);
}
return true; return true;
} }
auto I2SAudioOutput::AdjustVolumeDown() -> bool { auto I2SAudioOutput::AdjustVolumeDown() -> bool {
if (GetVolume() == kMinVolume) { uint16_t vol = GetVolume();
if (vol == kMinVolume) {
return false; return false;
} }
if (GetVolume() <= kMinVolume + 1) { if (vol <= kMinVolume + kVolumeStep) {
SetVolume(0); SetVolume(0);
} else { } else {
SetVolume(GetVolume() - 1); SetVolume(vol - kVolumeStep);
} }
return true; return true;
} }

@ -34,7 +34,7 @@ Screen::Screen()
// Disable wrapping by default, since it's confusing and generally makes it // Disable wrapping by default, since it's confusing and generally makes it
// harder to navigate quickly. // harder to navigate quickly.
lv_group_set_wrap(group_, false); lv_group_set_wrap(group_, true); // CUSTOMIZE: enabled - https://codeberg.org/cool-tech-zone/tangara-fw/issues/222
} }
Screen::~Screen() { Screen::~Screen() {

@ -5,7 +5,7 @@
# For more information about build system see # For more information about build system see
# https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system.html # https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system.html
set(PROJECT_VER "1.3.0") set(PROJECT_VER "1.3.1")
# esp-idf sets the C++ standard weird. Set cmake vars to match. # esp-idf sets the C++ standard weird. Set cmake vars to match.
set(CMAKE_CXX_STANDARD 23) set(CMAKE_CXX_STANDARD 23)

@ -11,6 +11,9 @@ fusion_12() {
--font fusion/fusion-pixel-12px-proportional/fusion-pixel-12px-proportional-latin.ttf \ --font fusion/fusion-pixel-12px-proportional/fusion-pixel-12px-proportional-latin.ttf \
-r 0x2000-0x206F \ -r 0x2000-0x206F \
-r 0x20-0x7F,0xA0-0xFF \ -r 0x20-0x7F,0xA0-0xFF \
-r 0x100-0x17F \
-r 0x180-0x24F \
-r 0x370-0x3FF \
-r 0x400-0x4FF \ -r 0x400-0x4FF \
--font fusion/fusion-pixel-12px-proportional/fusion-pixel-12px-proportional-ja.ttf \ --font fusion/fusion-pixel-12px-proportional/fusion-pixel-12px-proportional-ja.ttf \
-r 0x3000-0x303f,0x3040-0x309F,0x30A0-0x30FF \ -r 0x3000-0x303f,0x3040-0x309F,0x30A0-0x30FF \
@ -27,6 +30,9 @@ fusion_10() {
--font fusion/fusion-pixel-10px-proportional/fusion-pixel-10px-proportional-latin.ttf \ --font fusion/fusion-pixel-10px-proportional/fusion-pixel-10px-proportional-latin.ttf \
-r 0x2000-0x206F \ -r 0x2000-0x206F \
-r 0x20-0x7F,0xA0-0xFF \ -r 0x20-0x7F,0xA0-0xFF \
-r 0x100-0x17F \
-r 0x180-0x24F \
-r 0x370-0x3FF \
-r 0x400-0x4FF \ -r 0x400-0x4FF \
--font fusion/fusion-pixel-10px-proportional/fusion-pixel-10px-proportional-ja.ttf \ --font fusion/fusion-pixel-10px-proportional/fusion-pixel-10px-proportional-ja.ttf \
-r 0x3000-0x303f,0x3040-0x309F,0x30A0-0x30FF \ -r 0x3000-0x303f,0x3040-0x309F,0x30A0-0x30FF \
@ -43,6 +49,9 @@ fusion_8() {
--font fusion/fusion-pixel-8px-monospaced/fusion-pixel-8px-monospaced-latin.ttf \ --font fusion/fusion-pixel-8px-monospaced/fusion-pixel-8px-monospaced-latin.ttf \
-r 0x2000-0x206F \ -r 0x2000-0x206F \
-r 0x20-0x7F,0xA0-0xFF \ -r 0x20-0x7F,0xA0-0xFF \
-r 0x100-0x17F \
-r 0x180-0x24F \
-r 0x370-0x3FF \
-r 0x400-0x4FF \ -r 0x400-0x4FF \
--font fusion/fusion-pixel-8px-monospaced/fusion-pixel-8px-monospaced-ja.ttf \ --font fusion/fusion-pixel-8px-monospaced/fusion-pixel-8px-monospaced-ja.ttf \
-r 0x3000-0x303f,0x3040-0x309F,0x30A0-0x30FF \ -r 0x3000-0x303f,0x3040-0x309F,0x30A0-0x30FF \

Loading…
Cancel
Save