This updates code in both cyberphyslib and the infotainment server to reduce (in some cases, significantly) the number of position CAN messages on the network. It makes the following modifications:
can_out.py will not send position CAN messages for any position or heading that differs by less than a constant (from config.py, currently set to 0.01 for both heading and position) from the previous message it sent
the infotainment server gets an optional second command line parameter, which is the IP address to accept position updates from (presumably the simulation PC)
the hacked infotainment server gets new compile-time parameter settings, HACKED_BROADCAST_ADDRESS and HACKED_POSITION_ADDRESS, to configure its broadcast address and position update address, respectively, since it does not take command line parameters. To use, do make HACKED_BROADCAST_ADDRESS=000.000.000.000 HACKED_POSITION_ADDRESS=000.000.000.000. When omitted, the defaults are a broadcast address of 255.255.255.255 and no restriction on where to accept position updates from (on the main CAN network).
This updates code in both cyberphyslib and the infotainment server to reduce (in some cases, significantly) the number of position CAN messages on the network. It makes the following modifications:
can_out.py
will not send position CAN messages for any position or heading that differs by less than a constant (fromconfig.py
, currently set to 0.01 for both heading and position) from the previous message it sentHACKED_BROADCAST_ADDRESS
andHACKED_POSITION_ADDRESS
, to configure its broadcast address and position update address, respectively, since it does not take command line parameters. To use, domake HACKED_BROADCAST_ADDRESS=000.000.000.000 HACKED_POSITION_ADDRESS=000.000.000.000
. When omitted, the defaults are a broadcast address of 255.255.255.255 and no restriction on where to accept position updates from (on the main CAN network).