File tree Expand file tree Collapse file tree 4 files changed +11
-16
lines changed
Services/SmartThermo.Services.DeviceConnector Expand file tree Collapse file tree 4 files changed +11
-16
lines changed Original file line number Diff line number Diff line change 1
1
using Microsoft . Extensions . Logging ;
2
2
using NModbus ;
3
- using NModbus . Logging ;
4
3
using NModbus . Serial ;
5
4
using SmartThermo . Services . DeviceConnector . Enums ;
6
5
using SmartThermo . Services . DeviceConnector . Extensions ;
@@ -28,8 +27,8 @@ public class DeviceConnector : IDeviceConnector
28
27
29
28
#region Const
30
29
31
- private const int TimeStart = 3 ;
32
- private const int TimePeriod = 3 ;
30
+ private const int TimeStart = 1 ;
31
+ private const int TimePeriod = 10 ;
33
32
34
33
#endregion
35
34
@@ -193,15 +192,11 @@ private async void OnTimer(object state)
193
192
RegistersRequested ? . Invoke ( this , result ) ;
194
193
}
195
194
196
- private void StartTimer ( )
197
- {
198
- _timer . Change ( TimeSpan . FromSeconds ( TimeStart ) , TimeSpan . FromSeconds ( TimePeriod ) ) ;
199
- }
195
+ private void StartTimer ( )
196
+ => _timer . Change ( TimeSpan . FromSeconds ( TimeStart ) , TimeSpan . FromSeconds ( TimePeriod ) ) ;
200
197
201
- private void StopTimer ( )
202
- {
203
- _timer . Change ( Timeout . Infinite , Timeout . Infinite ) ;
204
- }
198
+ private void StopTimer ( )
199
+ => _timer . Change ( Timeout . Infinite , Timeout . Infinite ) ;
205
200
206
201
#endregion
207
202
}
Original file line number Diff line number Diff line change 1
1
using SmartThermo . Services . DeviceConnector . Enums ;
2
+ using SmartThermo . Services . DeviceConnector . Extensions ;
2
3
using SmartThermo . Services . DeviceConnector . Models ;
3
4
using System ;
4
5
using System . Collections . Generic ;
5
6
using System . Linq ;
6
7
using System . Threading ;
7
8
using System . Threading . Tasks ;
8
- using SmartThermo . Services . DeviceConnector . Extensions ;
9
9
10
10
namespace SmartThermo . Services . DeviceConnector
11
11
{
Original file line number Diff line number Diff line change 10
10
<Grid >
11
11
<ui : SimpleStackPanel Width =" 320" Spacing =" 16" >
12
12
<TextBlock Style =" {DynamicResource TitleTextBlockStyle}" >SmartThermo</TextBlock >
13
- <TextBlock >Версия прошивки - 0.5.2 </TextBlock >
13
+ <TextBlock >Версия прошивки - 0.5.3 </TextBlock >
14
14
<TextBlock TextWrapping =" WrapWithOverflow" >SmartThermo - это ПО для контроля, мониторинга и записи данных с датчиков температуры.</TextBlock >
15
15
</ui : SimpleStackPanel >
16
16
</Grid >
Original file line number Diff line number Diff line change 6
6
<UseWPF >true</UseWPF >
7
7
<EnableNETAnalyzers >true</EnableNETAnalyzers >
8
8
<EnforceCodeStyleInBuild >true</EnforceCodeStyleInBuild >
9
- <AssemblyVersion >0.5.2 .0</AssemblyVersion >
10
- <FileVersion >0.5.2 .0</FileVersion >
11
- <Version >0.5.2 </Version >
9
+ <AssemblyVersion >0.5.3 .0</AssemblyVersion >
10
+ <FileVersion >0.5.3 .0</FileVersion >
11
+ <Version >0.5.3 </Version >
12
12
<SatelliteResourceLanguages >ru-RU</SatelliteResourceLanguages >
13
13
</PropertyGroup >
14
14
You can’t perform that action at this time.
0 commit comments