summaryrefslogtreecommitdiff
path: root/src/drivers/include/bluetooth.hpp
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2024-04-12 14:36:03 +1000
committerjacqueline <me@jacqueline.id.au>2024-04-12 14:36:03 +1000
commitade00945951ff49481a161479f7d9798cc4c564f (patch)
tree3e244f54c4fa3f5d640d6017cf0f05ad079a90ab /src/drivers/include/bluetooth.hpp
parentb319b3f07f61ce7212f84ea6e7e69d27ef97ef5e (diff)
downloadtangara-fw-ade00945951ff49481a161479f7d9798cc4c564f.tar.gz
switch to software volume scaling (it's bad tho i need daniel to do maths for me please)
Diffstat (limited to 'src/drivers/include/bluetooth.hpp')
-rw-r--r--src/drivers/include/bluetooth.hpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/drivers/include/bluetooth.hpp b/src/drivers/include/bluetooth.hpp
index 988c7e93..8da5ce2e 100644
--- a/src/drivers/include/bluetooth.hpp
+++ b/src/drivers/include/bluetooth.hpp
@@ -43,7 +43,7 @@ class Bluetooth {
auto PreferredDevice() -> std::optional<bluetooth::MacAndName>;
auto SetSource(StreamBufferHandle_t) -> void;
- auto SetVolume(uint8_t) -> void;
+ auto SetVolumeFactor(float) -> void;
auto SetEventHandler(std::function<void(bluetooth::Event)> cb) -> void;
};
@@ -60,9 +60,6 @@ struct SourceChanged : public tinyfsm::Event {};
struct DeviceDiscovered : public tinyfsm::Event {
const Device& device;
};
-struct ChangeVolume : public tinyfsm::Event {
- const uint8_t volume;
-};
namespace internal {
struct Gap : public tinyfsm::Event {
@@ -131,7 +128,6 @@ class BluetoothState : public tinyfsm::Fsm<BluetoothState> {
virtual void react(const events::ConnectTimedOut& ev){};
virtual void react(const events::PreferredDeviceChanged& ev){};
virtual void react(const events::SourceChanged& ev){};
- virtual void react(const events::ChangeVolume&) {}
virtual void react(const events::DeviceDiscovered&);
@@ -204,7 +200,6 @@ class Connected : public BluetoothState {
void react(const events::PreferredDeviceChanged& ev) override;
void react(const events::SourceChanged& ev) override;
- void react(const events::ChangeVolume&) override;
void react(const events::Disable& ev) override;
void react(const events::internal::Gap& ev) override;