use of com.willwinder.universalgcodesender.model.events.AlarmEvent in project Universal-G-Code-Sender by winder.
the class ProcessedLinePrinter method UGSEvent.
@Override
public void UGSEvent(UGSEvent event) {
if (event instanceof CommandEvent) {
CommandEvent commandEvent = ((CommandEvent) event);
GcodeCommand command = commandEvent.getCommand();
if (commandEvent.getCommandEventType() == CommandEventType.COMMAND_COMPLETE) {
onCommandComplete(command);
} else if (commandEvent.getCommandEventType() == CommandEventType.COMMAND_SENT) {
onCommandSent(command);
} else if (commandEvent.getCommandEventType() == CommandEventType.COMMAND_SKIPPED) {
onCommandSkipped(command);
}
} else if (event instanceof AlarmEvent) {
System.err.println("Alarm: " + ((AlarmEvent) event).getAlarm().name());
}
}
Aggregations