• R/O
  • SSH
  • HTTPS

qrobosdk: コミット


コミットメタ情報

リビジョン1806 (tree)
日時2010-04-26 11:45:48
作者satofumi

ログメッセージ

fixed UrgViewer bug

変更サマリ

差分

--- trunk/widgets/UrgDrawWidget/UrgDrawWidget.cpp (revision 1805)
+++ trunk/widgets/UrgDrawWidget/UrgDrawWidget.cpp (revision 1806)
@@ -83,7 +83,7 @@
8383
8484 pImpl(UrgDrawWidget* widget)
8585 : widget_(widget),
86- pixel_per_mm_(DefaultPixelPerMm), draw_mode_(Lines), draw_period_(0),
86+ pixel_per_mm_(DefaultPixelPerMm), draw_mode_(Lines), draw_period_(100),
8787 last_redraw_(0), last_timestamp_(0), width_(MinimumWidth),
8888 height_(MinimumHeight), clear_color_(Qt::white),
8989 rotate_offset_(Position<long>(0, 0, deg(90))), now_pressed_(false),
@@ -290,7 +290,7 @@
290290
291291 Color& line_color = line_it->line_color;
292292 double diff = last_timestamp_ - line_it->timestamp;
293- double alpha = 1.0 - diff / draw_period_;
293+ double alpha = 1.0 - (diff / draw_period_);
294294 glColor4d(line_color.r, line_color.g, line_color.b, alpha);
295295
296296 vector<Point<long> >& line_data = line_it->point_data;;
@@ -322,7 +322,7 @@
322322
323323 // !!! 関数にする
324324 double diff = last_timestamp_ - line_it->timestamp;
325- double alpha = 1.0 - diff / draw_period_;
325+ double alpha = 1.0 - (diff / draw_period_);
326326 glColor4d(1.0, 0.0, 0.0, alpha);
327327
328328 vector<Point<long> >::iterator end_it = line_it->point_data.end();
--- trunk/programs/UrgViewer/UrgViewerWindow.cpp (revision 1805)
+++ trunk/programs/UrgViewer/UrgViewerWindow.cpp (revision 1806)
@@ -306,6 +306,7 @@
306306 // URG 設定
307307 urg_.setTimestamp(ticks());
308308 int scan_msec = urg_.scanMsec();
309+ urg_draw_widget_.setDrawPeriod(scan_msec);
309310
310311 // データの取得開始
311312 capture_timer_.setInterval(scan_msec / 2);
@@ -555,7 +556,6 @@
555556 if (n > 0) {
556557 string base_name = tokens[n - 1] + "_error_log.txt";
557558 log_setName(base_name.c_str());
558- //pimpl->urg_draw_widget_.setDrawPeriod(1000);
559559 }
560560
561561 } else {
旧リポジトリブラウザで表示