").getPreferredSize().width; // NOI18N
@@ -143,29 +143,24 @@ public static int getPreferredWidth(int col) {
}
/**
- * Returns column class type.
+ * {@inheritDoc}
*/
@Override
public Class> getColumnClass(int col) {
switch (col) {
case LOCO_ID_COLUMN:
return LocoAddress.class;
- case CURRENT_BLOCK:
- return String.class;
- case BLOCK_DIR:
- return String.class;
case REVERSE_BLOCK_DIR_BUTTON_COLUMN:
return javax.swing.JButton.class;
+ case CURRENT_BLOCK:
+ case BLOCK_DIR:
case NEXT_BLOCK:
- return String.class;
case NEXT_SIGNAL:
- return String.class;
case NEXT_ASPECT:
+ case NEXT_ASPECT_ICON:
return String.class;
case SEND_CABSIG_COLUMN:
return Boolean.class;
- case NEXT_ASPECT_ICON:
- return String.class;
default:
log.error("no column class located");
return null;
@@ -173,9 +168,7 @@ public Class> getColumnClass(int col) {
}
/**
- * Boolean return to edit table cell or not.
- *
- * @return boolean
+ * {@inheritDoc}
*/
@Override
public boolean isCellEditable(int row, int col) {
@@ -193,6 +186,7 @@ public boolean isCellEditable(int row, int col) {
*
* This is optional, in that other table formats can use this table model.
* But we put it here to help keep it consistent.
+ * @param cmdStatTable Table to be configured
*/
public void configureTable(JTable cmdStatTable) {
// allow reordering of the columns
@@ -210,10 +204,7 @@ public void configureTable(JTable cmdStatTable) {
}
/**
- * Return table values.
- *
- * @param row int row number
- * @param col int col number
+ * {@inheritDoc}
*/
@Override
public Object getValueAt(int row, int col) {
@@ -276,9 +267,6 @@ public Object getValueAt(int row, int col) {
// should start at the resources directory
return newlink;
}
- else {
- return "";
- }
}
return "";
case SEND_CABSIG_COLUMN:
@@ -290,35 +278,27 @@ public Object getValueAt(int row, int col) {
}
/**
- * @param value object value
- * @param row int row number
- * @param col int col number
+ * {@inheritDoc}
*/
@Override
public void setValueAt(Object value, int row, int col) {
- if (col == LOCO_ID_COLUMN) {
- }
- else if (col == CURRENT_BLOCK) {
- }
- else if (col == BLOCK_DIR) {
- }
- else if (col == REVERSE_BLOCK_DIR_BUTTON_COLUMN) {
- cabSignalManager.getCabSignalArray()[row].setBlock();
- chngblockdir(row);
- }
- else if (col == NEXT_BLOCK) {
- jmri.util.ThreadingUtil.runOnLayout( ()->{
- BlockManager bmgr = jmri.InstanceManager.getDefault(jmri.BlockManager.class);
- Block b = bmgr.getBlock((String)value);
- cabSignalManager.getCabSignalArray()[row].setBlock(b);
- });
- }
- else if (col == NEXT_SIGNAL) {
- }
- else if (col == NEXT_ASPECT) {
- }
- else if (col == SEND_CABSIG_COLUMN) {
- cabSignalManager.getCabSignalArray()[row].setCabSignalActive((Boolean) value);
+ switch (col) {
+ case REVERSE_BLOCK_DIR_BUTTON_COLUMN:
+ cabSignalManager.getCabSignalArray()[row].setBlock();
+ chngblockdir(row);
+ break;
+ case NEXT_BLOCK:
+ jmri.util.ThreadingUtil.runOnLayout( ()->{
+ BlockManager bmgr = jmri.InstanceManager.getDefault(jmri.BlockManager.class);
+ Block b = bmgr.getBlock((String)value);
+ cabSignalManager.getCabSignalArray()[row].setBlock(b);
+ });
+ break;
+ case SEND_CABSIG_COLUMN:
+ cabSignalManager.getCabSignalArray()[row].setCabSignalActive((Boolean) value);
+ break;
+ default:
+ break;
}
}
@@ -329,7 +309,7 @@ else if (col == SEND_CABSIG_COLUMN) {
*/
private void chngblockdir(int row){
log.debug("changing block direction for row {}", row);
- int olddirection = 0;
+ int olddirection;
Block b = cabSignalManager.getCabSignalArray()[row].getBlock();
if (b == null){
cabSignalManager.getCabSignalArray()[row].setBlock();
diff --git a/java/test/jmri/implementation/MatrixSignalMastTest.java b/java/test/jmri/implementation/MatrixSignalMastTest.java
index f9d27241b5c..9ecfdae99c3 100644
--- a/java/test/jmri/implementation/MatrixSignalMastTest.java
+++ b/java/test/jmri/implementation/MatrixSignalMastTest.java
@@ -157,6 +157,7 @@ public void testAspects() {
m.setAspectEnabled("Approach");
m.setAspectEnabled("Stop");
m.setAspectEnabled("Unlit");
+ m.resetPreviousStates(false);
m.aspect = "Stop"; // define some initial aspect before setting any aspect
m.setMatrixMastCommandDelay(0);
diff --git a/scripts/HOWTO-distribution.md b/scripts/HOWTO-distribution.md
index e3868012767..4b4a019bbb7 100644
--- a/scripts/HOWTO-distribution.md
+++ b/scripts/HOWTO-distribution.md
@@ -547,7 +547,7 @@ git push github
Test version 4.19.2 of JMRI/DecoderPro is available for download.
-This is the next in a series of test releases that will culminate in a production release, hopefully in early December 2019.
+This is the next in a series of test releases that will culminate in a production release, hopefully in early summer 2020.
- Alt: There have been a lot of updates in this version, so it should be considered experimental.
- Alt: We're getting close to the end of the development series, so we'd appreciate feedback on whether or not this release works for your layout.
diff --git a/web/js/jquery.jmri.js b/web/js/jquery.jmri.js
index 73e40cd7406..8d56d9b003f 100644
--- a/web/js/jquery.jmri.js
+++ b/web/js/jquery.jmri.js
@@ -950,8 +950,8 @@
var m = JSON.parse(e.originalEvent.data);
if ($.isArray(m)) {
- m.forEach(o => {
- h = jmri.events[o.type];
+ m.forEach(function(o) {
+ var h = jmri.events[o.type];
if (h) {
h.call(this, o);
} else if (!o.type) {
@@ -961,7 +961,7 @@
}
})
} else {
- h = jmri.events[m.type];
+ var h = jmri.events[m.type];
if (h) {
h.call(this, m);
} else if (!m.type) {
diff --git a/web/js/panel.js b/web/js/panel.js
index 544794ff9be..e475ad9e7ce 100644
--- a/web/js/panel.js
+++ b/web/js/panel.js
@@ -101,8 +101,8 @@ var jmri_logging = false;
//
// log object properties
-function $logProperties(obj, force = false) {
- if (jmri_logging || force) {
+function $logProperties(obj) {
+ if (jmri_logging) {
var $propList = "";
for (var $propName in obj) {
if (typeof obj[$propName] !== "undefined") {
@@ -128,7 +128,7 @@ function isDefined(x) {
class Decoration {
constructor($widget) {
//jmri.log("Decoration.constructor(...)");
- //$logProperties(this.$widget, true);
+ $logProperties(this.$widget);
this.$widget = $widget;
}
getEndPoints() {
@@ -1450,7 +1450,7 @@ function processPanelXML($returnedData, $success, $xhr) {
//store these blocks in a persistent var
$gBlks[$widget.systemName] = $widget;
//jmri.log("layoutblock:");
- //$logProperties($widget, true);
+ $logProperties($widget);
//jmri.log("block[" + $widget.systemName + "].blockcolor: '" + $widget.trackcolor + "'.")
jmri.getLayoutBlock($widget.systemName);
break;
@@ -1755,7 +1755,7 @@ function processPanelXML($returnedData, $success, $xhr) {
//loop thru raytracks, calc and store end of ray point for each
$widget['raytracks'] = $(this).find('raytrack');
$widget.raytracks.each(function(i, item) {
- //$logProperties(item, true);
+ $logProperties(item);
//note:the 50 offset is due to TrackSegment.java TURNTABLE_RAY_OFFSET
var rayID = $widget.ident + "." + (50 + item.attributes.index.value * 1);
var $t = {ident:rayID};
@@ -1935,7 +1935,7 @@ function $handleClick(e) {
var $turntableID = $rayID.split(".")[0];
var $widget = $gWidgets[$turntableID];
$widget.raytracks.each(function(i, item) {
- //$logProperties(item, true);
+ $logProperties(item);
//note:offset 50 is due to TrackSegment.java TURNTABLE_RAY_OFFSET
var rayID = $turntableID + "." + (50 + item.attributes.index.value * 1);
if (rayID == $rayID) {
@@ -2045,7 +2045,6 @@ function $drawTrackSegment($widget) {
if ($widget.hidden == "yes") {
return;
}
- //$logProperties($widget, true); //TODO: remove or comment out for production
// if positional points have not been loaded...
if (Object.keys($gPts).length == 0) {
@@ -2064,11 +2063,6 @@ function $drawTrackSegment($widget) {
return;
}
- // if ($widget.ident == "T5") {
- // //jmri.log("$widget.ident:" + $widget.ident);
- // $logProperties($widget, true);
- // }
-
$gCtx.save(); // save current line width and color
//set trackcolor based on blockcolor
@@ -2128,7 +2122,7 @@ function $drawTrackSegmentBezier($widget) {
//$point_log("points[0]", points[0]);
- $drawBezier(points);
+ $drawBezier(points, $gCtx.strokeStyle, $gCtx.lineWidth, 0);
}
function $drawTrackSegmentCircle($widget) {
@@ -2278,7 +2272,7 @@ function $drawIcon($widget) {
//draw a turntable (pass in widget)
//from jmri.jmrit.display.layoutEditor.layoutTurntable
function $drawTurntable($widget) {
- //$logProperties($widget, true);
+ $logProperties($widget);
//get the center
var $txcen = $widget.xcen * 1;
@@ -2294,7 +2288,7 @@ function $drawTurntable($widget) {
//loop thru raytracks drawing each one (and control circles if it has a turnout)
$widget.raytracks.each(function(i, item) {
- //$logProperties(item, true);
+ $logProperties(item);
var rayID = $widget.ident + "." + (50 + item.attributes.index.value * 1);
var $t = $gPts[rayID];
//draw the line from ray endpoint to turntable edge
@@ -3142,16 +3136,11 @@ function $drawEllipse(x, y, rw, rh, startAngleRAD, stopAngleRAD)
// $drawBezier
//
var bezier1st = true;
-function $drawBezier(points, $color, $width, displacement = 0) {
+function $drawBezier(points, $color, $width, displacement) {
$gCtx.save(); // save current line width and color
- // set color and width
- if (typeof $color !== "undefined") {
- $gCtx.strokeStyle = $color;
- }
- if (typeof $width !== "undefined") {
- $gCtx.lineWidth = $width;
- }
+ $gCtx.strokeStyle = $color;
+ $gCtx.lineWidth = $width;
try {
bezier1st = true;
@@ -3176,7 +3165,7 @@ function $drawBezier(points, $color, $width, displacement = 0) {
//
//plotBezier - recursive function to draw bezier curve
//
-function $plotBezier(points, depth = 0, displacement = 0) {
+function $plotBezier(points, depth, displacement) {
var len = points.length, idx, jdx;
// calculate flatness to determine if we need to recurse...
@@ -3274,7 +3263,7 @@ function $point_midpoint(p1, p2) {
return [$half(p1[0], p2[0]), $half(p1[1], p2[1])];
}
-function $point_normalizeTo(p, new_length = 1) {
+function $point_normalizeTo(p, new_length) {
var m = new_length / $point_length(p);
return [p[0] * m, p[1] * m];
}
@@ -3568,7 +3557,7 @@ var $setWidgetState = function($id, $newState, data) {
$id = slipID;
} else if ($id.startsWith("TUR")) {
//jmri.log("$setWidgetState(" + $id + ", " + $newState + ", " + data + ")");
- //$logProperties(data, true);
+ $logProperties(data);
var turntableID = $id.split(".")[0];
$widget = $gWidgets[turntableID];
@@ -3702,7 +3691,7 @@ jQuery.fn.xmlClean = function() {
//handle the toggling (or whatever) of the "next" state for the passed-in widget
var $getNextState = function($widget) {
var $nextState = undefined;
- //$logProperties($widget);
+ $logProperties($widget);
if ($widget.widgetType == 'signalheadicon') { //special case for signalheadicons
switch ($widget.clickmode * 1) { // logic based on SignalHeadIcon.java
case 0 :
@@ -3878,7 +3867,7 @@ function $redrawBlock(blockName) {
//loop thru widgets, if block matches, redraw widget by proper method
jQuery.each($gWidgets, function($id, $widget) {
///jmri.log(" $id: " + $id);
- //$logProperties($widget);
+ $logProperties($widget);
if (($widget.blockname == blockName)
|| ($widget.blocknameac == blockName)
|| ($widget.blocknamebd == blockName)
@@ -4014,7 +4003,7 @@ function updateBlockSensorState(blockName, sensorName, sensorState) {
// jmri.log("blockName: " + blockName
// + ", sensorName: " + sensorName
// + ", sensorState: " + sensorState);
-// $logProperties($blk, true);
+// $logProperties($blk);
if (isDefined($blk.occupancysensor)
&& ($blk.occupancysensor == sensorName)) {
$blk.state = sensorState;
diff --git a/xml/schema/types/signalmasts-2-9-6.xsd b/xml/schema/types/signalmasts-2-9-6.xsd
index f2210112c7e..c65d675542d 100644
--- a/xml/schema/types/signalmasts-2-9-6.xsd
+++ b/xml/schema/types/signalmasts-2-9-6.xsd
@@ -467,6 +467,13 @@
+
+
+
+ "yes" means that the dark turnout command should be sent before each new aspects turnout command
+
+
+