<commit_before>function PickUp() {
    return {
        "teamNumber": teamNumber,
        "gameId": gameId,
        "eventName": "pickup",
        "type": null,
        "startTime": 1,// videoCurrentTime,
        "endTime": null,
        "timeTook": null,
        "location": null, // Can be: "low" || "high"
        "status": null, // Can be: "success" || "fail"
        "failReason": null // Can be: TODO: add fail reasons codes for shooting events
    }
}

var pickup = null;

function pickup_start() {
    pickup = PickUp();
    hideAllButtons();
    pickup_gearOrBall();
}

function pickup_gearOrBall() {
    fillEventsDivWithObjects([
        {
            type: 'button',
            value: 'Gear'
        },
        {
            type: 'button',
            value: 'Ball'
        }
    ], pickup_location);
}

function pickup_location(pickup_type) {
    pickup.type = pickup_type;
    if (pickup_type == 'Gear') {
        fillEventsDivWithObjects([
            {
                type: 'button',
                value: 'Floor'
            },
            {
                type: 'button',
                value: 'Feeder'
            }
        ], pickup_status);
    } else if (pickup_type == 'Ball') {
        fillEventsDivWithObjects([
            {
                type: 'button',
                value: 'Floor'
            },
            {
                type: 'button',
                value: 'Hopper'
            }
        ], pickup_status);
    }
}

function pickup_status(pickup_location) {
    pickup.location = pickup_location;
    fillEventsDivWithObjects([
        {
            type: 'button',
            value: 'Success'
        },
        {
            type:'select',
            value: ['Failure', 'Failed because of interruption', 'Failed because of mechanical failure']
        }
    ], pickup_finish);
}

function pickup_finish(pickup_status) {
    pickup.status = pickup_status;
    pickup.endTime = 10; //videoCurrentTime
    if (status === 'Success') {
        pickup.status = status;
    } else {
        pickup.status = 'Failure';
        pickup.failReason = status;<commit_msg>Fixed a bug in pickup events where event status was not sent correctly<commit_after>function PickUp() {
    return {
        "teamNumber": teamNumber,
        "gameId": gameId,
        "eventName": "pickup",
        "type": null,
        "startTime": 1,// videoCurrentTime,
        "endTime": null,
        "timeTook": null,
        "location": null, // Can be: "low" || "high"
        "status": null, // Can be: "success" || "fail"
        "failReason": null // Can be: TODO: add fail reasons codes for shooting events
    }
}

var pickup = null;

function pickup_start() {
    pickup = PickUp();
    hideAllButtons();
    pickup_gearOrBall();
}

function pickup_gearOrBall() {
    fillEventsDivWithObjects([
        {
            type: 'button',
            value: 'Gear'
        },
        {
            type: 'button',
            value: 'Ball'
        }
    ], pickup_location);
}

function pickup_location(pickup_type) {
    pickup.type = pickup_type;
    if (pickup_type == 'Gear') {
        fillEventsDivWithObjects([
            {
                type: 'button',
                value: 'Floor'
            },
            {
                type: 'button',
                value: 'Feeder'
            }
        ], pickup_status);
    } else if (pickup_type == 'Ball') {
        fillEventsDivWithObjects([
            {
                type: 'button',
                value: 'Floor'
            },
            {
                type: 'button',
                value: 'Hopper'
            }
        ], pickup_status);
    }
}

function pickup_status(pickup_location) {
    pickup.location = pickup_location;
    fillEventsDivWithObjects([
        {
            type: 'button',
            value: 'Success'
        },
        {
            type:'select',
            value: ['Failure', 'Failed because of interruption', 'Failed because of mechanical failure']
        }
    ], pickup_finish);
}

function pickup_finish(pickup_status) {
    pickup.endTime = 10; //videoCurrentTime
    if (pickup_status === 'Success') {
        pickup.status = pickup_status;
    } else {
        pickup.status = 'Failure';
        pickup.failReason = pickup_status;
{'fraction_non_alphanumeric': 0.12367988735038724, 'fraction_numerical': 0.0014081201595869514, 'mean_word_length': 1.6422814631122133, 'pattern_counts': {'":': 20, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '16727', 'n_tokens_mistral': 1271, 'n_tokens_neox': 1209, 'n_words': 275}