mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
restore comments
This commit is contained in:
+7
@@ -59,6 +59,13 @@ public abstract class AbstractSoundcoreProtocol extends GBDeviceProtocol {
|
||||
return encodeCommand(command, new byte[]{value});
|
||||
}
|
||||
|
||||
/**
|
||||
* 0: No Auto Power off
|
||||
* 1: Auto Power off 10 min
|
||||
* 2: Auto Power off 20 min
|
||||
* 3: Auto Power off 30 min
|
||||
* 4: Auto Power off 60 min
|
||||
*/
|
||||
protected byte[] encodeAutoPowerOff(final short command, final int duration, final byte disabledDuration) {
|
||||
final byte[] payload;
|
||||
|
||||
|
||||
+9
@@ -49,6 +49,15 @@ public abstract class SoundcoreProtocolImplV1 extends AbstractSoundcoreProtocol
|
||||
return encodeCommand(CMD_SET_CONTROL_FUNCTION, new byte[]{encodeBoolean(right), action, function});
|
||||
}
|
||||
|
||||
/**
|
||||
* Encodes the following settings to a payload to set the audio-mode on the headphones:
|
||||
* PREF_SOUNDCORE_AMBIENT_SOUND_CONTROL If ANC, Transparent or neither should be active
|
||||
* PREF_SOUNDCORE_ADAPTIVE_NOISE_CANCELLING If the strenght of the ANC should be set manual or adaptively according to ambient noise
|
||||
* PREF_SONY_AMBIENT_SOUND_LEVEL How strong the ANC should be in manual mode
|
||||
* PREF_SOUNDCORE_TRANSPARENCY_VOCAL_MODE If the Transparency should focus on vocals or should be fully transparent
|
||||
* PREF_SOUNDCORE_WIND_NOISE_REDUCTION If Transparency or ANC should reduce Wind Noise
|
||||
* @return The payload
|
||||
*/
|
||||
protected byte[] encodeAdvancedAudioMode(final boolean appendStateByte) {
|
||||
final Prefs prefs = getDevicePrefs();
|
||||
final Byte ambientSoundMode = encodeAmbientSoundMode(prefs.getString(
|
||||
|
||||
Reference in New Issue
Block a user