Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Editor/Scripts/ProductData/ProductDataViewer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ private void OnSelectionChange()
private void GetPayloadTagData(PayloadTag payloadTag)
{
_payloadTag = payloadTag;
_directories = ProductDataDirectoryManager.Instance.GetValidDataDirectories(payloadTag.DirecotryId);
_directories = ProductDataDirectoryManager.Instance.GetValidDataDirectories(payloadTag.DirectoryId);
if (_directories.Count == 0) return;
_dropdownFieldDirectory.choices = _directories.Select(directory => directory.Name).ToList();
_dropdownFieldDirectory.value = _directories[0].Name;
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Scripts/Components/Cylinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ private void OnValidate()
_plus.OnValidate();
}

private void Reset()
public void Reset()
{
_link = new Link
{
Expand Down
4 changes: 3 additions & 1 deletion Runtime/Scripts/Components/Device.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

namespace OC.Components
{
[SelectionBase]
[DisallowMultipleComponent]
public abstract class Device : MonoComponent, IDevice
{
public Link Link => _link;
Expand All @@ -16,7 +18,7 @@ protected void Start()
_link.Initialize(this);
}

protected virtual void Reset()
public virtual void Reset()
{
_link = new Link
{
Expand Down
4 changes: 3 additions & 1 deletion Runtime/Scripts/Components/DeviceDWord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

namespace OC.Components
{
[SelectionBase]
[DisallowMultipleComponent]
[DefaultExecutionOrder(100)]
public abstract class DeviceDWord : MonoComponent, IDevice
{
Expand All @@ -17,7 +19,7 @@ protected void Start()
_link.Initialize(this);
}

private void Reset()
public void Reset()
{
_link = new LinkDataDWord
{
Expand Down
4 changes: 3 additions & 1 deletion Runtime/Scripts/Components/DeviceWord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

namespace OC.Components
{
[SelectionBase]
[DisallowMultipleComponent]
[DefaultExecutionOrder(100)]
public abstract class DeviceWord : MonoComponent, IDevice
{
Expand All @@ -17,7 +19,7 @@ protected void Start()
_link.Initialize(this);
}

private void Reset()
public void Reset()
{
_link = new LinkDataWord
{
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Scripts/Components/Drive.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ private void Start()
_stateObserver.IsActive.OnValueChanged += value => OnActiveChanged?.Invoke(value);
}

protected void Reset()
public void Reset()
{
_link = new LinkDataFloat
{
Expand Down
9 changes: 0 additions & 9 deletions Runtime/Scripts/Components/IPropertyForce.cs

This file was deleted.

11 changes: 0 additions & 11 deletions Runtime/Scripts/Components/IPropertyForce.cs.meta

This file was deleted.

4 changes: 3 additions & 1 deletion Runtime/Scripts/Components/LinkByte.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

namespace OC.Components
{
[SelectionBase]
[DisallowMultipleComponent]
[AddComponentMenu("Open Commissioning/Links/Link Byte")]
public class LinkByte : MonoComponent, IDevice
{
Expand Down Expand Up @@ -33,7 +35,7 @@ private void Start()
Link.Initialize(this);
}

private void Reset()
public void Reset()
{
_link = new LinkDataByte
{
Expand Down
2 changes: 2 additions & 0 deletions Runtime/Scripts/Components/MeasurementEncoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

namespace OC.Components
{
[SelectionBase]
[DisallowMultipleComponent]
public class MeasurementEncoder : MonoBehaviour, IMeasurement<float>
{
public IPropertyReadOnly<float> Value => _value;
Expand Down
2 changes: 2 additions & 0 deletions Runtime/Scripts/Components/Robot6R.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

namespace OC.Components
{
[SelectionBase]
[DisallowMultipleComponent]
[AddComponentMenu("Open Commissioning/Actor/Robot 6R")]
public class Robot6R : MonoComponent, IDevice
{
Expand Down
5 changes: 2 additions & 3 deletions Runtime/Scripts/Components/SensorBinary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,16 @@ private void Start()
Initialize();
}

private void Reset()
public void Reset()
{
_link = new Link
{
Type = "FB_SensorBinary"
};
}

private new void OnValidate()
private void OnValidate()
{
base.OnValidate();
Initialize();
OnStateChanged(_state.Value);
_length.OnValidate();
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Scripts/Components/SignalBinary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private void Start()
OnValueChanged(_value.Value);
}

private void Reset()
public void Reset()
{
_link = new Link
{
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Scripts/Components/TagReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ private void Start()
Initialize();
}

private void Reset()
public void Reset()
{
_link = new LinkDataLWord
{
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Scripts/Components/Transport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ private void FixedUpdate()
MoveSurface(_value.Value);
}

protected void Reset()
public void Reset()
{
gameObject.layer = LayerMask.NameToLayer("Transport");
OnValidate();
Expand Down
4 changes: 2 additions & 2 deletions Runtime/Scripts/Data/DictionaryItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ public DictionaryItem(string key, string value)

public void Set(DictionaryItem other)
{
_key = other._key;
_value = other._value;
_key = other.Key;
_value = other.Value;
}
}
}
2 changes: 1 addition & 1 deletion Runtime/Scripts/Data/ProductDataFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static void CreateProductData(this PayloadTag payloadTag, Dictionary<stri
{
try
{
foreach (var directoryId in payloadTag.DirecotryId)
foreach (var directoryId in payloadTag.DirectoryId)
{
if (!ProductDataDirectoryManager.Instance.Contains(directoryId))
{
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Scripts/Interactions/Button.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ private void OnValidate()
}
}

protected override void Reset()
public override void Reset()
{
_link = new Link
{
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Scripts/Interactions/Interaction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ protected void OnDestroy()
OnDestroyAction?.Invoke();
}

private void Reset()
public void Reset()
{
BoundBoxColliderSize();
gameObject.layer = (int)DefaultLayers.Interactions;
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Scripts/Interactions/Lamp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ private void OnDestroy()
_value.OnValueChanged -= OnOnValueChangedAction;
}

protected override void Reset()
public override void Reset()
{
_link = new Link
{
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Scripts/Interactions/Lock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ protected void Start()
_link.Initialize(this);
}

protected void Reset()
public void Reset()
{
_link = new LinkDataByte
{
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Scripts/Interactions/PanelSampler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ private void Start()
CheckSlots();
}

private void Reset()
public void Reset()
{
_link = new LinkDataDWord
{
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Scripts/Interactions/Switch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ protected void OnDisable()
_index.OnValueChanged -= IndexChanged;
}

protected override void Reset()
public override void Reset()
{
_link = new Link
{
Expand Down
Loading