1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-04-22 02:33:18 +00:00

Include distance in GPS host response.

This commit is contained in:
Matthew Wilbern 2023-11-11 02:22:19 -07:00 committed by GitHub
parent 76968f2f28
commit b121189f36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -79,7 +79,7 @@ elseif sCommand == "host" then
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
-- 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
nServed = nServed + 1