diff --git a/examples/pinproctest/JD.yaml b/examples/pinproctest/JD.yaml index ef1c186..39ca4e5 100644 --- a/examples/pinproctest/JD.yaml +++ b/examples/pinproctest/JD.yaml @@ -10,20 +10,36 @@ PRBumpers: - slingL - slingR PRSwitches: - flipperLwR: 1 - flipperLwL: 3 - flipperUpR: 5 - flipperUpL: 7 - slingL: 96 - slingR: 97 + flipperLwR: + number: 1 + flipperLwL: + number: 3 + flipperUpR: + number: 5 + flipperUpL: + number: 7 + slingL: + number: 96 + slingR: + number: 97 PRCoils: - flipperLwRMain: 32 - flipperLwRHold: 33 - flipperLwLMain: 34 - flipperLwLHold: 35 - flipperUpRMain: 36 - flipperUpRHold: 37 - flipperUpLMain: 38 - flipperUpLHold: 39 - slingL: 54 - slingR: 55 + flipperLwRMain: + number: 32 + flipperLwRHold: + number: 33 + flipperLwLMain: + number: 34 + flipperLwLHold: + number: 35 + flipperUpRMain: + number: 36 + flipperUpRHold: + number: 37 + flipperUpLMain: + number: 38 + flipperUpLHold: + number: 39 + slingL: + number: 54 + slingR: + number: 55 \ No newline at end of file diff --git a/examples/pinproctest/TZ.yaml b/examples/pinproctest/TZ.yaml new file mode 100644 index 0000000..455ea82 --- /dev/null +++ b/examples/pinproctest/TZ.yaml @@ -0,0 +1,48 @@ +# P-ROC Game Description file for Twilight Zone +PRGame: + machineType: wpc +PRFlippers: + - flipperLwR + - flipperLwL + - flipperUpR + - flipperUpL +PRBumpers: + - slingL + - slingR +PRSwitches: + flipperLwR: + number: 1 + flipperLwL: + number: 3 + flipperUpR: + number: 5 + flipperUpL: + number: 7 + slingL: + number: 96 + slingR: + number: 97 +PRCoils: + flipperLwRMain: + number: 32 + flipperLwRHold: + number: 33 + flipperLwLMain: + number: 34 + flipperLwLHold: + number: 35 + flipperUpRMain: + number: 36 + flipperUpRHold: + number: 37 + flipperUpLMain: + number: 38 + flipperUpLHold: + number: 39 + slingL: + number: 54 + slingR: + number: 55 +PRLamps: + doorTheCamera: + number: 80 \ No newline at end of file diff --git a/examples/pinproctest/pinproctest.cpp b/examples/pinproctest/pinproctest.cpp index ac6e7d0..d3ee3dd 100644 --- a/examples/pinproctest/pinproctest.cpp +++ b/examples/pinproctest/pinproctest.cpp @@ -41,6 +41,7 @@ #define kBumpersSection "PRBumpers" #define kCoilsSection "PRCoils" #define kSwitchesSection "PRSwitches" +#define kNumberField "number" #define kFlipperPulseTime (34) // 34 ms #define kBumperPulseTime (25) // 25 ms @@ -243,9 +244,9 @@ void ConfigureSwitchRules(PRHandle proc, YAML::Node& yamlDoc) int swNum, coilMain, coilHold; std::string flipperName; *flippersIt >> flipperName; - yamlDoc[kSwitchesSection][flipperName] >> swNum; - yamlDoc[kCoilsSection][flipperName + "Main"] >> coilMain; - yamlDoc[kCoilsSection][flipperName + "Hold"] >> coilHold; + yamlDoc[kSwitchesSection][flipperName][kNumberField] >> swNum; + yamlDoc[kCoilsSection][flipperName + "Main"][kNumberField] >> coilMain; + yamlDoc[kCoilsSection][flipperName + "Hold"][kNumberField] >> coilHold; ConfigureWPCFlipperSwitchRule (proc, swNum, coilMain, coilHold, kFlipperPulseTime); } @@ -256,8 +257,8 @@ void ConfigureSwitchRules(PRHandle proc, YAML::Node& yamlDoc) // WPC Slingshots std::string bumperName; *bumpersIt >> bumperName; - yamlDoc[kSwitchesSection][bumperName] >> swNum; - yamlDoc[kCoilsSection][bumperName] >> coilNum; + yamlDoc[kSwitchesSection][bumperName][kNumberField] >> swNum; + yamlDoc[kCoilsSection][bumperName][kNumberField] >> coilNum; ConfigureBumperRule (proc, swNum, coilNum, kBumperPulseTime); } }