Merge branch 'main' of git.sr.ht:~jacqueline/tangara-fw

custom
jacqueline 1 year ago
commit aaa949f718
  1. 5
      README.md
  2. 1
      src/lua/include/lua_thread.hpp
  3. 20
      src/ui/encoder_input.cpp
  4. 1
      src/ui/include/ui_fsm.hpp
  5. 4
      src/ui/ui_fsm.cpp

@ -1,7 +1,8 @@
# Tangara
Tangara is an open-hardware portable music player. It runs on an ESP32, fits in
your pocket, and has a battery that lasts all day.
Tangara is a portable music player. It outputs high-quality sound through a 3.5-mm headphone jack, lasts a full day on a charge, and includes a processor that’s powerful enough to support any audio format you can throw at it. It’s also 100% open hardware running open-source software, which makes it easy to customize, repair, and upgrade. Tangara plays what you want to hear, however you want to hear it.
We're currently trying to scrape together a crowdfunding campaign! Please check us out on [Crowd Supply](https://www.crowdsupply.com/cool-tech-zone/tangara)!
## Source Repositories

@ -30,6 +30,7 @@ class LuaThread {
auto RunScript(const std::string& path) -> bool;
auto bridge() -> Bridge& { return *bridge_; }
auto state() -> lua_State* { return state_; }
private:
LuaThread(std::unique_ptr<Allocator>&, std::unique_ptr<Bridge>&, lua_State*);

@ -264,6 +264,26 @@ auto EncoderInput::Read(lv_indev_data_t* data) -> void {
break;
}
// Only trigger the directional long-press gestures if they trigger at the
// same time as a trigger on the overall touchwheel. This means the
// gestures only trigger if it's your only interaction with the wheel this
// press; scrolling and then resting on a direction should not trigger
// them.
trigger = TriggerKey(Keys::kTouchWheel, KeyStyle::kLongPress, now_ms);
if (trigger == Trigger::kLongPress) {
trigger =
TriggerKey(Keys::kDirectionalLeft, KeyStyle::kLongPress, now_ms);
switch (trigger) {
case Trigger::kNone:
break;
case Trigger::kClick:
break;
case Trigger::kLongPress:
events::Ui().Dispatch(internal::BackPressed{});
break;
}
}
break;
}
}

@ -129,6 +129,7 @@ class Lua : public UiState {
void react(const audio::PlaybackStarted&) override;
void react(const audio::PlaybackUpdate&) override;
void react(const audio::PlaybackFinished&) override;
void react(const internal::BackPressed&) override;
using UiState::react;

@ -303,6 +303,10 @@ void Lua::react(const audio::PlaybackFinished&) {
playback_playing_->Update(false);
}
void Lua::react(const internal::BackPressed& ev) {
PopLuaScreen(sLua->state());
}
void Browse::entry() {}
void Browse::react(const internal::ShowSettingsPage& ev) {

Loading…
Cancel
Save