]> git.tdb.fi Git - r2c2.git/log
r2c2.git
10 years agoBasic support for beam gate sensors
Mikko Rasa [Mon, 8 Jul 2013 18:10:30 +0000 (21:10 +0300)]
Basic support for beam gate sensors

10 years agoSupport inverted sensors that give low output when active
Mikko Rasa [Mon, 8 Jul 2013 17:17:03 +0000 (20:17 +0300)]
Support inverted sensors that give low output when active

10 years agoAdd a non-const overload of Layout3D::get_catalogue
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.

10 years agoAdd a function to retrieve track attachments in order
Mikko Rasa [Mon, 8 Jul 2013 16:59:34 +0000 (19:59 +0300)]
Add a function to retrieve track attachments in order

10 years agoSome more refactoring of BlockAllocator
Mikko Rasa [Mon, 8 Jul 2013 15:02:18 +0000 (18:02 +0300)]
Some more refactoring of BlockAllocator

10 years agoImmediately update the matrix after creating an Object3D
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.

10 years agoDon't reset router to free run mode until allocator has deactivated
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.

10 years agoRefactor BlockAllocator to be more sensor-oriented
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.

10 years agoKeep TrackAttachment offset within allowed limits
Mikko Rasa [Sun, 7 Jul 2013 21:23:32 +0000 (00:23 +0300)]
Keep TrackAttachment offset within allowed limits

10 years agoAdd a virtual get_block function to Sensor
Mikko Rasa [Sun, 7 Jul 2013 21:20:00 +0000 (00:20 +0300)]
Add a virtual get_block function to Sensor

10 years agoOnly create track circuits for blocks that need one
Mikko Rasa [Sun, 7 Jul 2013 20:28:12 +0000 (23:28 +0300)]
Only create track circuits for blocks that need one

10 years agoRemove a hack that is no longer necessary
Mikko Rasa [Sun, 7 Jul 2013 13:43:40 +0000 (16:43 +0300)]
Remove a hack that is no longer necessary

10 years agoRemove deprecated datafile statement aliases
Mikko Rasa [Sat, 6 Jul 2013 18:49:21 +0000 (21:49 +0300)]
Remove deprecated datafile statement aliases

10 years agoUse generic objects in Layout3D
Mikko Rasa [Sat, 6 Jul 2013 18:32:19 +0000 (21:32 +0300)]
Use generic objects in Layout3D

10 years agoPrevent segfault during layout destruction
Mikko Rasa [Fri, 5 Jul 2013 15:32:13 +0000 (18:32 +0300)]
Prevent segfault during layout destruction

10 years agoAdd an abstraction for things that are attached to tracks
Mikko Rasa [Thu, 4 Jul 2013 20:51:15 +0000 (23:51 +0300)]
Add an abstraction for things that are attached to tracks

10 years agoUse event-based matrix updates for objects
Mikko Rasa [Thu, 4 Jul 2013 19:33:42 +0000 (22:33 +0300)]
Use event-based matrix updates for objects

10 years agoIntroduce a tilt (vertical angle) property to Object
Mikko Rasa [Thu, 4 Jul 2013 19:13:04 +0000 (22:13 +0300)]
Introduce a tilt (vertical angle) property to Object

10 years agoComplete rewrite of the engineer UI
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.

10 years agoFurther adjustments to changes in GLtk
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.

10 years agoDon't continue reserving until the turnout is done changing its path
Mikko Rasa [Sun, 30 Jun 2013 20:32:19 +0000 (23:32 +0300)]
Don't continue reserving until the turnout is done changing its path

10 years agoCount reserved distance correctly in reverse direction
Mikko Rasa [Sun, 30 Jun 2013 20:19:38 +0000 (23:19 +0300)]
Count reserved distance correctly in reverse direction

10 years agoDelete auxiliary objects together with Vehicle3D
Mikko Rasa [Fri, 28 Jun 2013 19:41:02 +0000 (22:41 +0300)]
Delete auxiliary objects together with Vehicle3D

10 years agoAdd signals for adding and removing vehicles
Mikko Rasa [Fri, 28 Jun 2013 19:24:13 +0000 (22:24 +0300)]
Add signals for adding and removing vehicles

10 years agoActivate allocator if an AI intends to move
Mikko Rasa [Fri, 28 Jun 2013 19:23:03 +0000 (22:23 +0300)]
Activate allocator if an AI intends to move

10 years agoMake train advancement logic more robust
Mikko Rasa [Wed, 26 Jun 2013 21:23:27 +0000 (00:23 +0300)]
Make train advancement logic more robust

10 years agoSet pending_block when a block can't be allocated
Mikko Rasa [Wed, 26 Jun 2013 19:09:28 +0000 (22:09 +0300)]
Set pending_block when a block can't be allocated

This got accientally removed in dda1e6c

10 years agoGive vehicle types a simple box geometry
Mikko Rasa [Tue, 25 Jun 2013 16:12:38 +0000 (19:12 +0300)]
Give vehicle types a simple box geometry

10 years agoMake vehicles aware of which train they are in
Mikko Rasa [Tue, 25 Jun 2013 16:12:22 +0000 (19:12 +0300)]
Make vehicles aware of which train they are in

10 years agoRedesign the train activation system
Mikko Rasa [Tue, 25 Jun 2013 15:39:14 +0000 (18:39 +0300)]
Redesign the train activation system

It was getting rather messy and there was one or two bugs where block
allocation didn't resume correctly.  The flag now resides in
BlockAllocator.  Rather than poking at it directly, AIs can express an
intention of moving the train.  This should help keep things in sync
with each other.

10 years agoEmit a signal before changing the path of a turnout
Mikko Rasa [Tue, 25 Jun 2013 15:28:38 +0000 (18:28 +0300)]
Emit a signal before changing the path of a turnout

Since changing the path is an asynchronous operation, this lets other
components react to an impending change.

10 years agoAngle must be divided by the correct type
Mikko Rasa [Tue, 25 Jun 2013 11:59:42 +0000 (14:59 +0300)]
Angle must be divided by the correct type

10 years agoFix BlockAllocator so that it actually compiles
Mikko Rasa [Tue, 25 Jun 2013 11:20:55 +0000 (14:20 +0300)]
Fix BlockAllocator so that it actually compiles

10 years agoFix some issues with BlockAllocator::release_blocks_end
Mikko Rasa [Wed, 19 Jun 2013 13:28:38 +0000 (16:28 +0300)]
Fix some issues with BlockAllocator::release_blocks_end

10 years agoUse std::find to locate block iterators in BlockAllocator
Mikko Rasa [Wed, 19 Jun 2013 13:25:08 +0000 (16:25 +0300)]
Use std::find to locate block iterators in BlockAllocator

10 years agoArrange widgets in Designer with GLtk::Layout
Mikko Rasa [Sun, 9 Jun 2013 20:03:17 +0000 (23:03 +0300)]
Arrange widgets in Designer with GLtk::Layout

10 years agoMake the simulation independent of wall clock time
Mikko Rasa [Sun, 9 Jun 2013 08:39:05 +0000 (11:39 +0300)]
Make the simulation independent of wall clock time

Layout now holds a Clock object, which keeps track of simulated absolute
time and can advance faster (or slower) than the system clock.

10 years agoRemove the scripting-based timetable
Mikko Rasa [Sun, 9 Jun 2013 08:32:21 +0000 (11:32 +0300)]
Remove the scripting-based timetable

I'm going to implement a proper timetable soon, but some other changes
need to happen first.

10 years agoBetter algorithms for dealing with turnouts in a Route
Mikko Rasa [Sat, 8 Jun 2013 18:46:54 +0000 (21:46 +0300)]
Better algorithms for dealing with turnouts in a Route

10 years agoMake use of the unified storage class for other parts of Layout
Mikko Rasa [Fri, 7 Jun 2013 19:08:14 +0000 (22:08 +0300)]
Make use of the unified storage class for other parts of Layout

10 years agoStreamline various block-related algorithms
Mikko Rasa [Fri, 7 Jun 2013 16:18:04 +0000 (19:18 +0300)]
Streamline various block-related algorithms

10 years agoEnsure that turnout tracks have a turnout id
Mikko Rasa [Fri, 7 Jun 2013 16:17:19 +0000 (19:17 +0300)]
Ensure that turnout tracks have a turnout id

10 years agoCreate a base class to handle common operations in Block, Route and Zone
Mikko Rasa [Fri, 7 Jun 2013 10:40:16 +0000 (13:40 +0300)]
Create a base class to handle common operations in Block, Route and Zone

10 years agoReduce interface clutter in Layout by storing Objects in a uniform way
Mikko Rasa [Wed, 5 Jun 2013 10:53:12 +0000 (13:53 +0300)]
Reduce interface clutter in Layout by storing Objects in a uniform way

10 years agoHandle sensors in a separate class
Mikko Rasa [Tue, 4 Jun 2013 11:34:58 +0000 (14:34 +0300)]
Handle sensors in a separate class

10 years agoTighten safety measures
Mikko Rasa [Mon, 3 Jun 2013 19:27:22 +0000 (22:27 +0300)]
Tighten safety measures

Remove opportunistic freeing of blocks from behind the train and counting
of noncritical blocks from the simulated vehicle position.  Both features
are now implemented in terms of what can be ascertained from sensors.  I'm
developing infrared gates which will provide similar functionality with
actual physical (or simulated) feedback.

10 years agoFix a problem with TrackIter::block_iter at end of line
Mikko Rasa [Mon, 3 Jun 2013 18:39:25 +0000 (21:39 +0300)]
Fix a problem with TrackIter::block_iter at end of line

If the track iterator was already on the last track, the check for
returning an empty block iterator would not get executed, and the throw
at the end of the function would get triggered.

10 years agoImprove the interface and algorithms of BlockAllocator
Mikko Rasa [Mon, 3 Jun 2013 18:31:12 +0000 (21:31 +0300)]
Improve the interface and algorithms of BlockAllocator

10 years agoSimplify some interfaces by using track and block iterators
Mikko Rasa [Sat, 1 Jun 2013 08:02:39 +0000 (11:02 +0300)]
Simplify some interfaces by using track and block iterators

10 years agoSplit block allocation to a separate class
Mikko Rasa [Fri, 31 May 2013 22:06:20 +0000 (01:06 +0300)]
Split block allocation to a separate class

10 years agoPull the SetFlag class from mspcore
Mikko Rasa [Fri, 31 May 2013 21:57:21 +0000 (00:57 +0300)]
Pull the SetFlag class from mspcore

10 years agoDon't fail when adding multiple tracks to an initially empty Route
Mikko Rasa [Wed, 29 May 2013 20:33:52 +0000 (23:33 +0300)]
Don't fail when adding multiple tracks to an initially empty Route

10 years agoReport all missing flags in bad_route
Mikko Rasa [Wed, 29 May 2013 20:32:09 +0000 (23:32 +0300)]
Report all missing flags in bad_route

This was the intention from the beginning, but somehow else statements
slipped in.

10 years agoNew routing system for trains
Mikko Rasa [Wed, 29 May 2013 17:48:38 +0000 (20:48 +0300)]
New routing system for trains

The earlier code routed each train separately and tried to deal with
conflicts as they arose.  The new system instead considers the entire
layout and simultaneously finds routes for all trains.  It is able to
have trains wait for each other, and in the future many new tricks can
be added.

10 years agoPlug several memory leaks
Mikko Rasa [Sat, 25 May 2013 23:13:33 +0000 (02:13 +0300)]
Plug several memory leaks

10 years agoAdd the signal to the catalogue layout
Mikko Rasa [Sat, 25 May 2013 23:12:45 +0000 (02:12 +0300)]
Add the signal to the catalogue layout

10 years agoRegister pre-existing signals in Layout3D constructor
Mikko Rasa [Sat, 25 May 2013 23:11:43 +0000 (02:11 +0300)]
Register pre-existing signals in Layout3D constructor

10 years agoDon't force signals to be positioned next to track
Mikko Rasa [Sat, 25 May 2013 23:00:12 +0000 (02:00 +0300)]
Don't force signals to be positioned next to track

They can now be positioned freely and will logically attach to a nearby
track.

10 years agoSnap to segments in both directions
Mikko Rasa [Sat, 25 May 2013 22:59:11 +0000 (01:59 +0300)]
Snap to segments in both directions

Choose whichever is closer to the current rotation.

10 years agoRefactor TrackIter::block_iter
Mikko Rasa [Sat, 25 May 2013 22:54:24 +0000 (01:54 +0300)]
Refactor TrackIter::block_iter

The new implementation is slightly more efficient in certain cases and
won't choke at the end of a line.

10 years agoMake use of the geometry part of libmspmath
Mikko Rasa [Thu, 23 May 2013 20:12:00 +0000 (23:12 +0300)]
Make use of the geometry part of libmspmath

10 years agoDon't zero slope for tracks not connected on both ends
Mikko Rasa [Sun, 19 May 2013 12:31:46 +0000 (15:31 +0300)]
Don't zero slope for tracks not connected on both ends

Since check_slope is now called implicitly when linking tracks together,
loading layouts with sloped tracks wasn't working properly.

10 years agoMake use of the mspmath library
Mikko Rasa [Sun, 19 May 2013 12:31:15 +0000 (15:31 +0300)]
Make use of the mspmath library

11 years agoRemove the device firmware from here
Mikko Rasa [Mon, 13 May 2013 21:05:31 +0000 (00:05 +0300)]
Remove the device firmware from here

They have been moved into the model-railway-devices repo since they are
not directly related to R²C².

11 years agoUse Objects in Manipulator::neighbors
Mikko Rasa [Mon, 13 May 2013 21:03:42 +0000 (00:03 +0300)]
Use Objects in Manipulator::neighbors

11 years agoPerform check_slope automatically with certain operations
Mikko Rasa [Mon, 13 May 2013 20:58:10 +0000 (23:58 +0300)]
Perform check_slope automatically with certain operations

11 years agoAdd a generic link interface as well
Mikko Rasa [Mon, 13 May 2013 19:54:47 +0000 (22:54 +0300)]
Add a generic link interface as well

11 years agoAdd a generic snapping interface in Object
Mikko Rasa [Sun, 12 May 2013 16:08:30 +0000 (19:08 +0300)]
Add a generic snapping interface in Object

11 years agoMake designer work on generic objects
Mikko Rasa [Mon, 6 May 2013 18:38:20 +0000 (21:38 +0300)]
Make designer work on generic objects

This introduces a lot of dynamic_casts and other ugliness, since not all
operations are generalized yet.  They'll be worked out in the near future.

11 years agoAdd a common base class for tangible objects
Mikko Rasa [Mon, 6 May 2013 17:23:15 +0000 (20:23 +0300)]
Add a common base class for tangible objects

11 years agoCorrect ordering of some functions
Mikko Rasa [Mon, 6 May 2013 16:49:24 +0000 (19:49 +0300)]
Correct ordering of some functions

11 years agoAdd definitions and 3D model for the BR 420
Mikko Rasa [Mon, 6 May 2013 15:26:24 +0000 (18:26 +0300)]
Add definitions and 3D model for the BR 420

11 years agoFix logic with signals and train direction check
Mikko Rasa [Sat, 27 Apr 2013 10:05:55 +0000 (13:05 +0300)]
Fix logic with signals and train direction check

The train pointer wasn't being cleared in case of wrong direction.  Since
commit 4086edb it's possible to implement the logic in a more efficient
way too.

11 years agoAllow rotating the body object of a vehicle
Mikko Rasa [Fri, 26 Apr 2013 18:21:58 +0000 (21:21 +0300)]
Allow rotating the body object of a vehicle

This is a quick and dirty solution to support multiple units.  A better
solution is to allow rotating the vehicle instance, but that needs some
additional coding to handle correctly.

11 years agoFix linking issues with mspnet
Mikko Rasa [Fri, 26 Apr 2013 18:15:35 +0000 (21:15 +0300)]
Fix linking issues with mspnet

Remote and serial use the resolve function and must link with mspnet
directly.  Adding an empty destructor to server.cpp avoids generating
a default destructor for StreamServerSocket in files that #include
server.h.

11 years agoOne more endpoint mask cleanup
Mikko Rasa [Thu, 25 Apr 2013 11:13:04 +0000 (14:13 +0300)]
One more endpoint mask cleanup

11 years agoAdapt event handlers to library changes
Mikko Rasa [Thu, 25 Apr 2013 11:08:39 +0000 (14:08 +0300)]
Adapt event handlers to library changes

11 years agoRemove deprecated header
Mikko Rasa [Thu, 25 Apr 2013 11:07:40 +0000 (14:07 +0300)]
Remove deprecated header

11 years agoGet rid of the TrainAI tagging system
Mikko Rasa [Sun, 24 Feb 2013 11:53:46 +0000 (13:53 +0200)]
Get rid of the TrainAI tagging system

Instead add a function to get an AI of a specific type.

The tags were too clumsy and brittle.  Most AIs don't work well with
multiple instances per train, so the type is an adequate identifier.

11 years agoRemove some debug messages that managed to sneak in
Mikko Rasa [Sun, 24 Feb 2013 11:47:33 +0000 (13:47 +0200)]
Remove some debug messages that managed to sneak in

11 years agoConnect halt checkbox in the remote to the right function
Mikko Rasa [Sun, 24 Feb 2013 10:32:28 +0000 (12:32 +0200)]
Connect halt checkbox in the remote to the right function

11 years agoAdd utility functions to make endpoint path mask operations clearer
Mikko Rasa [Sat, 23 Feb 2013 10:44:29 +0000 (12:44 +0200)]
Add utility functions to make endpoint path mask operations clearer

11 years agoOnly consider arrival when a route is set
Mikko Rasa [Sun, 17 Feb 2013 13:25:33 +0000 (15:25 +0200)]
Only consider arrival when a route is set

11 years agoSet turnout paths synchronously when allocating blocks
Mikko Rasa [Sun, 17 Feb 2013 13:21:52 +0000 (15:21 +0200)]
Set turnout paths synchronously when allocating blocks

11 years agoSeparate train routing logic to a class derived from TrainAI
Mikko Rasa [Fri, 15 Feb 2013 14:15:20 +0000 (16:15 +0200)]
Separate train routing logic to a class derived from TrainAI

11 years agoRemove diversion logic
Mikko Rasa [Fri, 15 Feb 2013 10:18:49 +0000 (12:18 +0200)]
Remove diversion logic

It was flawed in many ways and rarely produced useful results.  A better
system to replace it will be implemented in the future.

11 years agoRearrange block reservations to present consistent state in signal_reserved
Mikko Rasa [Fri, 15 Feb 2013 08:56:56 +0000 (10:56 +0200)]
Rearrange block reservations to present consistent state in signal_reserved

11 years agoAdd a flag to Track to indicate that its path is changing
Mikko Rasa [Tue, 12 Feb 2013 12:40:07 +0000 (14:40 +0200)]
Add a flag to Track to indicate that its path is changing

11 years agoImprove train color selection to always choose saturated colors
Mikko Rasa [Tue, 12 Feb 2013 12:33:56 +0000 (14:33 +0200)]
Improve train color selection to always choose saturated colors

11 years agoDelay processing new trains until they are fully loaded
Mikko Rasa [Tue, 12 Feb 2013 12:32:13 +0000 (14:32 +0200)]
Delay processing new trains until they are fully loaded

11 years agoSimulate a delay for switching turnouts in the Dummy driver
Mikko Rasa [Sun, 10 Feb 2013 09:46:25 +0000 (11:46 +0200)]
Simulate a delay for switching turnouts in the Dummy driver

11 years agoImplement signals in Intellibox driver as well
Mikko Rasa [Fri, 1 Feb 2013 16:56:11 +0000 (18:56 +0200)]
Implement signals in Intellibox driver as well

11 years agoMark turnout blocks before the next sensor as current
Mikko Rasa [Sun, 27 Jan 2013 13:26:18 +0000 (15:26 +0200)]
Mark turnout blocks before the next sensor as current

This avoids a problem where a train leaving a station wouldn't get the
following turnouts as current if they needed switching, and consequently
could trigger an emergency for not reaching a sensor in time.

11 years agoAdd basic support for signals
Mikko Rasa [Sun, 27 Jan 2013 13:24:55 +0000 (15:24 +0200)]
Add basic support for signals

A lot of features are still missing or could use improvement, but whatever
is there works.

11 years agoGeneralize turnouts to magnet accessories in the central station driver
Mikko Rasa [Sun, 27 Jan 2013 13:21:13 +0000 (15:21 +0200)]
Generalize turnouts to magnet accessories in the central station driver

11 years agoAdd functions to resolve an arbitrary point to the nearest point on a track
Mikko Rasa [Sat, 26 Jan 2013 20:37:54 +0000 (22:37 +0200)]
Add functions to resolve an arbitrary point to the nearest point on a track

11 years agoAdd a function to get a BlockIter from a TrackIter
Mikko Rasa [Sat, 26 Jan 2013 20:35:15 +0000 (22:35 +0200)]
Add a function to get a BlockIter from a TrackIter

11 years agoSet vehicle position from reference if it has no track
Mikko Rasa [Sat, 26 Jan 2013 20:30:19 +0000 (22:30 +0200)]
Set vehicle position from reference if it has no track

This only became apparent when I happened to park a train near the origin
and the program went into an infinite loop while loading the layout.

11 years agoFix the arrow while picking a position for a train
Mikko Rasa [Sat, 26 Jan 2013 20:27:57 +0000 (22:27 +0200)]
Fix the arrow while picking a position for a train

11 years agoDetect curved turnouts and assign appropriate symbols to them
Mikko Rasa [Mon, 21 Jan 2013 19:16:00 +0000 (21:16 +0200)]
Detect curved turnouts and assign appropriate symbols to them