From: Jérémie D. <Ba...@us...> - 2011-03-29 13:25:19
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via 9d4506550842ef4ad199135517ec1033e40dae93 (commit) from fd224ab8ffc2fdc42e03a8aed77b0818592a0844 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 9d4506550842ef4ad199135517ec1033e40dae93 Author: Jérémie Dimino <je...@di...> Date: Tue Mar 29 15:24:34 2011 +0200 [info] allow to set the speed/acceleration for rotations and movements separately ----------------------------------------------------------------------- Changes: diff --git a/info/control2011/src/tools/krobot_viewer.ml b/info/control2011/src/tools/krobot_viewer.ml index df3b383..8dd2f54 100644 --- a/info/control2011/src/tools/krobot_viewer.ml +++ b/info/control2011/src/tools/krobot_viewer.ml @@ -456,8 +456,8 @@ module Board = struct let alpha = atan2 (y -. board.state.y) (x -. board.state.x) -. board.state.theta in lwt () = Krobot_message.send board.bus (Unix.gettimeofday (), Motor_turn(alpha, - board.ui#speed#adjustment#value, - board.ui#acceleration#adjustment#value)) in + board.ui#rotation_speed#adjustment#value, + board.ui#rotation_acceleration#adjustment#value)) in lwt () = wait_done board in (* Move the robot. *) @@ -465,8 +465,8 @@ module Board = struct let dist = sqrt (sqr (x -. board.state.x) +. sqr (y -. board.state.y)) in lwt () = Krobot_message.send board.bus (Unix.gettimeofday (), Motor_move(dist, - board.ui#speed#adjustment#value, - board.ui#acceleration#adjustment#value)) in + board.ui#moving_speed#adjustment#value, + board.ui#moving_acceleration#adjustment#value)) in lwt () = wait_done board in (* Remove the point. *) diff --git a/info/control2011/src/tools/krobot_viewer_ui.glade b/info/control2011/src/tools/krobot_viewer_ui.glade index a08240e..641dc86 100644 --- a/info/control2011/src/tools/krobot_viewer_ui.glade +++ b/info/control2011/src/tools/krobot_viewer_ui.glade @@ -286,12 +286,12 @@ <child> <widget class="GtkTable" id="table1"> <property name="visible">True</property> - <property name="n_rows">2</property> + <property name="n_rows">4</property> <property name="n_columns">2</property> <child> <widget class="GtkLabel" id="label3"> <property name="visible">True</property> - <property name="label" translatable="yes">Speed: </property> + <property name="label" translatable="yes">Moving speed: </property> </widget> <packing> <property name="x_options">GTK_FILL</property> @@ -301,7 +301,7 @@ <child> <widget class="GtkLabel" id="label4"> <property name="visible">True</property> - <property name="label" translatable="yes">Acceleration: </property> + <property name="label" translatable="yes">Moving acceleration: </property> </widget> <packing> <property name="top_attach">1</property> @@ -311,11 +311,11 @@ </packing> </child> <child> - <widget class="GtkSpinButton" id="speed"> + <widget class="GtkSpinButton" id="moving_speed"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="invisible_char">●</property> - <property name="adjustment">0.5 0 2 0.10000000000000001 0.20000000000000001 0.20000000000000001</property> + <property name="adjustment">0.5 0 2 0.10000000000000001 0 0</property> <property name="digits">2</property> <property name="numeric">True</property> </widget> @@ -326,11 +326,11 @@ </packing> </child> <child> - <widget class="GtkSpinButton" id="acceleration"> + <widget class="GtkSpinButton" id="moving_acceleration"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="invisible_char">●</property> - <property name="adjustment">1 0 10 0.10000000000000001 0.20000000000000001 0.20000000000000001</property> + <property name="adjustment">1 0 10 0.10000000000000001 0 0</property> <property name="digits">2</property> <property name="numeric">True</property> </widget> @@ -342,6 +342,62 @@ <property name="y_options">GTK_FILL</property> </packing> </child> + <child> + <widget class="GtkLabel" id="label5"> + <property name="visible">True</property> + <property name="label" translatable="yes">Rotation speed: </property> + </widget> + <packing> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">GTK_FILL</property> + <property name="y_options">GTK_FILL</property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="label6"> + <property name="visible">True</property> + <property name="label" translatable="yes">Rotation acceleration: </property> + </widget> + <packing> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + </packing> + </child> + <child> + <widget class="GtkSpinButton" id="rotation_speed"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="invisible_char">•</property> + <property name="adjustment">0.99999999999999989 0 4 0.10000000000000001 0 0</property> + <property name="digits">2</property> + <property name="numeric">True</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="y_options">GTK_FILL</property> + </packing> + </child> + <child> + <widget class="GtkSpinButton" id="rotation_acceleration"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="invisible_char">•</property> + <property name="adjustment">2.0000000000000009 0 10 0.10000000000000001 0 0</property> + <property name="digits">2</property> + <property name="numeric">True</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + <property name="y_options">GTK_FILL</property> + </packing> + </child> </widget> <packing> <property name="expand">False</property> @@ -349,6 +405,9 @@ </packing> </child> <child> + <placeholder/> + </child> + <child> <widget class="GtkViewport" id="viewport1"> <property name="visible">True</property> <property name="resize_mode">queue</property> @@ -357,7 +416,7 @@ </child> </widget> <packing> - <property name="position">7</property> + <property name="position">8</property> </packing> </child> </widget> hooks/post-receive -- krobot |