private void handleMotorEnter(final InputEvent event) throws Exception {
//private void handleEnter(ActionEvent event) throws Exception {
final KeyEvent keyEvent = (KeyEvent) event;
if (keyEvent.getCode().equals(KeyCode.ENTER)) {
TextField tf = (TextField) event.getSource();
Motor _motor = TinygDriver.getInstance().machine.getMotorByNumber((motorTabPane.getSelectionModel().getSelectedItem().getText().toLowerCase().split(" "))[1]);
//TODO: move the applyHardwareMotorSettings to this controller vs TinyGDriver.
try {
tgfx.Main.postConsoleMessage("[+]Applying "+ tf.getId()+ ":"+ tf.getText()+"... \n");
TinygDriver.getInstance().applyHardwareMotorSettings(_motor, tf);
} catch (NumberFormatException ex) {
tgfx.Main.postConsoleMessage("[!]" + tf.getText() +" is an invalid Setting Entered.. Ignoring.");
logger.error(ex.getMessage());
TinygDriver.getInstance().queryHardwareSingleMotorSettings(_motor.getId_number()); //This will reset the input that was bad to the current settings
}
}
}