Compare commits

..

No commits in common. '972eb280d06a02fb581d0795bed7ef80e925860a' and '22fd238ed220d1cd0df683841e6beca5efe803ed' have entirely different histories.

  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,7 +539,6 @@ 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,7 +32,6 @@
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;
@ -102,11 +101,7 @@ auto BluetoothAudioOutput::AdjustVolumeUp() -> bool {
if (volume_ == 100) { if (volume_ == 100) {
return false; return false;
} }
if (volume_ > 100 - kVolumeStep) { volume_++;
volume_ = 100;
} else {
volume_ += kVolumeStep;
}
SetVolume(volume_); SetVolume(volume_);
return true; return true;
} }
@ -115,11 +110,7 @@ auto BluetoothAudioOutput::AdjustVolumeDown() -> bool {
if (volume_ == 0) { if (volume_ == 0) {
return false; return false;
} }
if (volume_ < kVolumeStep) { volume_--;
volume_ = 0;
} else {
volume_ -= kVolumeStep;
}
SetVolume(volume_); SetVolume(volume_);
return true; return true;
} }

@ -40,7 +40,6 @@ 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)
@ -141,29 +140,21 @@ auto I2SAudioOutput::SetVolumeDb(int_fast16_t val) -> bool {
} }
auto I2SAudioOutput::AdjustVolumeUp() -> bool { auto I2SAudioOutput::AdjustVolumeUp() -> bool {
uint16_t vol = GetVolume(); if (GetVolume() >= max_volume_) {
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 {
uint16_t vol = GetVolume(); if (GetVolume() == kMinVolume) {
if (vol == kMinVolume) {
return false; return false;
} }
if (vol <= kMinVolume + kVolumeStep) { if (GetVolume() <= kMinVolume + 1) {
SetVolume(0); SetVolume(0);
} else { } else {
SetVolume(vol - kVolumeStep); SetVolume(GetVolume() - 1);
} }
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_, true); // CUSTOMIZE: enabled - https://codeberg.org/cool-tech-zone/tangara-fw/issues/222 lv_group_set_wrap(group_, false);
} }
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.1") set(PROJECT_VER "1.3.0")
# 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,9 +11,6 @@ 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 \
@ -30,9 +27,6 @@ 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 \
@ -49,9 +43,6 @@ 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