summaryrefslogtreecommitdiffstats
path: root/MOST_UNICENS/ucs2-vol/src/device_container.cpp
diff options
context:
space:
mode:
authorTobias Jahnke <tobias.jahnke@microchip.com>2018-10-10 15:52:57 +0200
committerTobias Jahnke <tobias.jahnke@microchip.com>2018-10-10 15:52:57 +0200
commitb071fc0882750d28036769c56c046fe1d7ae9942 (patch)
treed33a0968eb237c4975bc879087cadff57082dd10 /MOST_UNICENS/ucs2-vol/src/device_container.cpp
parent6d4cbab774c0fa632ccdf4add35b87d0828ac765 (diff)
4a-hal-unicens: add Fiberdyne Master Volume
Bug-AGL: SPEC-1758 As preparation before introducing UNICENS 4a plugin: - Init volume library at first - Add fiberdyne master volume - Introduce commands sent by control messages - Removes outdated controls - Known issue: turn ALSA volume above "93" to hear some sound Change-Id: I591c6b109a51c9da602ad08514b67c2ec573e09c Signed-off-by: Tobias Jahnke <tobias.jahnke@microchip.com>
Diffstat (limited to 'MOST_UNICENS/ucs2-vol/src/device_container.cpp')
-rw-r--r--MOST_UNICENS/ucs2-vol/src/device_container.cpp23
1 files changed, 15 insertions, 8 deletions
diff --git a/MOST_UNICENS/ucs2-vol/src/device_container.cpp b/MOST_UNICENS/ucs2-vol/src/device_container.cpp
index f8b1961..3448a23 100644
--- a/MOST_UNICENS/ucs2-vol/src/device_container.cpp
+++ b/MOST_UNICENS/ucs2-vol/src/device_container.cpp
@@ -119,18 +119,25 @@ void CDeviceContainer::Update()
if (_values_pptr[_idx_processing]->RequiresUpdate())
{
- if (_values_pptr[_idx_processing]->FireUpdateMessage(this->_init_ptr->writei2c_cb,
- &OnI2cResult,
- this))
+ if (_values_pptr[_idx_processing]->GetType() == DEVICE_VAL_FIBERDYNE_MASTER)
{
- this->_tx_busy = true;
- error = false;
- break;
+ _values_pptr[_idx_processing]->FireControlMessage(this->_init_ptr->sendmsg_cb);
}
else
{
- error = true;
- break;
+ if (_values_pptr[_idx_processing]->FireUpdateMessage(this->_init_ptr->writei2c_cb,
+ &OnI2cResult,
+ this))
+ {
+ this->_tx_busy = true;
+ error = false;
+ break;
+ }
+ else
+ {
+ error = true;
+ break;
+ }
}
}
}