class HeelController extends BasicController {
    constructor(model) {
        super(model);
    }

    changeBackPlateOrientation(e) {
        this.model.changeOrientation($(e.target).attr('data-orientation'), $(e.target).val(), $('[name="cable-exit"]:checked').val());
    }

    changeCableExitOrientation(e) {
        var $selectedOrientation = $('[name="back-plate"]:checked');
        return this.model.changeOrientation($selectedOrientation.attr('data-orientation'), $selectedOrientation.val(), $(e.target).val());
    }

    changeHeelInstance(e) {
        this.model.heelSourceInstance = $(e.target).val();
    }

    changeHeelOffset(e) {
        validateRange( $(e.target), 2, -180, 180, 0 );
        this.model.heelOffset = $(e.target).val();
    }

    changeHeelSource(e) {
        this.model.heelSource = $(e.target).val();
    }

    changeSensor(e) {
        this.model.useInternalSensor = $(e.target).val();
    }

    changeTrimInstance(e) {
        this.model.trimSourceInstance = $(e.target).val();
    }

    changeTrimOffset(e) {
        validateRange( $(e.target), 2, -180, 180, 0 );
        this.model.trimOffset = $(e.target).val();
    }

    changeTrimSource(e) {
        this.model.trimSource = $(e.target).val();
    }

    changeHeelCanbusDevice(e) {
        this.model.heelUniqueid = $(e.target).val();
        this.model.notifyAll();
    }

    changeTrimCanbusDevice(e) {
        this.model.trimUniqueid = $(e.target).val();
        this.model.notifyAll();
    }
}