Skip to content

fix(taranis): restore volume cli for I2C audio targets - #6543

Open
fpenard wants to merge 2 commits into
EdgeTX:mainfrom
fpenard:clean_taranis_i2cvolume
Open

fix(taranis): restore volume cli for I2C audio targets#6543
fpenard wants to merge 2 commits into
EdgeTX:mainfrom
fpenard:clean_taranis_i2cvolume

Conversation

@fpenard

@fpenard fpenard commented Aug 23, 2025

Copy link
Copy Markdown
Contributor

Summary of changes:

read_i2c_volume static function is defined but not used in targets/taranis/volume_i2c.cpp.

This one generates the next warning on build.

edgetx/radio/src/targets/taranis/volume_i2c.cpp:36:16: warning: 'int32_t read_i2c_volume()' defined but not used [-Wunused-function]
   36 | static int32_t read_i2c_volume()

@pfeerick pfeerick added the house keeping 🧹 Cleanup of code and house keeping label Aug 24, 2025
@pfeerick

Copy link
Copy Markdown
Member

@raphaelcoeffic Do we remove this, or revert #5863 and probably add && defined(AUDIO) so that debug building doesn't break? At present we can set, but not read the volume level on non-soft volume radios via cli.

@pfeerick
pfeerick force-pushed the clean_taranis_i2cvolume branch from 0ac3771 to cbd1d3a Compare August 27, 2026 03:04
@pfeerick

pfeerick commented Aug 27, 2026

Copy link
Copy Markdown
Member

Added a commit restoring volume readback: wired read_i2c_volume() up to a new getVolume() in volume_i2c.cpp, and restored the volume cliDisplay command dropped by #5863 — scoped to VOLUME_I2C_ADDRESS (taranis I2C-volume boards) rather than the broader !defined(SOFTWARE_VOLUME) used previously, since getVolume() is declared but never implemented on the other boards (pa01/c14/st16/jumper-h750/helloradio-h750) and restoring the old guard would have reintroduced the exact DEBUG-build link failure #5863 fixed for those targets. Verified build against -DPCB=X9D+ -DDEBUG=YES (default PCBREV 2014, a genuine VOLUME_I2C_ADDRESS target).

Valid targets for this code path are X9E, X9D, and X9D+ at its default revision (2014, not 2019) — the only PCBs that both route through targets/taranis and leave SOFTWARE_VOLUME undefined.

Unlikely to ever be used, but the functionality is there, and not having it hooked up was causing a compiler warning.

@pfeerick
pfeerick force-pushed the clean_taranis_i2cvolume branch 2 times, most recently from 51aa25d to b13f9c2 Compare August 27, 2026 03:29
Wire read_i2c_volume() up to getVolume() and restore the "volume"
cliDisplay command that EdgeTX#5863 dropped, scoped to VOLUME_I2C_ADDRESS
(taranis boards with the I2C volume chip) instead of the broader
!defined(SOFTWARE_VOLUME) used previously, since getVolume() was
never implemented for the other boards that declare it.
@pfeerick
pfeerick force-pushed the clean_taranis_i2cvolume branch from b13f9c2 to 9d80afb Compare August 27, 2026 03:30
@pfeerick pfeerick changed the title fix(taranis): remove unused function fix(taranis): restore volume cli for I2C audio targets Aug 27, 2026
@pfeerick pfeerick added this to the 2.11.8 milestone Aug 27, 2026
@pfeerick pfeerick added backport/2.11 To be backported to a 2.11 release also. backport/2.12 To be backported to a 2.12 release also. labels Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/2.11 To be backported to a 2.11 release also. backport/2.12 To be backported to a 2.12 release also. house keeping 🧹 Cleanup of code and house keeping

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants