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

Added example code to configure custom Driver Boards if the YAML's machineType field is 'custom'.

This commit is contained in:
Gerry Stellenberg
2011-06-11 20:48:49 -05:00
parent ed8f768ae2
commit a488ad7ae7
3 changed files with 242 additions and 2 deletions

View File

@@ -204,6 +204,8 @@ int main(int argc, const char **argv)
machineType = kPRMachineSternWhitestar;
else if(machineTypeString == "sternSAM")
machineType = kPRMachineSternSAM;
else if(machineTypeString == "custom")
machineType = kPRMachineCustom;
else
{
fprintf(stderr, "Unknown machine type: %s\n", machineTypeString.c_str());
@@ -224,6 +226,7 @@ int main(int argc, const char **argv)
// Even if WPCAlphanumeric, configure the DMD at least to get frame events for
// timing purposes.
ConfigureDMD(proc);
if (machineType == kPRMachineCustom) ConfigureDrivers(proc);
ConfigureSwitches(proc, yamlDoc); // Notify host for all debounced switch events.
ConfigureSwitchRules(proc, yamlDoc); // Flippers, slingshots