Changeset 50 in flair-src for branches/mavlink/tools/Controller/Mavlink
- Timestamp:
- Jul 26, 2016, 5:28:43 PM (8 years ago)
- Location:
- branches/mavlink/tools/Controller/Mavlink
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/mavlink/tools/Controller/Mavlink/src/Mavlink_test.cpp
r47 r50 65 65 add_wptGroupBox = new GroupBox(settingsTab->NewRow(), "Add waypoint"); 66 66 latField = new DoubleSpinBox(add_wptGroupBox->NewRow(), "Latitude", 67 -90, 90, 0.00 01, 4, 3);67 -90, 90, 0.001, 3, 3); 68 68 lonField = new DoubleSpinBox(add_wptGroupBox->LastRowLastCol(), "Longitude", 69 -180, 180, 0.00 01, 4, 3);69 -180, 180, 0.001, 3, 3); 70 70 btn_add_mission_wpt = new PushButton(add_wptGroupBox->NewRow(), "Add mission wpt"); 71 71 btn_add_entrance_wpt = new PushButton(add_wptGroupBox->LastRowLastCol(), "Add entrance wpt"); … … 135 135 while (!ToBeStopped()) { 136 136 // Thread::Info("Debug: Mavlink acquisition loop\n"); 137 Thread::SleepMS( 1000);137 Thread::SleepMS(500); 138 138 // latValue = latField->Value(); 139 139 // lonValue = lonField->Value(); 140 140 141 // Check the values of the buttons142 // First tab143 141 if (btn_initialize->Clicked()) { 144 142 MissionInitialize(); … … 153 151 MissionKill(); 154 152 } 155 // Second tab156 153 if (btn_add_mission_wpt->Clicked()) { 157 std::ostringstream stringStream; 158 stringStream.precision(3); 159 stringStream << fixed; 160 stringStream << latField->Value() << " - " << lonField->Value(); 161 list_mission_wpt->AddItem(stringStream.str()); 154 list_mission_wpt->AddItem(GetWptLatLon()); 162 155 } 163 156 if (btn_add_entrance_wpt->Clicked()) { 164 EntranceWptAdd();157 list_entrance_wpt->AddItem(GetWptLatLon()); 165 158 } 166 159 if (btn_add_exit_wpt->Clicked()) { 167 ExitWptAdd();160 list_exit_wpt->AddItem(GetWptLatLon()); 168 161 } 169 162 if (btn_remove_mission_wpt->Clicked()) { … … 275 268 } 276 269 Thread::Info("Debug: end of decode loop\n"); 270 } 271 272 std::string Mavlink::GetWptLatLon() { 273 std::ostringstream stringStream; 274 stringStream.precision(3); 275 stringStream << fixed; 276 stringStream << latField->Value() << " - " << lonField->Value(); 277 return stringStream.str(); 277 278 } 278 279 -
branches/mavlink/tools/Controller/Mavlink/src/Mavlink_test.h
r47 r50 84 84 gui::PushButton* btn_remove_entrance_wpt; 85 85 gui::PushButton* btn_remove_exit_wpt; 86 // gui::Label* label_mission_wpt;87 // gui::Label* label_mission_wpt_list;88 // gui::Label* label_entrance_wpt;89 // gui::Label* label_entrance_wpt_list;90 // gui::Label* label_exit_wpt;91 // gui::Label* label_exit_wpt_list;92 93 // Remove wpt groupbox94 // gui::GroupBox* show_wptGroupBox;95 // gui::ComboBox* cmb_box_mission_wpt;96 // gui::ComboBox* cmb_box_mission_wpt;97 // gui::ComboBox* cmb_box_mission_wpt;98 86 99 87 // Action wpt groupbox … … 108 96 // reimplement the run of the Thread class 109 97 void Run(); 98 99 std::string GetWptLatLon(); 110 100 111 101 // First tab callbacks
Note:
See TracChangeset
for help on using the changeset viewer.