1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-09 03:37:03 +01:00

Fix references to MiScale2

This commit is contained in:
Severin von Wnuck-Lipinski 2024-08-11 11:05:39 +02:00 committed by José Rebelo
parent 5b98ae737e
commit 9ef8bc0d67
4 changed files with 16 additions and 16 deletions

View File

@ -15,7 +15,7 @@
You should have received a copy of the GNU Affero General Public License 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/>. */ along with this program. If not, see <https://www.gnu.org/licenses/>. */
package nodomain.freeyourgadget.gadgetbridge.devices.miscale2; package nodomain.freeyourgadget.gadgetbridge.devices.miscale;
import android.app.Activity; import android.app.Activity;
import android.bluetooth.le.ScanFilter; import android.bluetooth.le.ScanFilter;
@ -45,10 +45,10 @@ import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType; import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport; import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
import nodomain.freeyourgadget.gadgetbridge.service.btle.GattService; import nodomain.freeyourgadget.gadgetbridge.service.btle.GattService;
import nodomain.freeyourgadget.gadgetbridge.service.devices.miscale2.MiScale2DeviceSupport; import nodomain.freeyourgadget.gadgetbridge.service.devices.miscale.MiCompositionScaleDeviceSupport;
public class MiScale2DeviceCoordinator extends AbstractBLEDeviceCoordinator { public class MiCompositionScaleCoordinator extends AbstractBLEDeviceCoordinator {
private static final Logger LOG = LoggerFactory.getLogger(MiScale2DeviceCoordinator.class); private static final Logger LOG = LoggerFactory.getLogger(MiCompositionScaleCoordinator.class);
@Override @Override
protected void deleteDevice(@NonNull GBDevice gbDevice, @NonNull Device device, @NonNull DaoSession session) throws GBException { protected void deleteDevice(@NonNull GBDevice gbDevice, @NonNull Device device, @NonNull DaoSession session) throws GBException {
@ -158,23 +158,23 @@ public class MiScale2DeviceCoordinator extends AbstractBLEDeviceCoordinator {
@NonNull @NonNull
@Override @Override
public Class<? extends DeviceSupport> getDeviceSupportClass() { public Class<? extends DeviceSupport> getDeviceSupportClass() {
return MiScale2DeviceSupport.class; return MiCompositionScaleDeviceSupport.class;
} }
@Override @Override
public int getDeviceNameResource() { public int getDeviceNameResource() {
return R.string.devicetype_miscale2; return R.string.devicetype_micompositionscale;
} }
@Override @Override
public int getDefaultIconResource() { public int getDefaultIconResource() {
return R.drawable.ic_device_miscale2; return R.drawable.ic_device_miscale;
} }
@Override @Override
public int getDisabledIconResource() { public int getDisabledIconResource() {
return R.drawable.ic_device_miscale2_disabled; return R.drawable.ic_device_miscale_disabled;
} }
} }

View File

@ -188,7 +188,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.miband.MiBandCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.mijia_lywsd.MijiaLywsd02Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.mijia_lywsd.MijiaLywsd02Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.mijia_lywsd.MijiaLywsd03Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.mijia_lywsd.MijiaLywsd03Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.mijia_lywsd.MijiaMhoC303Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.mijia_lywsd.MijiaMhoC303Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.miscale2.MiScale2DeviceCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.miscale.MiCompositionScaleCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.moondrop.MoondropSpaceTravelCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.moondrop.MoondropSpaceTravelCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.no1f1.No1F1Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.no1f1.No1F1Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.nothing.CmfBudsPro2Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.nothing.CmfBudsPro2Coordinator;
@ -355,7 +355,7 @@ public enum DeviceType {
CASIOGBX100(CasioGBX100DeviceCoordinator.class), CASIOGBX100(CasioGBX100DeviceCoordinator.class),
CASIOGWB5600(CasioGWB5600DeviceCoordinator.class), CASIOGWB5600(CasioGWB5600DeviceCoordinator.class),
CASIOGMWB5000(CasioGMWB5000DeviceCoordinator.class), CASIOGMWB5000(CasioGMWB5000DeviceCoordinator.class),
MISCALE2(MiScale2DeviceCoordinator.class), MICOMPOSITIONSCALE(MiCompositionScaleCoordinator.class),
BFH16(BFH16DeviceCoordinator.class), BFH16(BFH16DeviceCoordinator.class),
MAKIBESHR3(MakibesHR3Coordinator.class), MAKIBESHR3(MakibesHR3Coordinator.class),
BANGLEJS(BangleJSCoordinator.class), BANGLEJS(BangleJSCoordinator.class),

View File

@ -15,7 +15,7 @@
You should have received a copy of the GNU Affero General Public License 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/>. */ along with this program. If not, see <https://www.gnu.org/licenses/>. */
package nodomain.freeyourgadget.gadgetbridge.service.devices.miscale2; package nodomain.freeyourgadget.gadgetbridge.service.devices.miscale;
import android.bluetooth.BluetoothGatt; import android.bluetooth.BluetoothGatt;
import android.bluetooth.BluetoothGattCharacteristic; import android.bluetooth.BluetoothGattCharacteristic;
@ -41,13 +41,13 @@ import nodomain.freeyourgadget.gadgetbridge.service.btle.profiles.IntentListener
import nodomain.freeyourgadget.gadgetbridge.service.btle.profiles.deviceinfo.DeviceInfoProfile; import nodomain.freeyourgadget.gadgetbridge.service.btle.profiles.deviceinfo.DeviceInfoProfile;
import nodomain.freeyourgadget.gadgetbridge.util.GB; import nodomain.freeyourgadget.gadgetbridge.util.GB;
public class MiScale2DeviceSupport extends AbstractBTLEDeviceSupport { public class MiCompositionScaleDeviceSupport extends AbstractBTLEDeviceSupport {
private static final Logger LOG = LoggerFactory.getLogger(MiScale2DeviceSupport.class); private static final Logger LOG = LoggerFactory.getLogger(MiCompositionScaleDeviceSupport.class);
private static final String UNIT_KG = "kg"; private static final String UNIT_KG = "kg";
private static final String UNIT_LBS = "lb"; private static final String UNIT_LBS = "lb";
private static final String UNIT_JIN = "jīn"; private static final String UNIT_JIN = "jīn";
private final DeviceInfoProfile<MiScale2DeviceSupport> deviceInfoProfile; private final DeviceInfoProfile<MiCompositionScaleDeviceSupport> deviceInfoProfile;
private final GBDeviceEventVersionInfo versionCmd = new GBDeviceEventVersionInfo(); private final GBDeviceEventVersionInfo versionCmd = new GBDeviceEventVersionInfo();
private final IntentListener mListener = new IntentListener() { private final IntentListener mListener = new IntentListener() {
@Override @Override
@ -59,7 +59,7 @@ public class MiScale2DeviceSupport extends AbstractBTLEDeviceSupport {
} }
}; };
public MiScale2DeviceSupport() { public MiCompositionScaleDeviceSupport() {
super(LOG); super(LOG);
addSupportedService(GattService.UUID_SERVICE_GENERIC_ACCESS); addSupportedService(GattService.UUID_SERVICE_GENERIC_ACCESS);
addSupportedService(GattService.UUID_SERVICE_GENERIC_ATTRIBUTE); addSupportedService(GattService.UUID_SERVICE_GENERIC_ATTRIBUTE);

View File

@ -1720,7 +1720,7 @@
<string name="devicetype_casiogbx100">Casio GBX-100</string> <string name="devicetype_casiogbx100">Casio GBX-100</string>
<string name="devicetype_casiogwb5600">Casio GW-B5600</string> <string name="devicetype_casiogwb5600">Casio GW-B5600</string>
<string name="devicetype_casiogmwb5000">Casio GMW-B5000</string> <string name="devicetype_casiogmwb5000">Casio GMW-B5000</string>
<string name="devicetype_miscale2">Mi Scale 2</string> <string name="devicetype_micompositionscale">Mi Body Composition Scale 2</string>
<string name="devicetype_itag">iTag</string> <string name="devicetype_itag">iTag</string>
<string name="devicetype_bfh16">BFH-16</string> <string name="devicetype_bfh16">BFH-16</string>
<string name="devicetype_mijia_lywsd02">Mijia Smart Clock</string> <string name="devicetype_mijia_lywsd02">Mijia Smart Clock</string>