updated event matrix

This commit is contained in:
Jonas Zeunert
2018-09-21 15:15:22 +02:00
parent 3f771d275e
commit 7c0989bb6b
2 changed files with 40 additions and 1 deletions

View File

@@ -4,187 +4,224 @@
{ {
"name" : "Out hole", "name" : "Out hole",
"address" : 16, "address" : 16,
"priority" : 1 "priority" : 1,
"deactivation_time" : 50
}, },
{ {
"name" : "Left outer exit canal", "name" : "Left outer exit canal",
"address" : 17, "address" : 17,
"priority" : 2 "priority" : 2
"deactivation_time" : 50
}, },
{ {
"name" : "Inner left canal", "name" : "Inner left canal",
"address" : 18, "address" : 18,
"priority" : 2 "priority" : 2
"deactivation_time" : 50
}, },
{ {
"name" : "Left flap contacts", "name" : "Left flap contacts",
"address" : 19, "address" : 19,
"priority" : 2 "priority" : 2
"deactivation_time" : 50
}, },
{ {
"name" : "Right flap contacts", "name" : "Right flap contacts",
"address" : 20, "address" : 20,
"priority" : 2 "priority" : 2
"deactivation_time" : 50
}, },
{ {
"name" : "Right inner canal", "name" : "Right inner canal",
"address" : 21, "address" : 21,
"priority" : 2 "priority" : 2
"deactivation_time" : 50
}, },
{ {
"name" : "Right central exit canal", "name" : "Right central exit canal",
"address" : 22, "address" : 22,
"priority" : 2 "priority" : 2
"deactivation_time" : 50
}, },
{ {
"name" : "Right kicker contact", "name" : "Right kicker contact",
"address" : 23, "address" : 23,
"priority" : 2 "priority" : 2
"deactivation_time" : 50
}, },
{ {
"name" : "Contacts", "name" : "Contacts",
"address" : 24, "address" : 24,
"priority" : 2 "priority" : 2
"deactivation_time" : 50
}, },
{ {
"name" : "1st moving target bottom left bank", "name" : "1st moving target bottom left bank",
"address" : 25, "address" : 25,
"priority" : 2 "priority" : 2
"deactivation_time" : 50
}, },
{ {
"name" : "2nd moving target bottom left bank", "name" : "2nd moving target bottom left bank",
"address" : 26, "address" : 26,
"priority" : 2 "priority" : 2
"deactivation_time" : 50
}, },
{ {
"name" : "3rd moving target bottom left bank", "name" : "3rd moving target bottom left bank",
"address" : 27, "address" : 27,
"priority" : 2 "priority" : 2
"deactivation_time" : 50
}, },
{ {
"name" : "4th moving target bottom left bank", "name" : "4th moving target bottom left bank",
"address" : 28, "address" : 28,
"priority" : 2 "priority" : 2
"deactivation_time" : 50
}, },
{ {
"name" : "Fixed special red target", "name" : "Fixed special red target",
"address" : 29, "address" : 29,
"priority" : 2 "priority" : 2
"deactivation_time" : 50
}, },
{ {
"name" : "Fixed special orange target", "name" : "Fixed special orange target",
"address" : 30, "address" : 30,
"priority" : 2 "priority" : 2
"deactivation_time" : 50
}, },
{ {
"name" : "1st moving target bottom right bank", "name" : "1st moving target bottom right bank",
"address" : 31, "address" : 31,
"priority" : 2 "priority" : 2
"deactivation_time" : 50
}, },
{ {
"name" : "2nd moving target bottom right bank", "name" : "2nd moving target bottom right bank",
"address" : 32, "address" : 32,
"priority" : 2 "priority" : 2
"deactivation_time" : 50
}, },
{ {
"name" : "3rd moving target bottom right bank", "name" : "3rd moving target bottom right bank",
"address" : 33, "address" : 33,
"priority" : 2 "priority" : 2
"deactivation_time" : 50
}, },
{ {
"name" : "Spinning target", "name" : "Spinning target",
"address" : 34, "address" : 34,
"priority" : 2 "priority" : 2
"deactivation_time" : 50
}, },
{ {
"name" : "1st button", "name" : "1st button",
"address" : 35, "address" : 35,
"priority" : 2 "priority" : 2
"deactivation_time" : 50
}, },
{ {
"name" : "2nd button", "name" : "2nd button",
"address" : 36, "address" : 36,
"priority" : 2 "priority" : 2
"deactivation_time" : 50
}, },
{ {
"name" : "3rd button", "name" : "3rd button",
"address" : 37, "address" : 37,
"priority" : 2 "priority" : 2
"deactivation_time" : 50
}, },
{ {
"name" : "4th button", "name" : "4th button",
"address" : 38, "address" : 38,
"priority" : 2 "priority" : 2
"deactivation_time" : 50
}, },
{ {
"name" : "5th button", "name" : "5th button",
"address" : 39, "address" : 39,
"priority" : 2 "priority" : 2
"deactivation_time" : 50
}, },
{ {
"name" : "1st moving target top central bank", "name" : "1st moving target top central bank",
"address" : 40, "address" : 40,
"priority" : 2 "priority" : 2
"deactivation_time" : 50
}, },
{ {
"name" : "2nd moving target top central bank", "name" : "2nd moving target top central bank",
"address" : 41, "address" : 41,
"priority" : 2 "priority" : 2
"deactivation_time" : 50
}, },
{ {
"name" : "3rd moving target top central bank", "name" : "3rd moving target top central bank",
"address" : 42, "address" : 42,
"priority" : 2 "priority" : 2
"deactivation_time" : 50
}, },
{ {
"name" : "4th moving target top central bank", "name" : "4th moving target top central bank",
"address" : 43, "address" : 43,
"priority" : 2 "priority" : 2
"deactivation_time" : 50
}, },
{ {
"name" : "5th moving target top central bank", "name" : "5th moving target top central bank",
"address" : 44, "address" : 44,
"priority" : 2 "priority" : 2
"deactivation_time" : 50
}, },
{ {
"name" : "1st fixed target", "name" : "1st fixed target",
"address" : 45, "address" : 45,
"priority" : 2 "priority" : 2
"deactivation_time" : 50
}, },
{ {
"name" : "2nd fixed target", "name" : "2nd fixed target",
"address" : 46, "address" : 46,
"priority" : 2 "priority" : 2
"deactivation_time" : 50
}, },
{ {
"name" : "Top left pop contact", "name" : "Top left pop contact",
"address" : 47, "address" : 47,
"priority" : 2 "priority" : 2
"deactivation_time" : 50
}, },
{ {
"name" : "Bottom right pop contact", "name" : "Bottom right pop contact",
"address" : 48, "address" : 48,
"priority" : 2 "priority" : 2
"deactivation_time" : 50
}, },
{ {
"name" : "5th fixed target", "name" : "5th fixed target",
"address" : 49, "address" : 49,
"priority" : 2 "priority" : 2
"deactivation_time" : 50
}, },
{ {
"name" : "4th fixed target", "name" : "4th fixed target",
"address" : 50, "address" : 50,
"priority" : 2 "priority" : 2
"deactivation_time" : 50
}, },
{ {
"name" : "3rd fixed target", "name" : "3rd fixed target",
"address" : 51, "address" : 51,
"priority" : 2 "priority" : 2
"deactivation_time" : 50
}, },
{ {
"name" : "Rising ball contact", "name" : "Rising ball contact",
"address" : 52, "address" : 52,
"priority" : 2 "priority" : 2
"deactivation_time" : 50
} }
] ]
} }

View File

@@ -58,6 +58,7 @@ void Detector::detect()
std::vector<char> Detector::check_inputs() std::vector<char> Detector::check_inputs()
{ {
std::vector<char> detected_addresses; std::vector<char> detected_addresses;
for(char pin = 0; pin < (INPUT_MATRIX_SIZE * INPUT_MATRIX_SIZE); pin++) for(char pin = 0; pin < (INPUT_MATRIX_SIZE * INPUT_MATRIX_SIZE); pin++)
{ {
if(input_gpio_interface->read_data(pin)) if(input_gpio_interface->read_data(pin))
@@ -66,6 +67,7 @@ std::vector<char> Detector::check_inputs()
detected_addresses.push_back(pin); detected_addresses.push_back(pin);
} }
} }
return detected_addresses; return detected_addresses;
} }