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
New Matrix signal mast connection #1345
Conversation
Copy files and classes Add imports Option in Add Signal Mast panel
Start bitNumSpinner at 1
Add label to matrix
Adf tooltip for on/off Correct DCC mast labels & Disabled for state (instead of 'Disable Aspect' action-like name)
Turnout names or beanhandles
Fix xml elements (error to change turnout state)
to set bitNum/char [ ] size
Remove OK button, replaced by Apply/Create
log.debug("Empty char[] received"); | ||
} | ||
for (int i = 0; i < BitNum; i++) { | ||
//if (bits[i] == '1' && getTurnoutBean(i).getCommandedState() == Turnout.THROWN) { // no need to set a state already set |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this point the program fails to interact with the Turnouts, so had to comment these 4 lines for the moment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this point the program fails to interact with the Turnouts, so had to comment these 4 lines for the moment
What goes wrong?
In general, it shouldn't hurt to set a ConmandedState to what it already is. Each individual implementation should handle that automatically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the Signal Mast Panel, when I select an Aspect for a mast with this driver, the drop down doesn't pop back, and the Edit button no longer responds. Turnouts are present. The Console says:
2016-05-24 07:40:27,743 ptionhandler.UncaughtExceptionHandler ERROR - Uncaught Exception caught by jmri.util.exceptionhandler.UncaughtExceptionHandler [AWT-EventQueue-0] java.lang.NullPointerException at jmri.implementation.MatrixSignalMast.getTurnoutBean(MatrixSignalMast.java:363) at jmri.implementation.MatrixSignalMast.updateOutputs(MatrixSignalMast.java:334) at jmri.implementation.MatrixSignalMast.setAspect(MatrixSignalMast.java:139) at jmri.jmrit.beantable.signalmast.SignalMastTableDataModel.setValueAt(SignalMastTableDataModel.java:173) at jmri.util.com.sun.TableSorter.setValueAt(TableSorter.java:320) at javax.swing.JTable.setValueAt(JTable.java:2741) at javax.swing.JTable.editingStopped(JTable.java:4723) at javax.swing.AbstractCellEditor.fireEditingStopped(AbstractCellEditor.java:141) at javax.swing.DefaultCellEditor$EditorDelegate.stopCellEditing(DefaultCellEditor.java:368) at javax.swing.DefaultCellEditor$3.stopCellEditing(DefaultCellEditor.java:158) at javax.swing.DefaultCellEditor.stopCellEditing(DefaultCellEditor.java:233) at javax.swing.DefaultCellEditor$EditorDelegate.actionPerformed(DefaultCellEditor.java:385) at javax.swing.JComboBox.fireActionEvent(JComboBox.java:1258) at javax.swing.JComboBox.setSelectedItem(JComboBox.java:586) at javax.swing.JComboBox.setSelectedIndex(JComboBox.java:622) at javax.swing.plaf.basic.BasicComboPopup$Handler.mouseReleased(BasicComboPopup.java:852) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290) at java.awt.Component.processMouseEvent(Component.java:6535) at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) at com.apple.laf.AquaComboBoxPopup$1.processMouseEvent(AquaComboBoxPopup.java:157) at java.awt.Component.processEvent(Component.java:6300) at java.awt.Container.processEvent(Container.java:2236) at java.awt.Component.dispatchEventImpl(Component.java:4891) at java.awt.Container.dispatchEventImpl(Container.java:2294) at java.awt.Component.dispatchEvent(Component.java:4713) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466) at java.awt.Container.dispatchEventImpl(Container.java:2280) at java.awt.Window.dispatchEventImpl(Window.java:2750) at java.awt.Component.dispatchEvent(Component.java:4713) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.awt.EventQueue$4.run(EventQueue.java:729) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
JUnit result file not found, this does not point at commit contents but test system. |
I've re-launched the AppVeyor build - seems as though it had a problem installing ant at the beginning of the run. (In case you're wondering, both Travis and AppVeyor start from completely fresh Virtual Machine instances on which the various dependencies have to be installed each time). |
Add docs Add @nonnull annotations Describe code fragment blocks meant for future options
The Output Matrix mast hopefully will help to configure special decoders designed for signals, like the Digirails DR4018. In this first edition, only turnouts can be configured as outputs. The decoder documentation will have to explain which patterns belong to each Aspect. Will add an example for this to the help page and update the applicable screen shots. Note that the universal OK button has been replaced by either a Create new button (like the Route Table) or the Apply button when editing an existing mast config. It's not possible to change the number of outputs in the matrix once a mast hast been saved. Outputs and the Unlit row can be changed later on by clicking the Edit button in the Mast table. |
Add tip for unLit config from Suzie x
Fix <img src=> links Add Signal Driver <a name=> tags in help
(debug tool, marked in code) Add SetReference() Alignment of panel checkboxes improved
Add matrix mast settings screen shot for DR4018
# Conflicts: # java/src/jmri/implementation/TurnoutSignalMast.java # java/src/jmri/jmrit/beantable/BeanTableBundle.properties # java/src/jmri/jmrit/beantable/BeanTableBundle_ca.properties # java/src/jmri/jmrit/beantable/BeanTableBundle_da.properties # java/src/jmri/jmrit/beantable/BeanTableBundle_de.properties # java/src/jmri/jmrit/beantable/BeanTableBundle_fr.properties # java/src/jmri/jmrit/beantable/BeanTableBundle_it.properties # java/src/jmri/jmrit/beantable/signalmast/AddSignalMastPanel.java
Introduced by merge
Ready for merge to master (for 4.5.1) now, please merge. |
Ready for merge to master (for 4.5.1) now, please merge.
Done. Thanks!
|
I've assembled a new type of mast driver + configuration panel following up on suggestions from the list. It let's one set a logical matrix (truth table) to define a set of 1 to maximum 5 outputs for a range of Aspects.
An exciting experiment, from idea to code, sometimes struggling to keep an overview of things... Lots of other fine tuning still to do: