Changeset 81 in flair-src for branches/mavlink/tools
- Timestamp:
- Sep 21, 2016, 3:07:48 PM (8 years ago)
- Location:
- branches/mavlink/tools/Controller/Mavlink/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/mavlink/tools/Controller/Mavlink/src/GuiGcs.cpp
r79 r81 106 106 // Parse param3 107 107 float param3 = std::stof(missionCommand.substr(0, missionCommand.find(delimiter))); 108 missionCommand.erase(0, missionCommand.find(delimiter) + delimiter.length()); 109 // Parse latitude 110 float latitude = std::stof(missionCommand.substr(0, missionCommand.find(delimiter))); 111 missionCommand.erase(0, missionCommand.find(delimiter) + delimiter.length()); 112 // Parse longitude 113 float longitude = std::stof(missionCommand.substr(0, missionCommand.find(delimiter))); 114 missionCommand.erase(0, missionCommand.find(delimiter) + delimiter.length()); 115 // Parse altitude 116 float altitude = std::stof(missionCommand.substr(0, missionCommand.find(delimiter))); 117 missionCommand.erase(0, missionCommand.find(delimiter) + delimiter.length()); 108 118 // cout << "[INFO] Mission item commands : " << command << ", " << param1 << ", " << param2 << ", " << param3 << std::endl; 109 mavCom->sendMissionItem(mavCom->target.getSysID(), mavCom->target.getCompID(), 0, MAV_FRAME_GLOBAL_RELATIVE_ALT, MavCommandGet(command), 0, 1, 0, 0, 0, 0, param1, param2, param3);119 mavCom->sendMissionItem(mavCom->target.getSysID(), mavCom->target.getCompID(), 0, MAV_FRAME_GLOBAL_RELATIVE_ALT, MavCommandGet(command), 0, 1, param1, param2, param3, 0, latitude, longitude, altitude); 110 120 mavCom->waitMissionAck(ACK_TIMEOUT); 111 121 } -
branches/mavlink/tools/Controller/Mavlink/src/GuiInterface.cpp
r79 r81 74 74 // comboCmd->AddItem("RETURN"); 75 75 // comboCmd->AddItem("JUMP"); 76 param1Field = new DoubleSpinBox(addCmdGroupBox->NewRow(), "Param1", 77 -90, 90, 0.5, 1, 3);78 param2Field = new DoubleSpinBox(addCmdGroupBox->NewRow(), "Param2", 79 -90, 90, 0.5, 1, 3);80 param3Field = new DoubleSpinBox(addCmdGroupBox->NewRow(), "Param3", 81 -90, 90, 0.5, 1, 3);76 param1Field = new DoubleSpinBox(addCmdGroupBox->NewRow(), "Param1", -90, 90, 0.5, 1, 0); 77 latitudeField = new DoubleSpinBox(addCmdGroupBox->LastRowLastCol(), "Longitude", -90, 90, 0.5, 1, 1.5); 78 param2Field = new DoubleSpinBox(addCmdGroupBox->NewRow(), "Param2", -90, 90, 0.5, 1, 0); 79 longitudeField = new DoubleSpinBox(addCmdGroupBox->LastRowLastCol(), "Latitude", -90, 90, 0.5, 1, -1.5); 80 param3Field = new DoubleSpinBox(addCmdGroupBox->NewRow(), "Param3", -90, 90, 0.5, 1, 0); 81 altitudeField = new DoubleSpinBox(addCmdGroupBox->LastRowLastCol(), "Altitude", -90, 90, 0.5, 1, 2); 82 82 btnAddMissionCmd = new PushButton(addCmdGroupBox->NewRow(), "Add mission cmd"); 83 83 btnDelMissionCmd = new PushButton(addCmdGroupBox->LastRowLastCol(), "Del mission cmd"); … … 145 145 stringStream.precision(1); 146 146 stringStream << fixed; 147 stringStream << commandsAvailable[comboCmd->CurrentIndex()] << "|" << param1Field->Value() << "|" << param2Field->Value() << "|" << param3Field->Value(); 147 stringStream << commandsAvailable[comboCmd->CurrentIndex()] << "|" << param1Field->Value() << "|" << param2Field->Value() \ 148 << "|" << param3Field->Value() << "|" << latitudeField->Value() << "|" << longitudeField->Value() << "|" << altitudeField->Value(); 148 149 return stringStream.str(); 149 150 } -
branches/mavlink/tools/Controller/Mavlink/src/GuiInterface.h
r77 r81 77 77 flair::gui::DoubleSpinBox* param1Field; 78 78 flair::gui::DoubleSpinBox* param2Field; 79 flair::gui::DoubleSpinBox* param3Field; 79 flair::gui::DoubleSpinBox* param3Field; 80 flair::gui::DoubleSpinBox* latitudeField; 81 flair::gui::DoubleSpinBox* longitudeField; 82 flair::gui::DoubleSpinBox* altitudeField; 80 83 flair::gui::PushButton* btnAddMissionCmd; 81 84 flair::gui::PushButton* btnDelMissionCmd;
Note:
See TracChangeset
for help on using the changeset viewer.