Skip to content
This repository has been archived by the owner on Sep 25, 2024. It is now read-only.

Commit

Permalink
Removing context menu stuff, that isn't need
Browse files Browse the repository at this point in the history
Change default alert to 0 which disables it
  • Loading branch information
RaithSphere committed Jun 27, 2022
1 parent fb1d640 commit fbb895b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 167 deletions.
1 change: 1 addition & 0 deletions HRM-Windows/HeartRate/CytraX.HeartRate.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
<Compile Include="User32.cs" />
<EmbeddedResource Include="HeartRateForm.resx">
<DependentUpon>HeartRateForm.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
Expand Down
166 changes: 3 additions & 163 deletions HRM-Windows/HeartRate/HeartRateForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions HRM-Windows/HeartRate/HeartRateForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,6 @@ private void Service_HeartRateUpdatedCore(HeartRateReading reading)
var bpm = reading.BeatsPerMinute;
var status = reading.Status;
var HRV = reading.RRIntervals;

decimal HeartRateVariability = 0;
var BatteryPercent = "0";
bool isConnected = true;

Expand All @@ -217,9 +215,13 @@ private void Service_HeartRateUpdatedCore(HeartRateReading reading)
}

if (HRV == null || HRV.Length == 0)
{
WebSocketComponent.SendMessage(hrmData = ($"{bpm,-4:D}.{HeartRateVariance,8:##0.0000}.{BatteryPercent,-4:D}.") + (isConnected ? "1" : "0"));
}
else
{
WebSocketComponent.SendMessage(hrmData = ($"{bpm,-4:D}.{HeartRateVariance,8:##0.0000}.{BatteryPercent,-4:D}.") + (isConnected ? "1" : "0"));
}

var isDisconnected = bpm == 0 ||
status == ContactSensorStatus.NoContact;
Expand Down
4 changes: 2 additions & 2 deletions HRM-Windows/HeartRate/HeartRateSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ public static HeartRateSettings CreateDefault(string filename)
UIWindowSizeX = 300,
UIWindowSizeY = 102,
UITextAlignment = ContentAlignment.MiddleCenter,
WarnLevel = 95,
AlertLevel = 100,
WarnLevel = 0,
AlertLevel = 0,
AlertTimeout = TimeSpan.FromMinutes(2),
DisconnectedTimeout = TimeSpan.FromSeconds(10),
Color = Color.LightBlue,
Expand Down

0 comments on commit fbb895b

Please sign in to comment.