1190 Commits

Autor SHA1 Nachricht Datum
Reinder Feenstra
b30bc55ea0 build fixes 2023-05-01 12:53:32 +02:00
Reinder Feenstra
37e808fdd5 loconet: added PCAP logging support (for developers)
currently using DLT_USER0, this should be changed if there is one for loconet
2023-04-30 23:50:35 +02:00
Reinder Feenstra
f60c889602 loconet: only pass valid messages to the kernel
see #55
2023-04-28 15:37:27 +02:00
Filippo Gentile
d26bcf5165 server: Z21 fixed LanXBCStopped checksum value 2023-04-25 23:34:53 +02:00
Filippo Gentile
890abfc8df server: Z21 debug log also emergency stop reply 2023-04-25 23:34:53 +02:00
Filippo Gentile
c2c1b79c6b server: Z21 add more message debugging
- Fix LAN_X_SET_TURNOUT deprecaded linearAddress()
- Use constants in switch/case
- Added some messages
- Use reference for iterating decoder functions
2023-04-25 23:34:52 +02:00
Filippo Gentile
6d903a519b server: Z21 move TriState include where is used
It is only used in Kernel derived classes
2023-04-25 23:22:23 +02:00
Filippo Gentile
a6e59c7132 server: Z21 Utils, fix missing includes
This are not strictly needed but nice to have
2023-04-25 23:22:22 +02:00
Filippo Gentile
b019cd5caf server: Z21 use constants in switch/case
Added some LAN_X_SET_STOP in:
- SimulationIOHandler
- ServerKernel
2023-04-25 23:22:21 +02:00
Filippo Gentile
f6b7d71290 server: Z21 fix some message not packed
- Fixed missing ATTRIBUTE_PACKET
- Fixed wrong comment for message
- Use constants instead of raw values for switch/case
2023-04-25 23:22:20 +02:00
Filippo Gentile
4af4390e82 server: Z21 maximum retry count for broadcast flags
- Retry for maximum of 10 times
- Log warning when broadcastFlags do not match
2023-04-25 23:22:20 +02:00
Filippo Gentile
0896408105 server: Z21 handle LAN_SYSTEMSTATE_DATACHANGED in ClientKernel
This checks track power state in case UDP skipped some packages
2023-04-25 23:22:19 +02:00
Filippo Gentile
a47fadbd3a server: Z21 add LanGetBroadcastFlagsReply
Request BC flags as keep alive timer until we get a valid reply
2023-04-25 23:22:18 +02:00
Filippo Gentile
4a6b00c682 Train: propagate emergency stop only if active
- Sync emergency stop state when activating a Train
2023-04-25 11:47:00 +02:00
Filippo Gentile
fab21a4eec Train: prevent running when not active 2023-04-25 11:47:00 +02:00
Filippo Gentile
a8b2e9a76e Train: make "active" StoreState
Update RailVehicle "activeTrain"
2023-04-25 11:46:59 +02:00
Filippo Gentile
d471111947 Train: new active property
It is mirrored in RailVehicle activeTrain property.

Activating a Train is an atomic operation:
- Every contained vehicle must not be in other active train
- It also must be stopped

Train: setTrainActive() new function to activate Train
2023-04-25 11:46:59 +02:00
Reinder Feenstra
3088132afc fix: added missing includes 2023-04-24 00:22:44 +02:00
Reinder Feenstra
46072d8198 interfacelist: re-implemented status column 2023-04-23 16:57:06 +02:00
Reinder Feenstra
e6f3c69462 object: don't fire propertyChanged while dying 2023-04-23 16:42:18 +02:00
Reinder Feenstra
59125a2cc9 interface: force state offline if world goes offline 2023-04-23 00:31:07 +02:00
Reinder Feenstra
427d5b31ed loconet: only update throttle if difference is larger than one step
see #44
2023-04-22 16:35:50 +02:00
Reinder Feenstra
43cd73d2c0 server: added LOG_DEBUG() macro, to simlify debug logging during development 2023-04-22 16:31:45 +02:00
Reinder Feenstra
07e71677ca interface: added status object (for display in client status bar) 2023-04-18 23:23:32 +02:00
Reinder Feenstra
62c5388812 network: added ObjectGetObjectVectorPropertyObject command 2023-04-18 23:15:33 +02:00
Reinder Feenstra
288c9c32aa loconet: interface now goes offline and in error state on communication error 2023-04-16 00:29:05 +02:00
Reinder Feenstra
206f8a8288 interface: make sure interface is offline before destroying it
see #52
2023-04-13 23:37:20 +02:00
Reinder Feenstra
9301461ec2 CMake: Added compiler flags for development
- Enable ASAN and UBSAN
- Use LLVM ld (faster than standard linker)
Uncoment them to enable
2023-04-13 00:12:30 +02:00
Reinder Feenstra
a744c560b4 block: added train assigned/remove events 2023-04-11 22:28:36 +02:00
Reinder Feenstra
ac4dcedfce block: assign/remove train now simulates block occupy 2023-04-10 23:23:45 +02:00
Reinder Feenstra
49be24ab9f Input: added simulate action
added SetFalse, SetTrue, Toggle action
simulation will require these actions
2023-04-10 23:23:45 +02:00
Filippo Gentile
116231e453 server: Z21 map short circuit to power off
- Add support for LAN_X_BC_TRACK_SHORT_CIRCUIT message
2023-04-10 10:30:25 +02:00
Filippo Gentile
05da1cf2fc server: recognize more Z21 types
Taken from Z21 LAN Protocol Specification 1.12 en
2023-04-10 00:26:05 +02:00
Reinder Feenstra
dae4eea927 corrected method names: add->create, remove->delete
see 63a5b8c
2023-04-08 09:42:14 +02:00
Reinder Feenstra
eb6aefab09 traintastic diy: added throttle subscribe support 2023-04-02 22:52:48 +02:00
Reinder Feenstra
78dd66b096 train: fix: isStopped wasn't alway true when stopped 2023-03-30 23:36:20 +02:00
Reinder Feenstra
904c3f9891 train: fix: added missing registration of isStopped 2023-03-30 23:35:20 +02:00
Reinder Feenstra
94d21f607b fix: more missing includes 2023-03-30 19:35:11 +02:00
Reinder Feenstra
f554a2c9d1 fix: added missing include 2023-03-30 18:59:41 +02:00
Reinder Feenstra
f61e2c397e fixed compilation of tests 2023-03-30 15:42:39 +02:00
Reinder Feenstra
246b27c434 moved ObjectProperty<> implementation to seperate file
world.hpp now uses forward decl. for many classes, this reduces built time!
see #43
2023-03-30 15:09:11 +02:00
Reinder Feenstra
13fa109c17 block: added trains property and assign/remove train method 2023-03-30 00:10:26 +02:00
Reinder Feenstra
ffcc9bd877 add support for StoreState save/load object vector properties 2023-03-29 23:49:54 +02:00
Reinder Feenstra
f3d7bee1ef objectvectorproperty: added clearInternal() 2023-03-28 23:15:30 +02:00
Reinder Feenstra
cf27823cc9 objectproperty: added setValueInternal(std::nullptr_t) overload
saves constructing an empty std::shared_ptr
2023-03-27 22:39:10 +02:00
Reinder Feenstra
d4e99e0d51 missing in d53a454ef70ab7c89cc06a1361e93e541e9f86fb 2023-03-26 09:33:12 +02:00
Reinder Feenstra
d53a454ef7 train: added stop and emergency stop 2023-03-26 00:31:38 +01:00
Reinder Feenstra
6c67be1764 train: added isStopped property 2023-03-25 23:46:00 +01:00
Filippo Gentile
89b37d88c8 Train: correctly disable Name property when moving 2023-03-25 13:49:02 +01:00
Reinder Feenstra
edd4cdad26 trayicon: added Advanced submenu with Open data directory option 2023-03-22 23:31:06 +01:00