4/12/2014, More Python

So I’ve mostly been working on the debug window for the python interface.  The idea of the debug window is that it allows a person programming the ruleset to see the current state of the pinball machine.  Comms and the rules can be stepped through one loop at a time, and solenoids can be individually fired to test wiring.  Here is a quick picture of the Debug window and what it looks like:

DebugWin

I’m planning on locking the frame size down a little bit better so the display looks more pleasant, but right now just working on getting the functionality.  Here is a quick walk through of the different frames.

Starting with the top most command frame.  It has choice boxes to either run or single step the rules thread and the communications thread.  The rules thread runs the rules for the pinball game.  During play it would add scores for switches being hit, play sounds, change the mode of the game, turn on/off light bulbs, etc.  The communications thread reads the switch inputs from input and solenoid cards and can send commands to solenoid cards to fire a solenoid or change its configuration.  The last box lists the state of the game such as attract mode, game running, multiball mode, etc.  The mode labels are written by whoever writes the ruleset.

Next section has the cards that are in the system.  The rulesData.py file contains a list of cards in the system.  The python script uses the INV_ADDR_LIST to populate the cards.

The input card lists the name for each of the sixteen inputs.  The debug window can simulate input pulses, or toggling the switch open or closed.  It lists the current status of the hardware card.

The next card is a solenoid card, and switch inputs can be simulated.  An additional pulse solenoid button is available to send a pulse to the solenoid to fire it.

The last card uses the NUM_LED_BRDS to list all the LED boards.  It lists the name of each individual bit, and the current status (on or off) is graphically shown.

That is about all that I have gotten finished this week.  Hopefully I’ll add some more stuff during the week, and actually start talking to the hardware cards.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s