-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmatchInputPost.js
41 lines (35 loc) · 1.43 KB
/
matchInputPost.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
function postwith(to) {
var nums = {
'userName': document.getElementById('userName').value,
'matchNum': document.getElementById('matchNum').value,
'teamNum': document.getElementById('teamNum').value,
'allianceColor': document.getElementById('allianceColor').value,
'autoPath': JSON.stringify(coordinateList),
'crossLineA': document.getElementById('crossLineA').checked ? 1 : 0,
'upperGoal': upperGoal,
'upperGoalMiss': upperGoalMiss,
'lowerGoal': lowerGoal,
'lowerGoalMiss': lowerGoalMiss,
'upperGoalT': upperGoalT,
'upperGoalMissT': upperGoalT,
'lowerGoalT': lowerGoalT,
'lowerGoalMissT': lowerGoalMissT,
'climb': climb,
'climbTwo': climbTwo,
'climbThree': climbThree,
'climbFour': climbFour,
'issues': document.getElementById('issues').value,
'defenseBot': document.getElementById('defenseBot').checked ? 1 : 0,
'defenseComments': document.getElementById('defenseComments').value,
'matchComments': document.getElementById('matchComments').value,
'penalties': document.getElementById('penalties').value,
'cycleCount': cycleCount,
'teleopPath': JSON.stringify(coordinateList2),
'doNotPick': document.getElementById('doNotPick').checked ? 1 : 0
};
var id = document.getElementById('matchNum').value + "-" + document.getElementById('teamNum').value;
console.log(JSON.stringify(nums));
orangePersist.collection("avr").doc(id).set(nums);
$.post("dataHandler.php", nums).done(function (data) {
});
}