]> git.tdb.fi Git - r2c2.git/log
r2c2.git
10 years agoDon't wait for queued accessories if power is off
Mikko Rasa [Sat, 5 Apr 2014 14:42:28 +0000 (17:42 +0300)]
Don't wait for queued accessories if power is off

10 years agoFix an error in calculating curved TrackPart points
Mikko Rasa [Fri, 4 Apr 2014 16:59:03 +0000 (19:59 +0300)]
Fix an error in calculating curved TrackPart points

10 years agoPrefer is_turnout() when checking if a track is, in fact, a turnout
Mikko Rasa [Fri, 4 Apr 2014 16:57:54 +0000 (19:57 +0300)]
Prefer is_turnout() when checking if a track is, in fact, a turnout

10 years agoCreate multiple routes if the planned route crosses itself
Mikko Rasa [Fri, 4 Apr 2014 16:43:27 +0000 (19:43 +0300)]
Create multiple routes if the planned route crosses itself

10 years agoAllow queueing multiple routes for a train
Mikko Rasa [Fri, 4 Apr 2014 16:40:10 +0000 (19:40 +0300)]
Allow queueing multiple routes for a train

10 years agoAttempt to resync ArduControl if there's no response to a command
Mikko Rasa [Fri, 4 Apr 2014 15:47:54 +0000 (18:47 +0300)]
Attempt to resync ArduControl if there's no response to a command

10 years agoAdd a timeout to ArduControl commands
Mikko Rasa [Fri, 4 Apr 2014 15:47:13 +0000 (18:47 +0300)]
Add a timeout to ArduControl commands

10 years agoRemove an unused mutex
Mikko Rasa [Fri, 4 Apr 2014 15:46:40 +0000 (18:46 +0300)]
Remove an unused mutex

10 years agoStore the Transform in TrackPart instead of creating it on the fly
Mikko Rasa [Wed, 2 Apr 2014 20:41:06 +0000 (23:41 +0300)]
Store the Transform in TrackPart instead of creating it on the fly

10 years agoUse elevation granularity for terrain Z positions
Mikko Rasa [Wed, 2 Apr 2014 20:20:21 +0000 (23:20 +0300)]
Use elevation granularity for terrain Z positions

10 years agoInstead of setting the speed of all locomotives, just enable halt mode
Mikko Rasa [Wed, 2 Apr 2014 20:15:49 +0000 (23:15 +0300)]
Instead of setting the speed of all locomotives, just enable halt mode

The old code was causing an exception and segfault with ArduControl,
since locomotive IDs are not equal to their addresses.

10 years agoImplement flush() for ArduControl
Mikko Rasa [Wed, 2 Apr 2014 20:15:26 +0000 (23:15 +0300)]
Implement flush() for ArduControl

10 years agoLift selection wraps slightly off the ground
Mikko Rasa [Wed, 2 Apr 2014 20:14:51 +0000 (23:14 +0300)]
Lift selection wraps slightly off the ground

10 years agoImprove tool status display
Mikko Rasa [Wed, 2 Apr 2014 20:12:55 +0000 (23:12 +0300)]
Improve tool status display

If a tool finishes instantly and displays a status (such as SlopeTool
or ExtendTool when they encounter an error during construction), do not
replace it with the selection tool status.

10 years agoFix some bad behavior in tools
Mikko Rasa [Wed, 2 Apr 2014 19:57:22 +0000 (22:57 +0300)]
Fix some bad behavior in tools

10 years agoDo not attempt to switch accessories while power is off
Mikko Rasa [Wed, 2 Apr 2014 16:40:33 +0000 (19:40 +0300)]
Do not attempt to switch accessories while power is off

Any changes in accessory state are held in the queue and performed once
power is restored.

10 years agoImplement halt mode to ArduControl
Mikko Rasa [Wed, 2 Apr 2014 16:40:11 +0000 (19:40 +0300)]
Implement halt mode to ArduControl

10 years agoUse current monitoring to detect failed turnouts
Mikko Rasa [Tue, 1 Apr 2014 18:35:31 +0000 (21:35 +0300)]
Use current monitoring to detect failed turnouts

The turnout solenoid takes quite a bit of current, which is easy to
detect.  If there's no current spike after activating a solenoid, it
may have a broken microswitch that prevents operation.

10 years agoBasic support for failed turnout detection
Mikko Rasa [Tue, 1 Apr 2014 18:28:36 +0000 (21:28 +0300)]
Basic support for failed turnout detection

10 years agoAdd voltage and current monitoring task to ArduControl
Mikko Rasa [Tue, 1 Apr 2014 18:25:15 +0000 (21:25 +0300)]
Add voltage and current monitoring task to ArduControl

It's not used for anything yet, bit will be soon.

10 years agoKeep track of the active accessory bit index
Mikko Rasa [Tue, 1 Apr 2014 18:14:35 +0000 (21:14 +0300)]
Keep track of the active accessory bit index

Failing to do this may theoretically cause trouble if a multi-bit
accessory spans a k83 module boundary.  Sending a deactivation command
for the first bit would only turn off the first module but not the
second.

10 years agoArduControl debugging tweaks
Mikko Rasa [Mon, 31 Mar 2014 19:34:00 +0000 (22:34 +0300)]
ArduControl debugging tweaks

10 years agoAdd helper class for processing driver options
Mikko Rasa [Mon, 31 Mar 2014 14:27:14 +0000 (17:27 +0300)]
Add helper class for processing driver options

10 years agoAdd a missing initializer
Mikko Rasa [Sun, 30 Mar 2014 18:14:06 +0000 (21:14 +0300)]
Add a missing initializer

10 years agoRemove some unnecessary braces and an outdated comment
Mikko Rasa [Sun, 30 Mar 2014 18:13:14 +0000 (21:13 +0300)]
Remove some unnecessary braces and an outdated comment

10 years agoPass goto target with the correct type
Mikko Rasa [Sun, 30 Mar 2014 18:11:44 +0000 (21:11 +0300)]
Pass goto target with the correct type

10 years agoAdd a distance metric to turn the routing into an A* search
Mikko Rasa [Sun, 30 Mar 2014 17:22:31 +0000 (20:22 +0300)]
Add a distance metric to turn the routing into an A* search

The original straightforward implementation exploded in complexity much
sooner than I expected.  The reasons are not entirely clear, but the
inability to converge states and drop those where the same position was
already reached through a faster path may have something to do with it.

10 years agoMaintain a separate list of pending RoutingStates
Mikko Rasa [Sun, 30 Mar 2014 17:13:53 +0000 (20:13 +0300)]
Maintain a separate list of pending RoutingStates

10 years agoCheck that occupied_track is not null before accessing it
Mikko Rasa [Sun, 30 Mar 2014 16:36:47 +0000 (19:36 +0300)]
Check that occupied_track is not null before accessing it

This could only happen if an exception is thrown from TrainRoutingState
constructor, but the resulting segfault can act as a red herring and
distract from the actual cause.

10 years agoRename is_occupied to is_occupying
Mikko Rasa [Sun, 30 Mar 2014 13:46:53 +0000 (16:46 +0300)]
Rename is_occupied to is_occupying

This reflects the function's actual purpose better.

10 years agoMake deadlock detection more robust
Mikko Rasa [Sun, 30 Mar 2014 13:43:54 +0000 (16:43 +0300)]
Make deadlock detection more robust

Deadlock cycles involving more than two trains can now be detected.

10 years agoBe stricter with const qualifiers
Mikko Rasa [Sun, 30 Mar 2014 13:34:03 +0000 (16:34 +0300)]
Be stricter with const qualifiers

10 years agoContinue TrainRoutePlanner refactoring
Mikko Rasa [Sun, 30 Mar 2014 13:20:28 +0000 (16:20 +0300)]
Continue TrainRoutePlanner refactoring

This moves even more logic into the data structures, and cleans up step
management.

10 years agoStart refactoring TrainRoutePlanner
Mikko Rasa [Sun, 30 Mar 2014 12:35:34 +0000 (15:35 +0300)]
Start refactoring TrainRoutePlanner

OOP calls for the logic to be close to the data it uses, so let's put it
there.

10 years agoFilter out non-viable routing steps before adding them to the list
Mikko Rasa [Sat, 29 Mar 2014 16:16:51 +0000 (18:16 +0200)]
Filter out non-viable routing steps before adding them to the list

10 years agoSkip arrived trains when updating states in the route planner
Mikko Rasa [Sat, 29 Mar 2014 15:06:52 +0000 (17:06 +0200)]
Skip arrived trains when updating states in the route planner

10 years agoUtilize maximum speed information in planning routes
Mikko Rasa [Sat, 29 Mar 2014 13:22:22 +0000 (15:22 +0200)]
Utilize maximum speed information in planning routes

10 years agoAssign delay in TrainRoutingState copy-constructor
Mikko Rasa [Sat, 29 Mar 2014 11:38:11 +0000 (13:38 +0200)]
Assign delay in TrainRoutingState copy-constructor

10 years agoSupport waypoints in Timetable
Mikko Rasa [Wed, 26 Mar 2014 20:44:31 +0000 (22:44 +0200)]
Support waypoints in Timetable

10 years agoGenerate an event for reaching each waypoint
Mikko Rasa [Wed, 26 Mar 2014 20:36:37 +0000 (22:36 +0200)]
Generate an event for reaching each waypoint

10 years agoEmit signal_route_changed when moving to the next route
Mikko Rasa [Wed, 26 Mar 2014 20:36:00 +0000 (22:36 +0200)]
Emit signal_route_changed when moving to the next route

10 years agoInclude destination pointer in the arrival signal
Mikko Rasa [Wed, 26 Mar 2014 20:33:13 +0000 (22:33 +0200)]
Include destination pointer in the arrival signal

10 years agoDrop waypoints once the train has fully covered them
Mikko Rasa [Wed, 26 Mar 2014 20:32:30 +0000 (22:32 +0200)]
Drop waypoints once the train has fully covered them

10 years agoSupport routing through multiple waypoints
Mikko Rasa [Wed, 26 Mar 2014 00:12:06 +0000 (02:12 +0200)]
Support routing through multiple waypoints

Currently the result must be valid as a single route.  No crossing one's
own path or doubling back from a reversing loop.

10 years agoAdjust terrain pick geometry so it's possible to pick tracks on top of it
Mikko Rasa [Tue, 25 Mar 2014 23:56:27 +0000 (01:56 +0200)]
Adjust terrain pick geometry so it's possible to pick tracks on top of it

10 years agoReport the closest object when picking
Mikko Rasa [Tue, 25 Mar 2014 23:56:00 +0000 (01:56 +0200)]
Report the closest object when picking

10 years agoAlso use TrackChains as target locations in Timetable
Mikko Rasa [Tue, 25 Mar 2014 23:54:01 +0000 (01:54 +0200)]
Also use TrackChains as target locations in Timetable

10 years agoUpdate zone name after loading
Mikko Rasa [Tue, 25 Mar 2014 14:56:12 +0000 (16:56 +0200)]
Update zone name after loading

10 years agoUse the TrackChain base class as destination in Router
Mikko Rasa [Sun, 23 Mar 2014 16:48:47 +0000 (18:48 +0200)]
Use the TrackChain base class as destination in Router

There's no functional difference between Zones and blocks in this context.
Giving a Route as a destination does not really make sense and may give
unexpected results, but I see no particular reason to exclude them.

10 years agoAdd a missing protection specifier
Mikko Rasa [Sun, 23 Mar 2014 15:47:44 +0000 (17:47 +0200)]
Add a missing protection specifier

10 years agoUnify TrackChain names
Mikko Rasa [Sun, 23 Mar 2014 13:30:33 +0000 (15:30 +0200)]
Unify TrackChain names

10 years agoStuff created paths into the list so they can be cleared later
Mikko Rasa [Sun, 23 Mar 2014 13:13:17 +0000 (15:13 +0200)]
Stuff created paths into the list so they can be cleared later

10 years agoOnly create a new highlight if the target actually changed
Mikko Rasa [Sat, 22 Mar 2014 08:49:09 +0000 (10:49 +0200)]
Only create a new highlight if the target actually changed

10 years agoClear destination when setting a null route
Mikko Rasa [Thu, 20 Mar 2014 22:33:59 +0000 (00:33 +0200)]
Clear destination when setting a null route

10 years agoNew timetable system, which works like an actual timetable
Mikko Rasa [Thu, 20 Mar 2014 22:33:13 +0000 (00:33 +0200)]
New timetable system, which works like an actual timetable

10 years agoAdd a maximum speed property for vehicle types
Mikko Rasa [Thu, 20 Mar 2014 22:28:50 +0000 (00:28 +0200)]
Add a maximum speed property for vehicle types

10 years agoImplement a departure delay for TrainRouter
Mikko Rasa [Wed, 19 Mar 2014 20:18:37 +0000 (22:18 +0200)]
Implement a departure delay for TrainRouter

10 years agoSet routes created by the planner as temporary
Mikko Rasa [Wed, 19 Mar 2014 20:15:57 +0000 (22:15 +0200)]
Set routes created by the planner as temporary

10 years agoGL::Light no longer has a four-argument constructor
Mikko Rasa [Wed, 19 Mar 2014 17:00:26 +0000 (19:00 +0200)]
GL::Light no longer has a four-argument constructor

10 years agoSave and load clock settings
Mikko Rasa [Wed, 19 Mar 2014 16:56:01 +0000 (18:56 +0200)]
Save and load clock settings

10 years agoAdditional accessors for Clock
Mikko Rasa [Wed, 19 Mar 2014 16:51:35 +0000 (18:51 +0200)]
Additional accessors for Clock

10 years agoDisplay the current time in the main window
Mikko Rasa [Wed, 19 Mar 2014 16:46:42 +0000 (18:46 +0200)]
Display the current time in the main window

10 years agoRender a sky in the upper hemisphere of a view's background
Mikko Rasa [Sun, 24 Nov 2013 21:54:30 +0000 (23:54 +0200)]
Render a sky in the upper hemisphere of a view's background

I'll have to do something about the lower hemisphere as well, but this
already makes train views look 46% better.

10 years agoCorrect direction of roof viewpoint
Mikko Rasa [Sun, 24 Nov 2013 21:45:33 +0000 (23:45 +0200)]
Correct direction of roof viewpoint

10 years agoPass catalogue reference to Object and Technique loaders
Mikko Rasa [Sun, 24 Nov 2013 21:43:13 +0000 (23:43 +0200)]
Pass catalogue reference to Object and Technique loaders

10 years agoLayout3D::get_bounds was broken and not used anywhere, remove it
Mikko Rasa [Sun, 24 Nov 2013 21:40:32 +0000 (23:40 +0200)]
Layout3D::get_bounds was broken and not used anywhere, remove it

10 years agoRender ties between rails on tracks
Mikko Rasa [Sat, 23 Nov 2013 15:36:22 +0000 (17:36 +0200)]
Render ties between rails on tracks

10 years agoMove track appearance properties into a separate class
Mikko Rasa [Fri, 22 Nov 2013 19:43:36 +0000 (21:43 +0200)]
Move track appearance properties into a separate class

This will eventually enable tracks with different appearance (such as
Märklin C and K track) to coexist in the same catalogue.

10 years agoProperly round negative elevations
Mikko Rasa [Fri, 22 Nov 2013 12:43:24 +0000 (14:43 +0200)]
Properly round negative elevations

10 years agoMake BeamGate compile with older GCC versions
Mikko Rasa [Fri, 22 Nov 2013 11:21:30 +0000 (13:21 +0200)]
Make BeamGate compile with older GCC versions

GCC 4.6 produces ambiguity errors despite the using directive in the class
declaration.

10 years agoAdd a terrain object to the catalogue layout
Mikko Rasa [Fri, 22 Nov 2013 11:09:36 +0000 (13:09 +0200)]
Add a terrain object to the catalogue layout

10 years agoProduce more compact saves of terrains
Mikko Rasa [Fri, 22 Nov 2013 11:09:16 +0000 (13:09 +0200)]
Produce more compact saves of terrains

10 years agoSave terrain position and rotation
Mikko Rasa [Fri, 22 Nov 2013 11:05:57 +0000 (13:05 +0200)]
Save terrain position and rotation

10 years agoImprove tile axis calculation
Mikko Rasa [Fri, 22 Nov 2013 11:05:30 +0000 (13:05 +0200)]
Improve tile axis calculation

10 years agoAdd property editing for terrain
Mikko Rasa [Fri, 22 Nov 2013 09:39:23 +0000 (11:39 +0200)]
Add property editing for terrain

10 years agoIgnore beam gates and terrains in shoppinglist
Mikko Rasa [Thu, 21 Nov 2013 23:39:13 +0000 (01:39 +0200)]
Ignore beam gates and terrains in shoppinglist

10 years agoSupport editing multiple terrain tiles at once
Mikko Rasa [Thu, 21 Nov 2013 23:34:38 +0000 (01:34 +0200)]
Support editing multiple terrain tiles at once

10 years agoAutomatically adjust the secondary_axis flag when elevations are changed
Mikko Rasa [Thu, 21 Nov 2013 23:33:30 +0000 (01:33 +0200)]
Automatically adjust the secondary_axis flag when elevations are changed

10 years agoEdit a single terrain node at a time if shift is held
Mikko Rasa [Thu, 21 Nov 2013 17:48:50 +0000 (19:48 +0200)]
Edit a single terrain node at a time if shift is held

10 years agoMore efficient picking of terrain nodes
Mikko Rasa [Thu, 21 Nov 2013 17:41:15 +0000 (19:41 +0200)]
More efficient picking of terrain nodes

10 years agoAdd editable terrain objects
Mikko Rasa [Thu, 21 Nov 2013 15:12:12 +0000 (17:12 +0200)]
Add editable terrain objects

These will soon replace the base object in layout.  It's still a bit
rough along the edges, especially the editing tool.  References to
surface materials are also just a hint of things to come.

10 years agoAdd button_release handler to Tool
Mikko Rasa [Thu, 21 Nov 2013 15:04:25 +0000 (17:04 +0200)]
Add button_release handler to Tool

10 years agoAvoid crash if an object does not have a shape
Mikko Rasa [Thu, 21 Nov 2013 11:42:37 +0000 (13:42 +0200)]
Avoid crash if an object does not have a shape

10 years agoTweak some dialogs a bit
Mikko Rasa [Wed, 20 Nov 2013 20:52:31 +0000 (22:52 +0200)]
Tweak some dialogs a bit

10 years agoAvoid hogging the serial link with S88 read commands
Mikko Rasa [Wed, 20 Nov 2013 20:23:37 +0000 (22:23 +0200)]
Avoid hogging the serial link with S88 read commands

10 years agoAvoid inserting turnout address zero into routes
Mikko Rasa [Wed, 20 Nov 2013 19:52:32 +0000 (21:52 +0200)]
Avoid inserting turnout address zero into routes

10 years agoAvoid advancing to a pending block
Mikko Rasa [Wed, 20 Nov 2013 19:25:11 +0000 (21:25 +0200)]
Avoid advancing to a pending block

This fixes a problem where a train would wait for a turnout to be freed,
then reserve it and immediately advance to it, triggering a false arrival
in the router.

10 years agoDon't attempt to set a turnout to the already active path
Mikko Rasa [Wed, 20 Nov 2013 12:40:04 +0000 (14:40 +0200)]
Don't attempt to set a turnout to the already active path

10 years agoFix route choices in RouterPanel
Mikko Rasa [Wed, 20 Nov 2013 12:37:12 +0000 (14:37 +0200)]
Fix route choices in RouterPanel

10 years agoRecreate the icons in Blender using faces instead of lines
Mikko Rasa [Wed, 20 Nov 2013 12:33:58 +0000 (14:33 +0200)]
Recreate the icons in Blender using faces instead of lines

The OpenGL specification gives implementors enough leeway with line
drawing that they cannot be used for this sort of pixel-scale graphics.

10 years agoDisplay icons and addresses for signals and beam gates
Mikko Rasa [Wed, 20 Nov 2013 11:19:03 +0000 (13:19 +0200)]
Display icons and addresses for signals and beam gates

10 years agoFix some uninitialized variables
Mikko Rasa [Wed, 20 Nov 2013 08:32:38 +0000 (10:32 +0200)]
Fix some uninitialized variables

10 years agoGeneralize TrackProperties to all object types
Mikko Rasa [Wed, 20 Nov 2013 08:03:29 +0000 (10:03 +0200)]
Generalize TrackProperties to all object types

10 years agoMake new and erase work on objects rather than just tracks
Mikko Rasa [Tue, 19 Nov 2013 13:59:06 +0000 (15:59 +0200)]
Make new and erase work on objects rather than just tracks

10 years agoUse any snap nodes without links as boundaries
Mikko Rasa [Tue, 19 Nov 2013 13:56:04 +0000 (15:56 +0200)]
Use any snap nodes without links as boundaries

This makes signals snap to tracks again.

10 years agoAdd a missing function for the locomotive import UI
Mikko Rasa [Tue, 19 Nov 2013 06:43:54 +0000 (08:43 +0200)]
Add a missing function for the locomotive import UI

10 years agoPopulate the import list when TrainListDialog is created
Mikko Rasa [Mon, 18 Nov 2013 18:46:25 +0000 (20:46 +0200)]
Populate the import list when TrainListDialog is created

10 years agoRemember discovered MFX locomotives across runs
Mikko Rasa [Mon, 18 Nov 2013 14:44:33 +0000 (16:44 +0200)]
Remember discovered MFX locomotives across runs

10 years agoUse a common implementation for the three different queues
Mikko Rasa [Fri, 15 Nov 2013 23:26:27 +0000 (01:26 +0200)]
Use a common implementation for the three different queues

10 years agoTerminate the control thread if ArduControl device is not found
Mikko Rasa [Fri, 15 Nov 2013 23:21:41 +0000 (01:21 +0200)]
Terminate the control thread if ArduControl device is not found