mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-23 18:36:50 +01:00
initial support for sony WI-SP600N (#3522)
Initial support for sony wi-sp600n reported working . minor difference with the inspiring wf-sp800n Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/3522 Co-authored-by: Denis Pitzalis <denics@free.fr> Co-committed-by: Denis Pitzalis <denics@free.fr>
This commit is contained in:
parent
139e9cfb14
commit
207a2a9b01
@ -3,6 +3,7 @@
|
||||
#### Next Version (WIP)
|
||||
|
||||
* Initial support for Mijia MHO-C303
|
||||
* Initial support for Sony WI-SP600N
|
||||
* Experimental support for Xiaomi Smart Band 8 Pro
|
||||
* Experimental support for Xiaomi Watch S1 Pro
|
||||
* Experimental support for Xiaomi Watch S1
|
||||
|
@ -0,0 +1,56 @@
|
||||
/* Copyright (C) 2021-2024 Daniel Dakhno, José Rebelo, Petr Vaněk
|
||||
|
||||
This file is part of Gadgetbridge.
|
||||
|
||||
Gadgetbridge is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Gadgetbridge is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones.coordinators;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones.SonyHeadphonesCapabilities;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones.SonyHeadphonesCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
|
||||
public class SonyWISP600NCoordinator extends SonyHeadphonesCoordinator {
|
||||
@Override
|
||||
protected Pattern getSupportedDeviceName() {
|
||||
return Pattern.compile(".*WI-SP600N.*");
|
||||
}
|
||||
@Override
|
||||
public int getDeviceNameResource() {
|
||||
return R.string.devicetype_sony_wi_sp600n;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SonyHeadphonesCapabilities> getCapabilities() {
|
||||
return Arrays.asList(
|
||||
SonyHeadphonesCapabilities.BatterySingle,
|
||||
SonyHeadphonesCapabilities.AmbientSoundControl,
|
||||
SonyHeadphonesCapabilities.WindNoiseReduction,
|
||||
SonyHeadphonesCapabilities.EqualizerWithCustomBands,
|
||||
SonyHeadphonesCapabilities.SoundPosition,
|
||||
SonyHeadphonesCapabilities.SurroundMode,
|
||||
SonyHeadphonesCapabilities.PowerOffFromPhone,
|
||||
SonyHeadphonesCapabilities.AutomaticPowerOffByTime,
|
||||
SonyHeadphonesCapabilities.VoiceNotifications,
|
||||
SonyHeadphonesCapabilities.Volume
|
||||
);
|
||||
}
|
||||
}
|
@ -152,6 +152,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones.coordinators
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones.coordinators.SonyWF1000XM4Coordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones.coordinators.SonyWF1000XM5Coordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones.coordinators.SonyWFSP800NCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones.coordinators.SonyWISP600NCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones.coordinators.SonyWH1000XM2Coordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones.coordinators.SonyWH1000XM3Coordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones.coordinators.SonyWH1000XM4Coordinator;
|
||||
@ -319,6 +320,7 @@ public enum DeviceType {
|
||||
GALAXY_BUDS2_PRO(GalaxyBuds2ProDeviceCoordinator.class),
|
||||
SONY_WH_1000XM3(SonyWH1000XM3Coordinator.class),
|
||||
SONY_WF_SP800N(SonyWFSP800NCoordinator.class),
|
||||
SONY_WI_SP600N(SonyWISP600NCoordinator.class),
|
||||
SONY_WH_1000XM4(SonyWH1000XM4Coordinator.class),
|
||||
SONY_WF_1000XM3(SonyWF1000XM3Coordinator.class),
|
||||
SONY_WH_1000XM2(SonyWH1000XM2Coordinator.class),
|
||||
|
@ -120,6 +120,7 @@ public class SonyHeadphonesProtocol extends GBDeviceProtocol {
|
||||
if (message.getPayload().length == 4) {
|
||||
// WH-1000XM3: 01:00:40:10
|
||||
// WF-SP800N 1.0.1: 01:00:70:00
|
||||
// Wi-SP600N: 01:00:40:10
|
||||
protocolVersion = "v1";
|
||||
} else if (message.getPayload().length == 8) {
|
||||
switch (message.getPayload()[2]) {
|
||||
|
@ -1432,6 +1432,7 @@
|
||||
<string name="devicetype_sony_wf_1000xm3">Sony WF-1000XM3</string>
|
||||
<string name="devicetype_sony_wf_1000xm4">Sony WF-1000XM4</string>
|
||||
<string name="devicetype_sony_wf_1000xm5">Sony WF-1000XM5</string>
|
||||
<string name="devicetype_sony_wi_sp600n">Sony WI-SP600N</string>
|
||||
<string name="devicetype_sony_linkbuds_s">Sony LinkBuds S</string>
|
||||
<string name="devicetype_binary_sensor">Binary sensor</string>
|
||||
<string name="devicetype_honor_band3">Honor Band 3</string>
|
||||
|
Loading…
Reference in New Issue
Block a user