Fix bug when modifying slave position
authorLaurent Bessard
Wed, 19 Sep 2012 11:03:25 +0200
changeset 2077 14dfb786c53e
parent 2075 21eb91dc7071
child 2078 7d0ebbff1d08
Fix bug when modifying slave position
etherlab/etherlab.py
etherlab/plc_cia402node.c
--- a/etherlab/etherlab.py	Wed Sep 19 03:30:58 2012 +0200
+++ b/etherlab/etherlab.py	Wed Sep 19 11:03:25 2012 +0200
@@ -133,13 +133,12 @@
             self.CTNParent.SetSlaveAlias(position, value)
             return value, True
         
-        value, changed = ConfigTreeNode.SetParamsAttribute(self, path, value)
         # Filter IEC_Channel, Slave_Type and Alias that have specific behavior
         if path == "BaseParams.IEC_Channel":
             self.CTNParent.SetSlavePosition(position, value)
         
-        return value, changed
-
+        return ConfigTreeNode.SetParamsAttribute(self, path, value)
+    
     def GetSlaveInfos(self):
         return self.CTNParent.GetSlaveInfos(self.GetSlavePos())
     
--- a/etherlab/plc_cia402node.c	Wed Sep 19 03:30:58 2012 +0200
+++ b/etherlab/plc_cia402node.c	Wed Sep 19 11:03:25 2012 +0200
@@ -29,14 +29,14 @@
 	__SwitchedOn,
 	__OperationEnabled,
 	__QuickStopActive,
-	__FaultReactionActive,
-	__Fault,
+    __FaultReactionActive,
+    __Fault,
 } __CIA402NodeState;
 
 typedef struct {
 %(entry_variables)s
-	__CIA402NodeState state;
-	axis_s* axis;
+    __CIA402NodeState state;
+    axis_s* axis;
 } __CIA402Node;
 
 static __CIA402Node __CIA402Node_%(location)s;