File tree Expand file tree Collapse file tree 2 files changed +10
-13
lines changed Expand file tree Collapse file tree 2 files changed +10
-13
lines changed Original file line number Diff line number Diff line change @@ -60,22 +60,19 @@ public void Update()
6060 {
6161 foreach ( var id in _signals . Keys )
6262 {
63- var newVal = _signal . GetValue ( id ) ;
64- var localVal = _signals [ id ] . Property . GetValue ( ) ;
65-
66- if ( ( newVal . Item2 > _lastUpdates [ id ] || _spec . Type == SignalType . WriteOnly )
67- && _spec . Type != SignalType . ReadOnly ) // only read from network if this signal is not a read-only signal
63+ var status = _signal . FetchStatus ( ( long ) id ) ;
64+ if ( status . HasFlag ( Signal . StatusFlags . SetRemote ) )
6865 {
69- // read value from network
70- if ( newVal . Item1 == null ) continue ;
71- _signals [ id ] . Property . SetObject ( newVal . Item1 ) ;
66+ // update local
67+ var value = _signal . GetValue ( id ) ;
68+ _signals [ id ] . Property . SetObject ( value . Item1 ) ;
7269 }
73- else if ( newVal . Item1 != localVal )
70+ else
7471 {
75- // push value to network
76- _signal . SetValue ( localVal , id ) ;
72+ //push local
73+ var value = _signals [ id ] . Property . GetValue ( ) ;
74+ _signal . SetValue ( value , id ) ;
7775 }
78- _lastUpdates [ id ] = _device . Time ;
7976 }
8077 }
8178
Original file line number Diff line number Diff line change 1616 </PropertyGroup >
1717
1818 <ItemGroup >
19- <PackageReference Include =" Mapper.NET" Version =" 2.4.6.3 " />
19+ <PackageReference Include =" Mapper.NET" Version =" 2.4.7-alpha2 " />
2020 <PackageReference Include =" Unity3D" Version =" 2.1.3" />
2121 </ItemGroup >
2222
You can’t perform that action at this time.
0 commit comments