This commit is contained in:
Oliver Hauff 2022-01-22 18:28:01 +01:00
parent f38b516d25
commit 578fcee611
70 changed files with 6828 additions and 9625 deletions

View file

@ -42,9 +42,11 @@ namespace TINK.Services.BluetoothLock
/// <param name="doWaitRetry">True if to wait and retry in case of failures. </param>
/// <returns></returns>
Task<LockInfoTdo> GetLockStateAsync(bool doWaitRetry = false);
Task<bool> SetSoundAsync(SoundSettings settings);
Task<bool> SetAlarmSettingsAsync(AlarmSettings settings);
Task<bool> GetIsAlarmOffAsync();
Task SetIsAlarmOffAsync(bool isActivated);

View file

@ -36,23 +36,32 @@ namespace TINK.Services.BluetoothLock
Task<LockingState> DisconnectAsync(int bikeId, Guid bikeGuid);
}
/// <summary> Alarm types types. </summary>
/// <remarks> Api-doc v29.0 </remarks>
public enum AlarmSettings
{
SmallSensivity = 2,
SmallSensivitySilent = 3,
SmallSensitivityPrealarm = 22,
MediumSensivity = 4,
MediumSensivitySilent = 0x05,
MediumSensivityPrealarm = 0x24,
HightestSensivity = 0x10,
HightestSensivitySilent = 0x11,
HightestSensivityPrealarm = 0x30,
}
/// <summary> Sound types. </summary>
/// <remarks>
/// 1. Locking process started: One long beep.
/// 2. Unlocking successful: One short beep.
/// 3. Bike moved while trying to lock: Three short beeps.
/// 4. Locking bolt blocked while locking: Three short beeps.
/// 5. Unable to unlock because locking bolt is blocked: Three short beeps.
/// </remarks>
/// <remarks> Api-doc v29.0 </remarks>
public enum SoundSettings
{
AllButOpenedSuccessfully, // Sounds: 1, 3, 4, 5
MovingBlocked = 1, // Sounds: 3, 4, 5
LockingStarted = 2, // Sounds: 1
AllOff = 3, // Mute
OpenedSuccessfully = 4, // Sounds: 2
LockingStartedOpenedSuccessfully = 5, // Sounds: 1, 2
AllOn = 6, // All sounds on
AllButLockingStarted = 7, // Sounds: 2, 3, 4, 5
OnLockingStartedWarn = 0x00,
Warn = 0x01,
LockingStarted = 0x02,
AllOff = 0x03, // Mute
OpenedSuccessfully = 0x04,
LockingStartedOpenedSuccessfully = 0x05,
AllOn = 0x06, // All sounds on
OpenedSuccessfullyWarn = 0x07,
}
}

View file

@ -52,6 +52,9 @@ namespace TINK.Services.BluetoothLock
public async Task<bool> SetSoundAsync(SoundSettings settings) =>
await Task.FromResult(false);
public async Task<bool> SetAlarmSettingsAsync(AlarmSettings settings) =>
await Task.FromResult(false);
/// <summary> Disconnect from bluetooth lock. </summary>
public Task Disconnect() =>
throw new NotImplementedException();