Changeset 222 in flair-src for trunk/tools/FlairGCS/src
- Timestamp:
- Feb 26, 2018, 9:36:16 AM (7 years ago)
- Location:
- trunk/tools/FlairGCS/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/FlairGCS/src/ConnectionLayout.cpp
r30 r222 136 136 137 137 QString ConnectionLayout::getRemoteName() { return remoteName; } 138 138 139 void ConnectionLayout::drawDatas(char *buf, int buf_size, uint16_t period, 139 140 bool big_endian) { -
trunk/tools/FlairGCS/src/DataPlot1D.cpp
r15 r222 104 104 step_s = period / 1000.; 105 105 plot(datas); 106 free(datas); 106 107 } 107 108 … … 110 111 if (event->button() == Qt::RightButton) { 111 112 QMenu *menu = new QMenu("nom", (QwtPlot *)this); 112 QAction * a, *b, *z;113 QAction *resetX, *resetY, *clear,*action; 113 114 114 a= menu->addAction("reset time view");115 b= menu->addAction("reset y view");115 resetX = menu->addAction("reset time view"); 116 resetY = menu->addAction("reset y view"); 116 117 menu->addSeparator(); 117 118 118 119 appendmenu(menu); 119 z = execmenu((QwtPlot *)this, menu, event->globalPos()); 120 121 menu->addSeparator(); 122 clear = menu->addAction("clear graph"); 123 124 action = execmenu((QwtPlot *)this, menu, event->globalPos()); 120 125 delete menu; 121 126 122 if ( z == a)127 if (action == resetX) 123 128 resetXView(); 124 if ( z == b)129 if (action == resetY) 125 130 resetYView(); 131 132 if (action == clear) 133 clearCurves(); 126 134 127 135 return true; -
trunk/tools/FlairGCS/src/DataRemote.cpp
r67 r222 29 29 menu->addSeparator(); 30 30 31 b= menu->addAction("auto refresh");32 b->setCheckable(true);33 b->setChecked(auto_refresh);31 autoRefresh = menu->addAction("auto refresh"); 32 autoRefresh->setCheckable(true); 33 autoRefresh->setChecked(auto_refresh); 34 34 35 c= menu->addAction(QString("set refresh rate (%1ms)")35 setRefreshRate = menu->addAction(QString("set refresh rate (%1ms)") 36 36 .arg((uint16_t)(qRound(refresh_rate * 1000)))); 37 c->setEnabled(auto_refresh);38 menu->addSeparator();37 setRefreshRate->setEnabled(auto_refresh); 38 /* menu->addSeparator(); 39 39 40 d = menu->addAction("log"); 41 d->setCheckable(true); 42 d->setChecked(is_logging); 40 log = menu->addAction("log"); 41 log->setCheckable(true); 42 log->setChecked(is_logging); 43 */ 43 44 } 44 45 45 46 QAction *DataRemote::execmenu(QWidget *parent, QMenu *menu, QPoint point) { 46 QAction * z;47 QAction *action; 47 48 48 z= menu->exec(point);49 action = menu->exec(point); 49 50 50 51 // auto_refresh=b->isChecked(); 51 52 52 if ( z == b) {53 SendPeriod(RefreshRate_ms(), b->isChecked());53 if (action == autoRefresh) { 54 SendPeriod(RefreshRate_ms(), autoRefresh->isChecked()); 54 55 } 55 56 56 if ( z == c) {57 if (action == setRefreshRate) { 57 58 bool ok; 58 59 // uint16_t time = QInputDialog::getInt(this, QString("Set refresh rate … … 64 65 if (ok == true && time != qRound(refresh_rate * 1000)) { 65 66 // refresh_rate=time/1000.; 66 SendPeriod(time, b->isChecked());67 SendPeriod(time, autoRefresh->isChecked()); 67 68 } 68 69 } 69 70 return z;70 71 return action; 71 72 } 72 73 -
trunk/tools/FlairGCS/src/DataRemote.h
r15 r222 36 36 private: 37 37 void SendPeriod(int period, bool auto_refresh); 38 QAction *b, *c, *d; 38 QAction *autoRefresh, *setRefreshRate; 39 //QAction **log;//todo implement this feature (log directly in gcs, in case of uav program crash) 39 40 }; 40 41 -
trunk/tools/FlairGCS/src/Map.cpp
r67 r222 107 107 tr("Failed to find any map services. Please ensure that " 108 108 "the location services plugins for Qt Mobility are " 109 "installed and, if necessary, set the IGEP_ROOT "109 "installed and, if necessary, set the OECORE_HOST_SYSROOT " 110 110 "environment variable to the good location.")); 111 111 -
trunk/tools/FlairGCS/src/UsSensorPlot.cpp
r221 r222 102 102 103 103 firstPeakStart = new QwtPlotMarker(); 104 QwtSymbol* s=new QwtSymbol( QwtSymbol::Diamond, Qt::blue, Qt::NoPen, QSize( 10, 10 ) ); 105 firstPeakStart->setSymbol(s); 106 //firstPeakStart->setValue( QPointF( 1000, 200 ) ); 104 QwtSymbol* s1=new QwtSymbol( QwtSymbol::Diamond, Qt::blue, Qt::NoPen, QSize( 10, 10 ) ); 105 firstPeakStart->setSymbol(s1); 107 106 //m->setLabel("toto" ); 108 107 firstPeakStart->attach( plot ); 109 108 110 109 firstPeakEnd = new QwtPlotMarker(); 111 //QwtSymbol* s=new QwtSymbol( QwtSymbol::Diamond, Qt::blue, Qt::NoPen, QSize( 10, 10 ) );112 firstPeakEnd->setSymbol(s );110 QwtSymbol* s2=new QwtSymbol( QwtSymbol::Diamond, Qt::blue, Qt::NoPen, QSize( 10, 10 ) ); 111 firstPeakEnd->setSymbol(s2); 113 112 firstPeakEnd->attach( plot ); 114 113 115 114 secondPeakStart = new QwtPlotMarker(); 116 secondPeakStart->setSymbol(s); 115 QwtSymbol* s3=new QwtSymbol( QwtSymbol::Diamond, Qt::black, Qt::NoPen, QSize( 10, 10 ) ); 116 secondPeakStart->setSymbol(s3); 117 117 secondPeakStart->attach( plot ); 118 118 119 119 secondPeakEnd = new QwtPlotMarker(); 120 secondPeakEnd->setSymbol(s); 120 QwtSymbol* s4=new QwtSymbol( QwtSymbol::Diamond, Qt::black, Qt::NoPen, QSize( 10, 10 ) ); 121 secondPeakEnd->setSymbol(s4); 121 122 secondPeakEnd->attach( plot ); 122 123 } -
trunk/tools/FlairGCS/src/main.cpp
r45 r222 8 8 #include <qmetatype.h> 9 9 #include <tclap/CmdLine.h> 10 #include <execinfo.h> 11 #include <signal.h> 10 12 11 13 #include "Manager.h" … … 39 41 } 40 42 43 void seg_fault(int sig __attribute__((unused))) { 44 void *bt[32]; 45 int nentries; 46 47 printf("Segmentation fault:\n"); 48 /* Dump a backtrace of the frame which caused the segfault: */ 49 nentries = backtrace(bt, sizeof(bt) / sizeof(bt[0])); 50 backtrace_symbols_fd(bt, nentries, fileno(stdout)); 51 52 exit(1); 53 } 54 41 55 int main(int argc, char *argv[]) { 42 56 … … 52 66 53 67 compile_info("FlairGCS"); 68 69 // catch segfault 70 signal(SIGSEGV, seg_fault); 54 71 55 72 parseOptions(argc, argv);
Note:
See TracChangeset
for help on using the changeset viewer.