Skip to content

Commit c0cba01

Browse files
committed
split lamp test into lamp/GI/flasher
1 parent a794f2d commit c0cba01

File tree

2 files changed

+33
-5
lines changed

2 files changed

+33
-5
lines changed

platforms/config.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -e
55
SDL_SHA=a8589a84226a6202831a3d49ff4edda4acab9acd
66
SDL_IMAGE_SHA=11154afb7855293159588b245b446a4ef09e574f
77
PINMAME_SHA=2346ed9951b33e83f3bdd46338a5d9cc4707757c
8-
LIBPPUC_SHA=1948c8d7fb8b41b035e971ccae94f34142edd8d7
8+
LIBPPUC_SHA=29b70af6a81e3aaf5a9c676e18eb163d427c2e97
99
LIBDMDUTIL_SHA=5c916d53f5ff6535a1403f6734218550ca2a7e87
1010

1111

src/ppuc.cpp

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,12 @@ static struct cag_option options[] = {
149149
{.identifier = '0', .access_name = "switch-test", .value_name = NULL, .description = "Run switch test"},
150150
{.identifier = '1', .access_name = "coil-test", .value_name = NULL, .description = "Run coil test"},
151151
{.identifier = '2', .access_name = "lamp-test", .value_name = NULL, .description = "Run lamp test"},
152+
{.identifier = '3', .access_name = "gi-test", .value_name = NULL, .description = "Run lamp test"},
153+
{.identifier = '4', .access_name = "flasher-test", .value_name = NULL, .description = "Run flasher test"},
154+
{.identifier = '5',
155+
.access_name = "number",
156+
.value_name = "VALUE",
157+
.description = "Specifiy a specific number for coil/lamp/GI/flasher test"},
152158
{.identifier = 'D',
153159
.access_name = "translite",
154160
.value_name = "VALUE",
@@ -497,6 +503,9 @@ int main(int argc, char** argv)
497503
bool opt_switch_test = false;
498504
bool opt_coil_test = false;
499505
bool opt_lamp_test = false;
506+
bool opt_gi_test = false;
507+
bool opt_flasher_test = false;
508+
uint8_t opt_number = 0;
500509
const char* opt_translite = NULL;
501510
const char* opt_translite_attract = NULL;
502511
bool opt_translite_window = false;
@@ -577,6 +586,15 @@ int main(int argc, char** argv)
577586
case '2':
578587
opt_lamp_test = true;
579588
break;
589+
case '3':
590+
opt_gi_test = true;
591+
break;
592+
case '4':
593+
opt_flasher_test = true;
594+
break;
595+
case '5':
596+
opt_number = atoi(cag_option_get_value(&cag_context));
597+
break;
580598
case 'D':
581599
opt_translite = cag_option_get_value(&cag_context);
582600
break;
@@ -750,24 +768,34 @@ int main(int argc, char** argv)
750768
}
751769

752770
ppuc->StartUpdates();
771+
ppuc->SetSolenoidState(ppuc->GetGameOnSolenoid(), 1);
753772

754773
if (opt_lamp_test)
755774
{
756-
ppuc->LampTest();
775+
ppuc->LampTest(opt_number);
776+
}
777+
778+
if (opt_gi_test)
779+
{
780+
ppuc->GITest(opt_number);
781+
}
782+
783+
if (opt_flasher_test)
784+
{
785+
ppuc->FlasherTest(opt_number);
757786
}
758787

759788
if (opt_coil_test)
760789
{
761-
ppuc->SetSolenoidState(ppuc->GetGameOnSolenoid(), 1);
762-
ppuc->CoilTest();
763-
ppuc->SetSolenoidState(ppuc->GetGameOnSolenoid(), 0);
790+
ppuc->CoilTest(opt_number);
764791
}
765792

766793
if (opt_switch_test)
767794
{
768795
ppuc->SwitchTest();
769796
}
770797

798+
ppuc->SetSolenoidState(ppuc->GetGameOnSolenoid(), 0);
771799
ppuc->StopUpdates();
772800
ppuc->Disconnect();
773801

0 commit comments

Comments
 (0)