Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wip] initial support for pinotaur #1595

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions mpf/config_spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1105,6 +1105,19 @@ pkone:
debug: single|bool|false
console_log: single|enum(none,basic,full)|none
file_log: single|enum(none,basic,full)|basic
pinotaur:
__valid_in__: machine
__type__: config
debug: single|bool|false
console_log: single|enum(none,basic,full)|none
file_log: single|enum(none,basic,full)|basic
poll_hz: single|int|100
port: single|str|
baud: single|int|115200
motor_port1: single|enum(servo,stepper,stepper_continious,dc)|servo
motor_port2: single|enum(servo,stepper,stepper_continious,dc)|servo
last_rgb_num_bank1: single|int|64
last_rgb_num_bank2: single|int|128
pd_led_boards:
use_ws281x_0: single|bool|false
use_ws281x_1: single|bool|false
Expand Down
1 change: 1 addition & 0 deletions mpf/mpfconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ mpf:
light_segment_displays: mpf.platforms.light_segment_displays.LightSegmentDisplaysPlatform
pin2dmd: mpf.platforms.pin2dmd.Pin2DmdHardwarePlatform
visual_pinball_engine: mpf.platforms.visual_pinball_engine.visual_pinball_engine.VisualPinballEnginePlatform
pinotaur: mpf.platforms.pinotaur.pinotaur.PinotaurHardwarePlatform

paths:
scriptlets: scriptlets
Expand Down
1 change: 1 addition & 0 deletions mpf/platforms/pinotaur/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Pinotaur System."""
117 changes: 117 additions & 0 deletions mpf/platforms/pinotaur/defines.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
"""Interface defines for Pinotaur."""


class PinotaurDefines:

"""Pinotaur messages."""

GetConnectedHardware = 0x00
GetFirmwareVersion = 0x01
GetAPIVersion = 0x02
GetSimpleLampCount = 0x03
GetSolenoidCount = 0x04
GetModernLightCount = 0x09

GiStatus = 0x0A
GiChannelOn = 0x0B
GiChannelOff = 0x0C
GiAll = 0x0D
ReportCoilCurrent = 0x0F

SetCoilIdleCurrentMax = 0x10
SetHoldTime = 0x11
SetSolenoidPulsePWM = 0x12
SetSolenoidHoldPWM = 0x13
GetStatusSolenoid = 0x14
DisableSolenoid = 0x16
PulseSolenoid = 0x17
SetSolenoidPulseTime = 0x18
SetSolenoidRecycle = 0x19
PulseSolenoidPWM = 0x1A
SolenoidFuturePulse = 0x1B
SetCurrent = 0x1C

HardwareRuleSolenoid = 0x1E

ProfileCoils = 0x1D
SetupFlipperButton = 0x1E
SetSolenoidNext = 0x1F

SetRGBLight = 0x30
SetRGBBlink = 0x31
SetRGBPulse = 0x32
SetRGBStrobe = 0x33

SetBlinkSpeed = 0x34
SetStrobeSpeed = 0x35
SetChaseChild = 0x36
SetRGBFade = 0x37

SetBankLimits = 0x3A
UpdateFrequency = 0x3B
SetActualRGBCount = 0x3C
LightFrameDone = 0x3D
LoadLightShowFrame = 0x3E
LightShowControl = 0x3F

SetSwitchRamp = 0x50
SetSwitchDebounce = 0x51
SetSwitchClear = 0x52
SetReportType = 0x57
GetSwitchStatus = 0x58
GetChangedSwitches = 0x59
GetAllSwitches = 0x5A
SetAutoAction = 0x5B
ClearAutoAction = 0x5C
SetUpEOSSwitch = 0x5E
FlushChanged = 0x5F

RelayControl = 0x60
FlipperEnable = 0x61
FlipperBeastHold = 0x62
InitReset = 0x64
WatchDogFlag = 0x65
ClearCoil911 = 0x66
SetErrorTolerance48V = 0x67

StartLight = 0x6A
StartLightBlinkSpeed = 0x6B
LaunchLight = 0x6C
LaunchLightBlinkSpeed = 0x6D

CheckBootFaultFlag = 0x6F

ProfileAMotor = 0x40
GetLastMoveTime = 0x41
SetServoCurrentLimits = 0x42
ReadServoCurrent = 0x43
SetInrushGracePeriod = 0x44
ActionOnServoStall = 0x45
ReadLastSafePosition = 0x46
ReadMotorFaultFlags = 0x47

MotorBankType = 0x70
ReadMotorState = 0x71
MotorGotoSwitch = 0x72
StopMotor = 0x73
MoveDCMotor = 0x74
SetDCMotor = 0x75
ReadDCMotor = 0x76

MoveStepperMotor = 0x77
SetStepperMotorSpeed = 0x78
ReadStepperMotor = 0x79

SetServoMotor = 0x7A
Move180ServoMotor = 0x7B
MoveContServoMotor = 0x7C
ReadServoMotor = 0x7D
DisableServoMotor = 0x7E
ConfigServoMotors = 0x7F

GetBanksBCD = 0x20
SetBanksBCD = 0x21
EraseNVMRow = 0x25
ReadNVMRow = 0x28
SetNVMAddress = 0x2A
WriteNVMHalfPage = 0x2B
Loading