mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-24 09:35:50 +01:00
Marstek B2500: Remove duplicate logging, add copyright header
This commit is contained in:
parent
6c8950209d
commit
b220a2553c
@ -1,3 +1,19 @@
|
||||
/* Copyright (C) 2024 Andreas Shimokawa
|
||||
|
||||
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.marstek;
|
||||
|
||||
import android.content.BroadcastReceiver;
|
||||
|
@ -47,7 +47,6 @@ import nodomain.freeyourgadget.gadgetbridge.service.btle.actions.SetDeviceStateA
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.serial.GBDeviceProtocol;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.DateTimeUtils;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.Prefs;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.StringUtils;
|
||||
|
||||
|
||||
public class MarstekB2500DeviceSupport extends AbstractBTLEDeviceSupport {
|
||||
@ -82,12 +81,8 @@ public class MarstekB2500DeviceSupport extends AbstractBTLEDeviceSupport {
|
||||
public boolean onCharacteristicChanged(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic) {
|
||||
super.onCharacteristicChanged(gatt, characteristic);
|
||||
|
||||
UUID characteristicUUID = characteristic.getUuid();
|
||||
byte[] value = characteristic.getValue();
|
||||
|
||||
LOG.info("Characteristic changed UUID: {}", characteristicUUID);
|
||||
LOG.info("Characteristic changed value: {}", StringUtils.bytesToHex(value));
|
||||
|
||||
if (value[0] == COMMAND_PREFIX) {
|
||||
if ((value[1] == 0x10) && (value[2] == COMMAND) && (value[3] == OPCODE_INFO1)) {
|
||||
decodeInfos(value);
|
||||
|
Loading…
Reference in New Issue
Block a user