mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-08-05 13:23:54 +00:00
Include distance in GPS host response.
This commit is contained in:
parent
76968f2f28
commit
b121189f36
@ -79,7 +79,7 @@ elseif sCommand == "host" then
|
|||||||
local sSide, sChannel, sReplyChannel, sMessage, nDistance = p1, p2, p3, p4, p5
|
local sSide, sChannel, sReplyChannel, sMessage, nDistance = p1, p2, p3, p4, p5
|
||||||
if sSide == sModemSide and sChannel == gps.CHANNEL_GPS and sMessage == "PING" and nDistance then
|
if sSide == sModemSide and sChannel == gps.CHANNEL_GPS and sMessage == "PING" and nDistance then
|
||||||
-- We received a ping message on the GPS channel, send a response
|
-- We received a ping message on the GPS channel, send a response
|
||||||
modem.transmit(sReplyChannel, gps.CHANNEL_GPS, { x, y, z })
|
modem.transmit(sReplyChannel, gps.CHANNEL_GPS, { x, y, z, nDistance })
|
||||||
|
|
||||||
-- Print the number of requests handled
|
-- Print the number of requests handled
|
||||||
nServed = nServed + 1
|
nServed = nServed + 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user