* along with LED Pattern Editor. If not, see <http://www.gnu.org/licenses/>.
*/
-class LedPattern : Object {
+abstract class LedPattern : Object {
enum ScreenOn {
DISPLAY_OFF = 0,
DISPLAY_ON = 1,
public double duration;
+ public abstract string dump ();
+ public abstract bool parse (string line);
+
public signal void changed ();
}
RESET_MUX,
SET_PWM,
RAMP_WAIT,
- REPEAT,
- STOP
+ GO_TO_START,
+ BRANCH,
+ END,
+ TRIGGER
}
class LedCommand : Object {
changed ();
}
+ public virtual void go_to_start () {
+ type = CommandType.GO_TO_START;
+ changed ();
+ }
+
+ public virtual void end (bool reset) {
+ type = CommandType.END;
+ steps = reset ? -255 : 0;
+ changed ();
+ }
+
public signal void changed ();
}