]>
git.tdb.fi Git - r2c2.git/log
Mikko Rasa [Mon, 18 Nov 2013 14:44:33 +0000 (16:44 +0200)]
Remember discovered MFX locomotives across runs
Mikko Rasa [Fri, 15 Nov 2013 23:26:27 +0000 (01:26 +0200)]
Use a common implementation for the three different queues
Mikko Rasa [Fri, 15 Nov 2013 23:21:41 +0000 (01:21 +0200)]
Terminate the control thread if ArduControl device is not found
Mikko Rasa [Fri, 15 Nov 2013 23:20:59 +0000 (01:20 +0200)]
Move the sleep in ArduControl baud rate logic to the correct place
Mikko Rasa [Fri, 15 Nov 2013 23:01:39 +0000 (01:01 +0200)]
Implement an UI for importing locomotives from the driver
Mikko Rasa [Fri, 15 Nov 2013 22:44:31 +0000 (00:44 +0200)]
Base the train list item on MultiColumnItem
Mikko Rasa [Thu, 14 Nov 2013 17:29:52 +0000 (19:29 +0200)]
Display protocol in the train list
Mikko Rasa [Wed, 13 Nov 2013 06:28:22 +0000 (08:28 +0200)]
Store and export information about detected MFX locomotives
Mikko Rasa [Wed, 13 Nov 2013 06:19:03 +0000 (08:19 +0200)]
Add interface for importing detected locomotives from the driver
Mikko Rasa [Tue, 12 Nov 2013 19:49:51 +0000 (21:49 +0200)]
Detect and set arducontrol baud rate on startup
Mikko Rasa [Fri, 8 Nov 2013 22:48:59 +0000 (00:48 +0200)]
Add two new locomotives
The 3D models are still rough drafts, especially the BR 96. I'll make
better ones as time permits.
Mikko Rasa [Fri, 8 Nov 2013 19:39:26 +0000 (21:39 +0200)]
Fix and improve logic in MfxSearchTask
Mikko Rasa [Fri, 8 Nov 2013 18:27:18 +0000 (20:27 +0200)]
Move further stuff from the ArduControl main class into Task classes
Mikko Rasa [Fri, 8 Nov 2013 13:06:30 +0000 (15:06 +0200)]
Restructure ArduControl driver into more manageable units
The control thread main function was getting a bit unwieldy at over 200
lines.
Mikko Rasa [Thu, 7 Nov 2013 23:55:29 +0000 (01:55 +0200)]
Add basic MFX support to arducontrol driver
A lot of polishing is still needed. Locomotive discovery in particular
has several deficiencies.
Mikko Rasa [Thu, 7 Nov 2013 22:38:20 +0000 (00:38 +0200)]
Read power state from arducontrol device on startup
Mikko Rasa [Thu, 7 Nov 2013 22:23:32 +0000 (00:23 +0200)]
Add some more range checks in ArduControl and improve existing ones
Mikko Rasa [Thu, 7 Nov 2013 22:01:03 +0000 (00:01 +0200)]
Refer to things in the driver with abstract ids instead of addresses
Since different protocols can and do have overlapping address spaces, the
address alone isn't sufficient to identify a thing. Passing both address
and protocol in every function and signal would make the interface too
complicated.
At the moment only locomotives can have a protocol specified, but there's
no technical reason why other types of things couldn't have different
protocols as well.
Mikko Rasa [Thu, 7 Nov 2013 20:31:50 +0000 (22:31 +0200)]
Rename turnout/sensor_id fields in Track and Block to *_addr
That's what they really are. The *_id names would get in the way of what
I'm going to do next.
Mikko Rasa [Thu, 7 Nov 2013 20:29:56 +0000 (22:29 +0200)]
Use simpler logic when dealing with routes in TrackOffsetIter
Mikko Rasa [Thu, 7 Nov 2013 19:42:24 +0000 (21:42 +0200)]
Break link from the target track too before re-linking
Mikko Rasa [Thu, 7 Nov 2013 18:57:45 +0000 (20:57 +0200)]
Fix a logic error in arducontrol accessory control
Mikko Rasa [Thu, 7 Nov 2013 13:13:01 +0000 (15:13 +0200)]
Use a GLtk::Layout with FloatingArrangement to manage dialogs
Mikko Rasa [Wed, 6 Nov 2013 12:59:45 +0000 (14:59 +0200)]
Consider the expander area's with when autosizing TrainDialog
Mikko Rasa [Wed, 6 Nov 2013 12:59:02 +0000 (14:59 +0200)]
Keep the train list dialog up to date whem trains are added or removed
Mikko Rasa [Thu, 31 Oct 2013 23:10:57 +0000 (01:10 +0200)]
Add driver for my custom Arduino-based control device
Mikko Rasa [Wed, 30 Oct 2013 22:24:08 +0000 (00:24 +0200)]
Some variable cleanup
Mikko Rasa [Wed, 30 Oct 2013 22:21:57 +0000 (00:21 +0200)]
Detect conflicting blocks and avoid creating duplicate sensors
Mikko Rasa [Wed, 30 Oct 2013 22:19:40 +0000 (00:19 +0200)]
Turnout handling fixes
Add the turnout to driver when acquiring automatic id to avoid a key_error
later when removing it. Don't bother connecting to turnout_event signal
if the track is not actually a turnout.
Mikko Rasa [Wed, 30 Oct 2013 22:00:39 +0000 (00:00 +0200)]
Don't collide rays with unplaced vehicles
Mikko Rasa [Sun, 27 Oct 2013 15:28:44 +0000 (17:28 +0200)]
Remove things from the driver when no longer used
Mikko Rasa [Sun, 20 Oct 2013 13:04:24 +0000 (16:04 +0300)]
Allow objects to override the shape specified in their type
Mikko Rasa [Sun, 20 Oct 2013 11:58:59 +0000 (14:58 +0300)]
Create track length map in ExtendTool constructor
Mikko Rasa [Sun, 20 Oct 2013 11:57:23 +0000 (14:57 +0300)]
Correct some multiple inclusion guard defines
Mikko Rasa [Fri, 30 Aug 2013 19:18:47 +0000 (22:18 +0300)]
Use generic ObjectTypes in Catalogue
Mikko Rasa [Fri, 30 Aug 2013 18:56:20 +0000 (21:56 +0300)]
Use some template magic to deduce the proper 3D type
Mikko Rasa [Sat, 24 Aug 2013 13:59:47 +0000 (16:59 +0300)]
Turn object selection into a tool
Mikko Rasa [Sat, 24 Aug 2013 13:54:36 +0000 (16:54 +0300)]
Clean up old clutter from Designer
Mikko Rasa [Sat, 24 Aug 2013 13:49:16 +0000 (16:49 +0300)]
View3D::create_ray should be const
Mikko Rasa [Sat, 24 Aug 2013 12:43:43 +0000 (15:43 +0300)]
Give tools access to the keyboard
Mikko Rasa [Sat, 24 Aug 2013 08:37:18 +0000 (11:37 +0300)]
Refactor Designer::use_tool so tools don't need to take a set of objects
Mikko Rasa [Sat, 24 Aug 2013 08:14:21 +0000 (11:14 +0300)]
Move common accept/cancel handling to the Tool class
Mikko Rasa [Sat, 24 Aug 2013 07:48:34 +0000 (10:48 +0300)]
Fix some bugs in tools
Mikko Rasa [Mon, 19 Aug 2013 16:21:51 +0000 (19:21 +0300)]
Improve algorithms in several editing tools
Mikko Rasa [Mon, 19 Aug 2013 16:06:42 +0000 (19:06 +0300)]
Improve block recreation algorithms
These changes result in a more than 100% performance improvement in
operations that create and delete a lot of tracks, such as the extend
tool.
Mikko Rasa [Mon, 19 Aug 2013 14:37:08 +0000 (17:37 +0300)]
Split the Manipulator class into several Tools
It was getting a bit huge and unwieldy, especially with things like
terrain editing on the horizon. Not all tools need the same information
or in the same format.
Mikko Rasa [Thu, 15 Aug 2013 15:06:37 +0000 (18:06 +0300)]
Add a utility function to get path length from Track
This shortens the incantation to get the length of the active path.
Mikko Rasa [Wed, 14 Aug 2013 14:12:55 +0000 (17:12 +0300)]
Complete BR 50's rod setup
Mikko Rasa [Wed, 14 Aug 2013 14:08:20 +0000 (17:08 +0300)]
Support mirroring only a subset of rods based on a tag filter
Mikko Rasa [Sun, 11 Aug 2013 12:35:12 +0000 (15:35 +0300)]
Remove an unused enum from Vehicle
Mikko Rasa [Sun, 11 Aug 2013 12:33:46 +0000 (15:33 +0300)]
Immediately update rods when a vehicle is created
The initial positions are not guaranteed to, and usually do not satisfy
the constraints.
Mikko Rasa [Sun, 11 Aug 2013 12:28:13 +0000 (15:28 +0300)]
Rewrite rod simulation code
Instead of trying to get a perfect solution on the first try, solve rod
interconnection constraints iteratively. This simplifies the code and
allows for certain rod configurations that would have been prohibitively
difficult to solve exactly.
It's now also possible to create a mirrored set of rods on the other side
of the locomotive with a single statement.
Mikko Rasa [Fri, 9 Aug 2013 17:41:04 +0000 (20:41 +0300)]
Remove the now-unused async picking code from Engineer
Mikko Rasa [Fri, 9 Aug 2013 17:38:20 +0000 (20:38 +0300)]
Minor fixes
Mikko Rasa [Fri, 9 Aug 2013 17:35:37 +0000 (20:35 +0300)]
Move goto destination picking to RouterPanel
Mikko Rasa [Fri, 9 Aug 2013 16:39:05 +0000 (19:39 +0300)]
Add a utility class to display a TrackChain as a path
Mikko Rasa [Fri, 9 Aug 2013 10:54:57 +0000 (13:54 +0300)]
Use Widget::find_ancestor to reduce code duplication
Mikko Rasa [Fri, 9 Aug 2013 10:33:07 +0000 (13:33 +0300)]
Correct camera distance in side view
Mikko Rasa [Fri, 9 Aug 2013 10:32:14 +0000 (13:32 +0300)]
Avoid infinite loops in VehiclePlacement in certain situations
Mikko Rasa [Fri, 9 Aug 2013 10:31:28 +0000 (13:31 +0300)]
Fix a crash when reversing certain TrackOffsetIters
Mikko Rasa [Fri, 9 Aug 2013 10:30:30 +0000 (13:30 +0300)]
Reserve enough blocks for the entire train when placing
Mikko Rasa [Thu, 8 Aug 2013 16:13:39 +0000 (19:13 +0300)]
Better visualization for placing a train
Still far from perfect, but it's a start.
Mikko Rasa [Fri, 2 Aug 2013 14:58:45 +0000 (17:58 +0300)]
Fix allocation display when a train is chasing another
Mikko Rasa [Fri, 2 Aug 2013 14:55:48 +0000 (17:55 +0300)]
Split vehicle placement code to a separate class
I'm going to need this elsewhere soon.
Mikko Rasa [Thu, 25 Jul 2013 14:48:34 +0000 (17:48 +0300)]
Store all axles in a single array
Mikko Rasa [Thu, 25 Jul 2013 14:24:26 +0000 (17:24 +0300)]
Create a common base class for Vehicle3D parts
Mikko Rasa [Tue, 23 Jul 2013 13:43:20 +0000 (16:43 +0300)]
Properly detect blocks as critical when a train is not moving
Mikko Rasa [Tue, 23 Jul 2013 13:42:34 +0000 (16:42 +0300)]
Ignore path change events on currently occupied blocks
Mikko Rasa [Tue, 23 Jul 2013 13:41:35 +0000 (16:41 +0300)]
Avoid a temporary inconsistent state while reserving the first block
Mikko Rasa [Tue, 23 Jul 2013 13:40:35 +0000 (16:40 +0300)]
Use the tilt member in OrientedPoint in certain objects
Mikko Rasa [Tue, 23 Jul 2013 13:35:36 +0000 (16:35 +0300)]
Rename TrackPoint to a more generic OrientedPoint
The grade member was also changed to a tilt angle, which is a better match
to how Object orientation is specified.
Mikko Rasa [Mon, 22 Jul 2013 19:12:42 +0000 (22:12 +0300)]
Create another track iterator class that holds an offset as well
Mikko Rasa [Sun, 21 Jul 2013 15:25:59 +0000 (18:25 +0300)]
Make use of View3D in engineer
Mikko Rasa [Sat, 20 Jul 2013 16:03:17 +0000 (19:03 +0300)]
New approach for displaying track state
Paths can now be displayed over either rail in addition to the center of
the track. Track circuit and allocation state are displayed separately,
allowing more information to be shown.
Instead of pre-creating a path for each track, only create them as needed.
Local controller objects are much more manageable than bundling everything
into one giant class.
Mikko Rasa [Thu, 11 Jul 2013 11:40:13 +0000 (14:40 +0300)]
Add an out-of-bounds check to SpeedQuantizer::get_speed
Just in case the previous fix wasn't the only place that could generate
bogus values.
Mikko Rasa [Thu, 11 Jul 2013 11:38:23 +0000 (14:38 +0300)]
Fix uninitialized variables in Intellibox driver
Uninitialized pending_half_step caused wonky loco speed events to be
emitted, resulting in out-of-bounds access in speed quantizer.
Mikko Rasa [Wed, 10 Jul 2013 18:39:34 +0000 (21:39 +0300)]
Use beam gates for positioning vehicles
Mikko Rasa [Wed, 10 Jul 2013 17:31:22 +0000 (20:31 +0300)]
Refactor and fix vehicle positioning logic
Mikko Rasa [Wed, 10 Jul 2013 17:04:26 +0000 (20:04 +0300)]
Fix block releasing logic
The previous attempt didn't release any blocks if the last vehicle was
still behind the last active sensor, which is almost always the case. And
if it did manage to release anything, it would have released too much.
Mikko Rasa [Mon, 8 Jul 2013 22:10:23 +0000 (01:10 +0300)]
Move driver.add_sensor call where it belongs
Mikko Rasa [Mon, 8 Jul 2013 18:10:30 +0000 (21:10 +0300)]
Basic support for beam gate sensors
Mikko Rasa [Mon, 8 Jul 2013 17:17:03 +0000 (20:17 +0300)]
Support inverted sensors that give low output when active
Mikko Rasa [Mon, 8 Jul 2013 17:00:31 +0000 (20:00 +0300)]
Add a non-const overload of Layout3D::get_catalogue
This is necessary for automatic loading of resources.
Mikko Rasa [Mon, 8 Jul 2013 16:59:34 +0000 (19:59 +0300)]
Add a function to retrieve track attachments in order
Mikko Rasa [Mon, 8 Jul 2013 15:02:18 +0000 (18:02 +0300)]
Some more refactoring of BlockAllocator
Mikko Rasa [Sun, 7 Jul 2013 22:13:59 +0000 (01:13 +0300)]
Immediately update the matrix after creating an Object3D
This fixes a problem with the catalogue layout's contents being displayed
incorrectly.
Mikko Rasa [Sun, 7 Jul 2013 22:05:57 +0000 (01:05 +0300)]
Don't reset router to free run mode until allocator has deactivated
Setting route causes stop_at information to be cleared. If the allocator
is still active when this happens, it will allocate more blocks.
Mikko Rasa [Sun, 7 Jul 2013 21:59:27 +0000 (00:59 +0300)]
Refactor BlockAllocator to be more sensor-oriented
This is necessary for soon-to-be implemented beam gate sensors.
Mikko Rasa [Sun, 7 Jul 2013 21:23:32 +0000 (00:23 +0300)]
Keep TrackAttachment offset within allowed limits
Mikko Rasa [Sun, 7 Jul 2013 21:20:00 +0000 (00:20 +0300)]
Add a virtual get_block function to Sensor
Mikko Rasa [Sun, 7 Jul 2013 20:28:12 +0000 (23:28 +0300)]
Only create track circuits for blocks that need one
Mikko Rasa [Sun, 7 Jul 2013 13:43:40 +0000 (16:43 +0300)]
Remove a hack that is no longer necessary
Mikko Rasa [Sat, 6 Jul 2013 18:49:21 +0000 (21:49 +0300)]
Remove deprecated datafile statement aliases
Mikko Rasa [Sat, 6 Jul 2013 18:32:19 +0000 (21:32 +0300)]
Use generic objects in Layout3D
Mikko Rasa [Fri, 5 Jul 2013 15:32:13 +0000 (18:32 +0300)]
Prevent segfault during layout destruction
Mikko Rasa [Thu, 4 Jul 2013 20:51:15 +0000 (23:51 +0300)]
Add an abstraction for things that are attached to tracks
Mikko Rasa [Thu, 4 Jul 2013 19:33:42 +0000 (22:33 +0300)]
Use event-based matrix updates for objects
Mikko Rasa [Thu, 4 Jul 2013 19:13:04 +0000 (22:13 +0300)]
Introduce a tilt (vertical angle) property to Object
Mikko Rasa [Mon, 1 Jul 2013 13:38:59 +0000 (16:38 +0300)]
Complete rewrite of the engineer UI
The fixed column of train controls was getting unwieldy with lots of
trains, and side dialogs didn't move with their associated train panel.
Now, all dialogs are movable and train controls only appear when
requested. Most of the former side dialogs have been integrated into the
train dialog as tabs.
Mikko Rasa [Mon, 1 Jul 2013 10:44:06 +0000 (13:44 +0300)]
Further adjustments to changes in GLtk
Layout subclasses were transformed to Arrangements, and Lists and
Dropdowns work a bit differently.