Destination now shows up in turn instructions
This commit is contained in:
parent
3712868831
commit
17738c3861
@ -41,8 +41,9 @@ struct TurnInstructionsClass {
|
|||||||
const static short LeaveRoundAbout = 12;
|
const static short LeaveRoundAbout = 12;
|
||||||
const static short StayOnRoundAbout = 13;
|
const static short StayOnRoundAbout = 13;
|
||||||
const static short StartAtEndOfStreet = 14;
|
const static short StartAtEndOfStreet = 14;
|
||||||
|
const static short ReachedYourDestination = 15;
|
||||||
|
|
||||||
std::string TurnStrings[15];
|
std::string TurnStrings[16];
|
||||||
std::string Ordinals[12];
|
std::string Ordinals[12];
|
||||||
|
|
||||||
//This is a hack until c++0x is available enough to use initializer lists.
|
//This is a hack until c++0x is available enough to use initializer lists.
|
||||||
@ -62,6 +63,7 @@ struct TurnInstructionsClass {
|
|||||||
TurnStrings[12] = "Leave roundabout";
|
TurnStrings[12] = "Leave roundabout";
|
||||||
TurnStrings[13] = "Stay on roundabout";
|
TurnStrings[13] = "Stay on roundabout";
|
||||||
TurnStrings[14] = "Start";
|
TurnStrings[14] = "Start";
|
||||||
|
TurnStrings[15] = "You have reached your destination";
|
||||||
|
|
||||||
Ordinals[0] = "zeroth";
|
Ordinals[0] = "zeroth";
|
||||||
Ordinals[1] = "first";
|
Ordinals[1] = "first";
|
||||||
|
@ -147,6 +147,22 @@ public:
|
|||||||
if(segment.necessary)
|
if(segment.necessary)
|
||||||
++prefixSumOfNecessarySegments;
|
++prefixSumOfNecessarySegments;
|
||||||
}
|
}
|
||||||
|
reply.content += ",[\"";
|
||||||
|
reply.content += TurnInstructions.TurnStrings[TurnInstructions.ReachedYourDestination];
|
||||||
|
reply.content += "\",\"";
|
||||||
|
reply.content += "\",";
|
||||||
|
reply.content += "0";
|
||||||
|
reply.content += ",";
|
||||||
|
intToString(prefixSumOfNecessarySegments-1, tmpLength);
|
||||||
|
reply.content += tmpLength;
|
||||||
|
reply.content += ",";
|
||||||
|
reply.content += "0";
|
||||||
|
reply.content += ",\"";
|
||||||
|
reply.content += "\",\"";
|
||||||
|
reply.content += Azimuth::Get(0.0);
|
||||||
|
reply.content += "\",";
|
||||||
|
reply.content += "0.0";
|
||||||
|
reply.content += "]";
|
||||||
}
|
}
|
||||||
reply.content += "],";
|
reply.content += "],";
|
||||||
//list all viapoints so that the client may display it
|
//list all viapoints so that the client may display it
|
||||||
|
Loading…
Reference in New Issue
Block a user