feat: started adding editable laser/infrared

This commit is contained in:
Davide Passoni
2025-01-29 17:25:09 +01:00
parent 74e2332b17
commit cc902aec04
16 changed files with 490 additions and 10 deletions

View File

@@ -264,7 +264,7 @@ string Laser::getString()
{
std::ostringstream commandSS;
commandSS.precision(10);
commandSS << "Olympus.laser, "
commandSS << "Olympus.fireLaser, "
<< ID << ", "
<< code << ", "
<< destination.lat << ", "
@@ -277,7 +277,7 @@ string Infrared::getString()
{
std::ostringstream commandSS;
commandSS.precision(10);
commandSS << "Olympus.infrared, "
commandSS << "Olympus.fireInfrared, "
<< ID << ", "
<< destination.lat << ", "
<< destination.lng;

View File

@@ -128,6 +128,9 @@ void Server::handle_get(http_request request)
/* Bullseyes data */
else if (URI.compare(BULLSEYE_URI) == 0 && missionData.has_object_field(L"bullseyes"))
answer[L"bullseyes"] = missionData[L"bullseyes"];
/* Spots (laser/IR) data */
else if (URI.compare(SPOTS_URI) == 0 && missionData.has_object_field(L"spots"))
answer[L"spots"] = missionData[L"spots"];
/* Mission data */
else if (URI.compare(MISSION_URI) == 0 && missionData.has_object_field(L"mission")) {
answer[L"mission"] = missionData[L"mission"];