fix: correct soundmeter instrument name for chart config and playback#3369
Merged
marcnause merged 1 commit intoJun 29, 2026
Merged
Conversation
Contributor
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR fixes playback for Sound Meter logs by aligning the instrument name used in chart configuration with the localized instrument name and the playback logic. Sequence diagram for Sound Meter log playback fixsequenceDiagram
actor User
participant LoggedDataScreen
participant _playFile
participant _getChartConfig
User->>LoggedDataScreen: tapPlay()
LoggedDataScreen->>_playFile: _playFile(instrumentName="sound meter")
_playFile->>_getChartConfig: _getChartConfig(instrumentName="sound meter")
_getChartConfig-->>_playFile: chartConfig
_playFile-->>LoggedDataScreen: startPlayback(chartConfig)
LoggedDataScreen-->>User: audioPlayback
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
Build StatusBuild successful. APKs to test: https://github.com/fossasia/pslab-app/actions/runs/28309349190/artifacts/7930491213. Screenshots |
marcnause
approved these changes
Jun 29, 2026
_getChartConfig used 'soundmeter' but _playFile used 'sound meter', causing the chart config to never match and sound meter playback to silently do nothing. Changed _getChartConfig to use 'sound meter' to match the value from appLocalizations.soundMeter.toLowerCase().
5d01d67 to
a00b8ba
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.







-1_instruments_screen.png?raw=true)
-2_nav_drawer.png?raw=true)
-3_accelerometer.png?raw=true)
-4_power_source.png?raw=true)
-5_multimeter.png?raw=true)
-6_wave_generator.png?raw=true)
-7_oscilloscope.png?raw=true)
Problem
Tapping Play on a Sound Meter log in the Logged Data screen did nothing.
The root cause was a name mismatch:
_getChartConfig()matched on'soundmeter'(no space)_playFile()matched on'sound meter'(with space)appLocalizations.soundMeter.toLowerCase()is"sound meter"(with space)So
_getChartConfignever matched, and playback silently fell through.Fix
Changed
case 'soundmeter':tocase 'sound meter':in_getChartConfigso both methods use the same string.Files changed
lib/view/logged_data_screen.dart— 1 line changedSummary by Sourcery
Bug Fixes: