Make component/script names match XML device names (specifically, serial and parallel, which used to be serialport and parallelport)
This commit is contained in:
parent
51c7b96f3c
commit
ded8f15e86
22 changed files with 913 additions and 925 deletions
|
|
@ -33,7 +33,7 @@ PDPjs is currently comprised of the following PDP-11 components, as listed in [p
|
|||
* [rk11.js](/modules/pdp11/lib/rk11.js)
|
||||
* [rl11.js](/modules/pdp11/lib/rl11.js)
|
||||
* [rom.js](/modules/pdp11/lib/rom.js)
|
||||
* [serialport.js](/modules/pdp11/lib/serialport.js)
|
||||
* [serial.js](/modules/pdp11/lib/serial.js)
|
||||
|
||||
Since this module was written in 2016, it seemed appropriate to start adopting some of the more useful features of
|
||||
[ECMAScript](http://www.ecma-international.org/ecma-262/6.0/index.html) 2015 (aka ES6), including:
|
||||
|
|
|
|||
|
|
@ -210,20 +210,6 @@ function initMachine(xml)
|
|||
|
||||
var component = aComponents[iComponent], sDeviceName = component.name;
|
||||
|
||||
/*
|
||||
* TODO: Should I change the component names serialport and parallelport to serial and parallel?
|
||||
*
|
||||
* The XML device names are currently serial and parallel. I'm tempted to rev the XML device names
|
||||
* (eg, to serialport and parallelport) and leave the component names (and corresponding script filenames)
|
||||
* alone, but until then, we must manually remap these component names to their XML device names.
|
||||
*
|
||||
* I actually prefer camelCase and XML device names serialPort and parallelPort (not to mention chipSet),
|
||||
* but that would require changing the script filenames (eg, to serialPort.js and parallelPort.js), since
|
||||
* our list of component names is derived from the list of script filenames in package.json.
|
||||
*/
|
||||
if (sDeviceName == "serialport") sDeviceName = "serial";
|
||||
if (sDeviceName == "parallelport") sDeviceName = "parallel";
|
||||
|
||||
var aDevices = machine[sDeviceName], iDevice;
|
||||
|
||||
if (aDevices) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue