what my "m2lagfix"-tool does
- check status of header; the tool won't do anything until status-2 is reached.
- received frames get buffered, sent to the emulator and (if enabled) a copy is sent to the "control tower"
- if the emulator does NOT respond within 64ms, the buffered frame will be sent to the emulator again.
- double-frames sent by the emulator will be split to get rid of "lost" frames.
- if no frame gets received in 256ms, we have a network stall. (nothing will be done)
each event gets noted in a log file. no response in 64ms = LAG; double frames = DOUBLE; network stall = STALL
Hi Sailorsat - apologies for digging up an old post but I've been going thru the code of the m2lag fix and just want to check if the version on the GitHub is the latest version of your vb code?
I couldn't see anything in the code the handles the double frames condition (or writes something to the log when it sees a double). Also the value for the stall condition seems different to your post (128ms vs 256ms unless I read it wrong)?
Do you recommend using the Throttle=1 line in the ini if using lagfix on all cars/ emulator instances?
I'm thinking it might be inadvertently causing some glitching in my setup which has lagfix running on each car
Eg when throttle = 1
car 1 - emulator doesnt send a packet in 128ms, so lagfix detects a throttle and sends a dummy packet for car 2.
Car 2 - meanwhile lagfix on car 2 also realises it didnt receive a packet in 64ms (the LAG condition), so lagfix also creates it's own dummy packet and sends it to the car 2 emulator
Car 1 - meanwhile car 1 emulator now sends a new 'real' UDP packet which lagfix then immediately sends to car 2.
If I've read the code correctly, is it possible that the car 2 emulator could receive a burst of 3x UDP packets in quick succession (possibly with conflicting information) when throttle =1 and each car has its own instance of lagfix?
Source code for lagfix link:
https://github.com/SailorSat/m2lagfixLagfix is a smart workaround, many thanks for sharing the source code