1
0
mirror of https://github.com/preble/libpinproc synced 2026-02-24 18:25:23 +01:00

pinproctest: Expanded YAML format to allow for fields inside of each PRSwitches/PRLamps/PRCoils entry. Added use of 'number' field. Added TZ.yaml.

This commit is contained in:
Adam Preble
2009-05-29 19:54:11 -04:00
parent 579d3532ea
commit f3a71b7a6f
3 changed files with 86 additions and 21 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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);
}
}