#!/usr/bin/env bash
#
# Build tests for FYSETC_S6
#

# exit on first failure
set -e

# Build examples
restore_configs
use_example_configs FYSETC/S6
opt_enable MEATPACK_ON_SERIAL_PORT_1
opt_set Y_DRIVER_TYPE TMC2209 Z_DRIVER_TYPE TMC2130
exec_test $1 $2 "FYSETC S6 Example" "$3"

#
# Build with FTDI Eve Touch UI and some features
#
restore_configs
opt_set MOTHERBOARD BOARD_FYSETC_S6_V2_0 SERIAL_PORT 1 X_DRIVER_TYPE TMC2130
opt_enable TOUCH_UI_FTDI_EVE LCD_FYSETC_TFT81050 S6_TFT_PINMAP LCD_LANGUAGE_2 SDSUPPORT CUSTOM_MENU_MAIN \
           FIX_MOUNTED_PROBE AUTO_BED_LEVELING_UBL Z_SAFE_HOMING \
           EEPROM_SETTINGS PRINTCOUNTER CALIBRATION_GCODE LIN_ADVANCE \
           FILAMENT_RUNOUT_SENSOR ADVANCED_PAUSE_FEATURE NOZZLE_PARK_FEATURE
exec_test $1 $2 "FYSETC S6 2 with LCD FYSETC TFT81050" "$3"

# cleanup
restore_configs
