From 32869129fff6a0fc434ab2d9ae30d244c020636b Mon Sep 17 00:00:00 2001 From: jacqueline Date: Wed, 28 Aug 2024 12:46:17 +1000 Subject: [PATCH] clang-format --- src/tangara/audio/audio_events.hpp | 5 +++-- src/tangara/audio/audio_fsm.cpp | 6 ++++-- src/tangara/audio/track_queue.cpp | 6 ++++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/tangara/audio/audio_events.hpp b/src/tangara/audio/audio_events.hpp index a141832e..91bcf48b 100644 --- a/src/tangara/audio/audio_events.hpp +++ b/src/tangara/audio/audio_events.hpp @@ -119,10 +119,11 @@ struct SetVolumeBalance : tinyfsm::Event { }; /* - Event emitted when the hardware volume for a connected Bluetooth device has changed. + Event emitted when the hardware volume for a connected Bluetooth device has + changed. */ struct RemoteVolumeChanged : tinyfsm::Event { - uint_fast8_t value; // 0..127 + uint_fast8_t value; // 0..127 }; struct VolumeChanged : tinyfsm::Event { uint_fast8_t percent; diff --git a/src/tangara/audio/audio_fsm.cpp b/src/tangara/audio/audio_fsm.cpp index 163e56ec..5a91c6f9 100644 --- a/src/tangara/audio/audio_fsm.cpp +++ b/src/tangara/audio/audio_fsm.cpp @@ -237,10 +237,12 @@ void AudioState::react(const internal::StreamEnded& ev) { void AudioState::react(const system_fsm::HasPhonesChanged& ev) { if (ev.has_headphones) { - events::Audio().Dispatch(audio::OutputModeChanged{.set_to = drivers::NvsStorage::Output::kHeadphones}); + events::Audio().Dispatch(audio::OutputModeChanged{ + .set_to = drivers::NvsStorage::Output::kHeadphones}); } else { if (sServices->bluetooth().enabled()) { - events::Audio().Dispatch(audio::OutputModeChanged{.set_to = drivers::NvsStorage::Output::kBluetooth}); + events::Audio().Dispatch(audio::OutputModeChanged{ + .set_to = drivers::NvsStorage::Output::kBluetooth}); } } } diff --git a/src/tangara/audio/track_queue.cpp b/src/tangara/audio/track_queue.cpp index 4f90e2ea..6fa5511c 100644 --- a/src/tangara/audio/track_queue.cpp +++ b/src/tangara/audio/track_queue.cpp @@ -138,7 +138,8 @@ auto TrackQueue::open() -> bool { return playlist_.open(); } -auto TrackQueue::openPlaylist(const std::string& playlist_file, bool notify) -> bool { +auto TrackQueue::openPlaylist(const std::string& playlist_file, bool notify) + -> bool { opened_playlist_.emplace(playlist_file); auto res = opened_playlist_->open(); if (!res) { @@ -414,7 +415,8 @@ cppbor::ParseClient* TrackQueue::QueueParseClient::item( i_ = 0; } else if (item->type() == cppbor::UINT) { auto val = item->asUint()->unsignedValue(); - // Save the position so we can apply it later when we have finished serialising + // Save the position so we can apply it later when we have finished + // serialising position_to_set_ = val; } else if (item->type() == cppbor::TSTR) { auto val = item->asTstr();