• R/O
  • SSH
  • HTTPS

qrobosdk: コミット


コミットメタ情報

リビジョン1932 (tree)
日時2010-10-03 06:46:01
作者satofumi

ログメッセージ

fixed Font error log output

変更サマリ

差分

--- trunk/libs/running/myrobot_drive/encoder_control.c (revision 1931)
+++ trunk/libs/running/myrobot_drive/encoder_control.c (revision 1932)
@@ -29,7 +29,7 @@
2929
3030 // TCLKD(PA9), TCLKC(PA8)
3131 PFC.PACRL3.WORD &= ~0x00ff;
32- PFC.PACRL3.WORD |= 0x00ff;
32+ PFC.PACRL3.WORD |= 0x0011;
3333
3434 MTU2.TSTR.BYTE |= 0x04;
3535 }
--- trunk/libs/running/myrobot_drive/samples/pwm_setDuty.c (revision 1931)
+++ trunk/libs/running/myrobot_drive/samples/pwm_setDuty.c (revision 1932)
@@ -27,7 +27,7 @@
2727 led_initialize();
2828 mtu_initialize();
2929
30- unsigned char duty = 128;
30+ unsigned char duty = 64;
3131 int i;
3232 for (i = 0; i < 2; ++i) {
3333 pwm_initialize(i);
--- trunk/libs/running/runCtrl/utils/c/Makefile (revision 1931)
+++ trunk/libs/running/runCtrl/utils/c/Makefile (revision 1932)
@@ -38,7 +38,7 @@
3838 $(UTILS_C_LIB)(tcpip_device.o) \
3939 $(UTILS_C_LIB)(get_keyword.o) \
4040
41-allTest.o : ../../unittest/allTest.cpp
41+allTest.o : ../../../../../unittest/allTest.cpp
4242 $(CXX) $(CXXFLAGS) $< -c -o $@
4343
4444 ../cpp/tcpipServer.o ../cpp/tcpipDevice.o ../cpp/sdlBase.o ../connectionDevice.o :
--- trunk/libs/controller/sdl/samples/usbJoystickSample.cpp (revision 1931)
+++ trunk/libs/controller/sdl/samples/usbJoystickSample.cpp (revision 1932)
@@ -20,7 +20,7 @@
2020 {
2121 // Joystick 動作には、SDL のスクリーンが必要
2222 Screen screen;
23- screen.show();
23+ //screen.show();
2424
2525 // 最初に認識した Joystick と接続を確立する
2626 mUsbJoystick joystick(argc, argv);
--- trunk/libs/gui/Font.cpp (revision 1931)
+++ trunk/libs/gui/Font.cpp (revision 1932)
@@ -39,7 +39,7 @@
3939 {
4040 if (! ttf_font_) {
4141 error_message_ = TTF_GetError();
42- log_printf("%s\n", error_message_.c_str());
42+ //log_printf("%s\n", error_message_.c_str());
4343 }
4444 }
4545
--- trunk/libs/gui/CanvasSurface.h (revision 1931)
+++ trunk/libs/gui/CanvasSurface.h (revision 1932)
@@ -40,6 +40,8 @@
4040 Font* font(void) const;
4141 void setClearColor(const qrk::Color& color);
4242 void clear(void);
43+
44+ // !!! drawText() の色は、登録した Font オブジェクトで調整すること
4345 void setColor(const qrk::Color& color);
4446 void setPointSize(float size);
4547 void setLineWidth(float width);
--- trunk/libs/range_sensor/UrgDevice.cpp (revision 1931)
+++ trunk/libs/range_sensor/UrgDevice.cpp (revision 1932)
@@ -194,6 +194,7 @@
194194 swap(data, pimpl_->data_buffer_.front().length_data);
195195 if (timestamp) {
196196 *timestamp = pimpl_->data_buffer_.front().timestamp;
197+ //fprintf(stderr, "MD: %ld, %ld\n", ticks(), *timestamp);
197198 }
198199 pimpl_->data_buffer_.pop_front();
199200
@@ -644,6 +645,8 @@
644645
645646 bool setTimestamp(int timestamp, int* response_msec, int* force_delay_msec)
646647 {
648+ long prepare_ticks = ticks();
649+
647650 // TM0 モードに遷移
648651 // !!! true, false をキーワードで置換すること
649652 if (! scip_.setRawTimestampMode(true)) {
@@ -654,6 +657,9 @@
654657 int urg_timestamp = 0;
655658 int first_ticks = ticks();
656659 if (scip_.rawTimestamp(&urg_timestamp)) {
660+
661+ //fprintf(stderr, "raw: %d, %d\n", timestamp, urg_timestamp);
662+
657663 int delay = ticks() - first_ticks;
658664 if (force_delay_msec) {
659665 delay = *force_delay_msec;
@@ -661,7 +667,9 @@
661667 if (response_msec) {
662668 *response_msec = delay;
663669 }
664- timestamp_offset_ = (urg_timestamp + (delay / 2)) - timestamp;
670+ timestamp_offset_ =
671+ (urg_timestamp + (delay / 2))
672+ - (timestamp + (first_ticks - prepare_ticks));
665673 }
666674
667675 // URG タイムスタンプ用のオフセット時間を計算し、TM2 で抜ける
--- trunk/libs/range_sensor/simple_samples/gdScan.cpp (revision 1931)
+++ trunk/libs/range_sensor/simple_samples/gdScan.cpp (revision 1932)
@@ -47,7 +47,7 @@
4747 for (int j = 0; j < n; ++j) {
4848 // The distance data that are less than urg_minDistance() are shown as
4949 // invalide values
50- printf("%d:%ld, ", j, data[j]);
50+ printf("%d:%ld, ", j, data[j]); // index, length [mm]
5151 }
5252 printf("\n");
5353 }
--- trunk/libs/sh7125/cmt_control.c (revision 1931)
+++ trunk/libs/sh7125/cmt_control.c (revision 1932)
@@ -66,24 +66,4 @@
6666 }
6767
6868 CMT0.CMCSR.WORD &= ~0x0080;
69-
70- asm("mov r14,r15");
71- asm("lds.l @r15+,pr");
72- asm("mov.l @r15+,r7");
73- asm("mov.l @r15+,r6");
74- asm("mov.l @r15+,r5");
75- asm("mov.l @r15+,r4");
76- asm("mov.l @r15+,r3");
77- asm("mov.l @r15+,r2");
78- asm("mov.l @r15+,r1");
79- asm("mov.l @r15+,r0");
80- asm("lds.l @r15+,macl");
81- asm("lds.l @r15+,mach");
82- asm("mov.l @r15+,r14");
83- asm("rte");
84- asm("nop");
85- asm("nop");
86- asm("nop");
87- asm("nop");
88- asm("nop");
8969 }
--- trunk/libs/embedded_utils/ring_buffer.c (revision 1931)
+++ trunk/libs/embedded_utils/ring_buffer.c (revision 1932)
@@ -1,6 +1,6 @@
11 /*!
22 \file
3- \brief リングバッファ
3+ \brief 繝ェ繝ウ繧ー繝舌ャ繝輔ぃ
44
55 \author Satofumi KAMIMURA
66
@@ -54,9 +54,9 @@
5454 int free_size = ring_capacity(ring) - ring_size(ring);
5555 int push_size = (size > free_size) ? free_size : size;
5656
57- // データ配置
57+ // 繝??繧ソ驟咲スョ
5858 if (ring->first <= ring->last) {
59- // last から buffer_size 終端までに配置
59+ // last 縺九i buffer_size 邨らォッ縺セ縺ァ縺ォ驟咲スョ
6060 int left_size = 0;
6161 int to_end = ring->buffer_size - ring->last;
6262 int move_size = (to_end > push_size) ? push_size : to_end;
@@ -67,13 +67,13 @@
6767
6868 left_size = push_size - move_size;
6969 if (left_size > 0) {
70- // 0 から first の前までを配置
70+ // 0 縺九i first 縺ョ蜑阪∪縺ァ繧帝?鄂ョ
7171 byte_move(ring->buffer, &data[move_size], left_size);
7272 ring->last = left_size;
7373 }
7474 } else {
75- // last から first の前まで配置
76- byte_move(&ring->buffer[ring->last], data, size);
75+ // last 縺九i first 縺ョ蜑阪∪縺ァ驟咲スョ
76+ byte_move(&ring->buffer[ring->last], data, push_size);
7777 ring->last += push_size;
7878 }
7979 return push_size;
@@ -82,9 +82,9 @@
8282
8383 int ring_read(ring_buffer_t *ring, char *buffer, int size)
8484 {
85- // データ取得
86- int now_size = ring_size(ring);
87- int pop_size = (size > now_size) ? now_size : size;
85+ // 繝??繧ソ蜿門セ
86+ int current_size = ring_size(ring);
87+ int pop_size = (size > current_size) ? current_size : size;
8888
8989 if (ring->first <= ring->last) {
9090 byte_move(buffer, &ring->buffer[ring->first], pop_size);
@@ -91,10 +91,10 @@
9191 ring->first += pop_size;
9292
9393 } else {
94- // first から buffer_size 終端までを配置
94+ // first 縺九i buffer_size 邨らォッ縺セ縺ァ繧帝?鄂ョ
9595 int left_size = 0;
9696 int to_end = ring->buffer_size - ring->first;
97- int move_size = (to_end > pop_size) ? pop_size : to_end;
97+ int move_size = (pop_size < to_end) ? pop_size : to_end;
9898 byte_move(buffer, &ring->buffer[ring->first], move_size);
9999
100100 ring->first += move_size;
@@ -102,10 +102,9 @@
102102
103103 left_size = pop_size - move_size;
104104 if (left_size > 0) {
105- // 0 から last の前までを配置
105+ // 0 縺九i last 縺ョ蜑阪∪縺ァ繧帝?鄂ョ
106106 byte_move(&buffer[move_size], ring->buffer, left_size);
107-
108- ring->first = left_size;
107+ ring->first += left_size;
109108 }
110109 }
111110 return pop_size;
@@ -112,6 +111,7 @@
112111 }
113112
114113
114+#if 0
115115 int ring_readPtr(ring_buffer_t *ring, char **ptr, int size)
116116 {
117117 int diff;
@@ -133,3 +133,4 @@
133133
134134 return read_size;
135135 }
136+#endif
--- trunk/libs/embedded_utils/ring_buffer.h (revision 1931)
+++ trunk/libs/embedded_utils/ring_buffer.h (revision 1932)
@@ -80,7 +80,9 @@
8080 extern int ring_read(ring_buffer_t *ring, char *buffer, int size);
8181
8282
83+#if 0
8384 //! 内部ポインタから直に読み出しを行う
8485 extern int ring_readPtr(ring_buffer_t *ring, char **ptr, int size);
86+#endif
8587
8688 #endif /* ! RING_BUFFER_H */
--- trunk/programs/Makefile (revision 1931)
+++ trunk/programs/Makefile (revision 1932)
@@ -2,24 +2,25 @@
22 # Satofumi KAMIMURA
33 # $Id$
44
5+QMAKE_COMMAND = qmake
56
67 all :
7- cd UrgViewer/ && qmake && $(MAKE)
8- cd UrgInformation/ && qmake && $(MAKE)
9- cd ScipLineDecoder/ && qmake && $(MAKE)
10- cd ScipTerminal/ && qmake && $(MAKE)
11- cd UrgScanner/ && qmake && $(MAKE)
12- cd UrgRecorder/ && qmake && $(MAKE)
13- cd UrgPorts/ && qmake && $(MAKE)
14- cd MultiUrgViewer/ && qmake && $(MAKE)
15- cd ScipPlayer/ && qmake && $(MAKE)
16- cd ScipRecorder/ && qmake && $(MAKE)
8+ cd UrgViewer/ && $(QMAKE_COMMAND) && $(MAKE)
9+ cd UrgInformation/ && $(QMAKE_COMMAND) && $(MAKE)
10+ cd ScipLineDecoder/ && $(QMAKE_COMMAND) && $(MAKE)
11+ cd ScipTerminal/ && $(QMAKE_COMMAND) && $(MAKE)
12+ cd UrgScanner/ && $(QMAKE_COMMAND) && $(MAKE)
13+ cd UrgRecorder/ && $(QMAKE_COMMAND) && $(MAKE)
14+ cd UrgPorts/ && $(QMAKE_COMMAND) && $(MAKE)
15+ cd MultiUrgViewer/ && $(QMAKE_COMMAND) && $(MAKE)
16+ cd ScipPlayer/ && $(QMAKE_COMMAND) && $(MAKE)
17+ cd ScipRecorder/ && $(QMAKE_COMMAND) && $(MAKE)
1718 -cd UrgLasers/ && $(MAKE)
18- cd cUrgViewer/ && qmake && $(MAKE)
19- cd ItemShuffle/ && qmake && $(MAKE)
20- cd sh7045writer/ && qmake && $(MAKE)
21- -cd qtmclock/qtmclock_src/ && qmake && $(MAKE)
22- -cd qlm_batmon/qlm_batmon && qmake && $(MAKE)
19+ cd cUrgViewer/ && $(QMAKE_COMMAND) && $(MAKE)
20+ cd ItemShuffle/ && $(QMAKE_COMMAND) && $(MAKE)
21+ cd sh7045writer/ && $(QMAKE_COMMAND) && $(MAKE)
22+ -cd qtmclock/qtmclock_src/ && $(QMAKE_COMMAND) && $(MAKE)
23+ -cd qlm_batmon/qlm_batmon && $(QMAKE_COMMAND) && $(MAKE)
2324 -cd qpilot/ && $(MAKE) clean
2425 -cd FlyFlapp/ && $(MAKE)
2526
旧リポジトリブラウザで表示