Skip to content

Commit

Permalink
Rename internal variable
Browse files Browse the repository at this point in the history
  • Loading branch information
LucHeart committed Nov 14, 2024
1 parent 0604d26 commit 449123d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ShockOsc/Backend/BackendHubManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ await _chatboxService.SendRemoteControlMessage(log.Shocker.Name, sender.Name, se
break;
}
case ControlType.Vibrate:
pain.LastVibration = log.ExecutedAt;
pain.LastHeldAction = log.ExecutedAt;
break;
case ControlType.Stop:
pain.LastDuration = 0;
Expand Down
2 changes: 1 addition & 1 deletion ShockOsc/Models/ProgramGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public sealed class ProgramGroup
{
public DateTime LastActive { get; set; }
public DateTime LastExecuted { get; set; }
public DateTime LastVibration { get; set; }
public DateTime LastHeldAction { get; set; }
public DateTime PhysBoneGrabLimitTime { get; set; }
public ushort LastDuration { get; set; }
public byte LastIntensity { get; set; }
Expand Down
4 changes: 2 additions & 2 deletions ShockOsc/Services/ShockOsc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -552,10 +552,10 @@ private async Task CheckProgramGroup(ProgramGroup programGroup, Guid pos, Behavi
group => group.OverrideBoneHeldAction);

if (heldAction != BoneAction.None && programGroup.PhysBoneGrabLimitTime > DateTime.UtcNow &&
programGroup.LastVibration < DateTime.UtcNow.Subtract(TimeSpan.FromMilliseconds(100)))
programGroup.LastHeldAction < DateTime.UtcNow.Subtract(TimeSpan.FromMilliseconds(100)))
{
var pullIntensityTranslated = GetPhysbonePullIntensity(programGroup, programGroup.LastStretchValue);
programGroup.LastVibration = DateTime.UtcNow;
programGroup.LastHeldAction = DateTime.UtcNow;

_logger.LogDebug("Vibrating/Shocking {Shocker} at {Intensity}", pos, pullIntensityTranslated);

Expand Down

0 comments on commit 449123d

Please sign in to comment.