Subversion Repositories group.electronics

Rev

Rev 180 | Rev 187 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 180 Rev 181
Line 118... Line 118...
118
 
118
 
119
            // Return true to signal the panel to update the led
119
            // Return true to signal the panel to update the led
120
            return true;
120
            return true;
121
        }
121
        }
122
 
122
 
-
 
123
        public bool Tick(ref UInt16 shadow) {
-
 
124
 
-
 
125
            UInt16 data;
-
 
126
            UInt16 tmpshadow = shadow;
-
 
127
            if (Globals.BiosOutput.TryGetValue(this.address, out data)) {
-
 
128
                // Only continue if the data parm has changed
-
 
129
                if (data == this.prevdata)
-
 
130
                    return false;
-
 
131
                this.prevdata = data;
-
 
132
 
-
 
133
                this.value = (UInt16)((data & mask) >> shift);
-
 
134
 
-
 
135
                if (this.value == 1) {
-
 
136
                    Globals.setBit(ref shadow, this.pin);
-
 
137
                } else {
-
 
138
                    Globals.clearBit(ref shadow, this.pin);
-
 
139
                }
-
 
140
            }
-
 
141
 
-
 
142
            // Only update the led if the led value has changed
-
 
143
            if (tmpshadow == shadow)
-
 
144
                return false;
-
 
145
 
-
 
146
            // Return true to signal the panel to update the led
-
 
147
            return true;
-
 
148
        }
-
 
149
 
123
    }
150
    }
124
 
151
 
125
 
152
 
126
    public abstract class Control {
153
    public abstract class Control {
127
        public UInt64 value { get; set; }
154
        public UInt64 value { get; set; }