You can subscribe to this list here.
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(13) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
(50) |
Feb
(137) |
Mar
(84) |
Apr
(36) |
May
(100) |
Jun
(5) |
Jul
|
Aug
(4) |
Sep
(13) |
Oct
(1) |
Nov
(4) |
Dec
(22) |
2011 |
Jan
(4) |
Feb
(9) |
Mar
(113) |
Apr
(76) |
May
(31) |
Jun
(19) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
(4) |
Feb
|
Mar
(2) |
Apr
(6) |
May
(19) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
(2) |
Apr
(22) |
May
(6) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Jérémie D. <Ba...@us...> - 2010-05-28 01:32:21
|
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 5d8a1f897c0083e62e6beb0f2d82458cf4760cf9 (commit) via 376c4fe2d3eee0e85111cf2d9b1dc70afce658ee (commit) from eef31e41b3f2d1ac1bbd5b320e65ca187efb1293 (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 5d8a1f897c0083e62e6beb0f2d82458cf4760cf9 Author: Jérémie Dimino <je...@di...> Date: Fri May 28 02:53:34 2010 +0200 typo commit 376c4fe2d3eee0e85111cf2d9b1dc70afce658ee Author: Jérémie Dimino <je...@di...> Date: Fri May 28 02:50:43 2010 +0200 do not fail if the rx64 card fails to open ----------------------------------------------------------------------- Changes: diff --git a/info/control/driver/krobot_dynamixel_over_serial.ml b/info/control/driver/krobot_dynamixel_over_serial.ml index 104c954..27374fd 100644 --- a/info/control/driver/krobot_dynamixel_over_serial.ml +++ b/info/control/driver/krobot_dynamixel_over_serial.ml @@ -465,11 +465,16 @@ class device ?timeout ~name ~path ~rate () = let state, set_state = React.S.create `Down in object val mutable card = None + val mutable closed = false method name = name method state : [ `Up | `Down ] React.signal = state method close = - match card with + closed <- true; + let card' = card in + card <- None; + set_state `Down; + match card' with | Some card -> close card | None -> @@ -513,17 +518,21 @@ object initializer let rec loop () = - lwt c = make ?timeout ~name ~path ~rate in - card <- Some c; - set_state `Up; - c.watch >>= function - | `Closed -> - set_state `Down; - return () - | `Error _ -> - set_state `Down; - lwt () = Lwt_unix.sleep 0.1 in - loop () + lwt () = + try_lwt + lwt c = make ?timeout ~name ~path ~rate in + card <- Some c; + set_state `Up; + lwt _ = c.watch in + return () + with exn -> + return () + in + if closed then + return () + else + lwt () = Lwt_unix.sleep 0.1 in + loop () in ignore (loop ()) end diff --git a/info/control/lib-krobot/krobot_driver.ml b/info/control/lib-krobot/krobot_driver.ml index 62863da..d93e38b 100644 --- a/info/control/lib-krobot/krobot_driver.ml +++ b/info/control/lib-krobot/krobot_driver.ml @@ -34,7 +34,7 @@ let card_interface krobot = card krobot "Interface" let card_sensors krobot = card krobot "Sensors" let card_motors krobot = card krobot "Motors" let card_monitoring krobot = card krobot "Monitoring" -let card_rx64 krobot = card krobot "Rx64" +let card_rx64 krobot = card krobot "RX64" module Analogic_motor = struct hooks/post-receive -- krobot |
From: Jérémie D. <Ba...@us...> - 2010-05-28 00:35:27
|
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 eef31e41b3f2d1ac1bbd5b320e65ca187efb1293 (commit) from 6ed445d2f79860a1a6251c6013b25c2d98f3fad2 (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 eef31e41b3f2d1ac1bbd5b320e65ca187efb1293 Author: Jérémie Dimino <je...@di...> Date: Fri May 28 02:30:28 2010 +0200 refactoring ----------------------------------------------------------------------- Changes: diff --git a/info/control/Makefile b/info/control/Makefile index 5a20a41..9f95f4a 100644 --- a/info/control/Makefile +++ b/info/control/Makefile @@ -7,13 +7,9 @@ PREFIX := $(HOME) -OC := ocamlbuild +OC := ocamlbuild -classic-display OF := ocamlfind -ifeq ($(TERM),dumb) -OC += -classic-display -endif - .PHONY: all all: $(OC) all @@ -25,34 +21,20 @@ clean: .PHONY: install install: $(OF) install krobot META \ - lib-krobot/krobot.mli \ + $(wildcard lib-krobot/*.mli) \ + $(wildcard common/*.mli) \ + $(wildcard protocol/*.mli) \ $(wildcard _build/lib-krobot/*.cmi) \ + $(wildcard _build/common/*.cmi) \ + $(wildcard _build/protocol/*.cmi) \ $(wildcard _build/lib-krobot/*.cmx) \ + $(wildcard _build/common/*.cmx) \ + $(wildcard _build/protocol/*.cmx) \ $(wildcard _build/*.cma) \ $(wildcard _build/*.cmxa) \ $(wildcard _build/*.cmxs) \ $(wildcard _build/*.a) - install -m 0755 _build/card-tools/send_firmware.best $(PREFIX)/bin/krobot-send-firmware - install -m 0755 _build/card-tools/dump_memory.best $(PREFIX)/bin/krobot-dump-memory - install -m 0755 _build/tools/forward_dbus.best $(PREFIX)/bin/krobot-forward-dbus - install -m 0755 _build/clients/info.best $(PREFIX)/bin/krobot-info - install -m 0755 _build/clients/joy_control.best $(PREFIX)/bin/krobot-joystick - install -m 0755 _build/clients/controller.best $(PREFIX)/bin/krobot-controller - install -m 0755 _build/services/hard_stop.best $(PREFIX)/bin/krobot-hard-stop - install -m 0755 _build/services/range_finders_stop.best $(PREFIX)/bin/krobot-range-finders-stop - install -m 0755 _build/services/infrared_stop.best $(PREFIX)/bin/krobot-infrared-stop - install -m 0755 _build/driver/driver.best $(PREFIX)/bin/krobot-driver - install -m 0755 _build/clients/ax12_control.best $(PREFIX)/bin/krobot-ax12 - install -m 0755 _build/clients/check.best $(PREFIX)/bin/krobot-check - install -m 0755 _build/clients/check.best $(PREFIX)/bin/krobot-check - install -m 0755 _build/clients/record_infrared.best $(PREFIX)/bin/krobot-record-infrared - install -m 0755 _build/clients/scan.best $(PREFIX)/bin/krobot-scan - install -m 0755 _build/clients/replay.best $(PREFIX)/bin/krobot-replay - install -m 0755 _build/clients/play.best $(PREFIX)/bin/krobot-play - install -m 0755 _build/clients/recorder.best $(PREFIX)/bin/krobot-recorder - install -m 0755 _build/clients/jack.best $(PREFIX)/bin/krobot-jack - install -m 0755 _build/clients/write_lcd.best $(PREFIX)/bin/krobot-write-lcd - install -m 0755 _build/clients/ia.best $(PREFIX)/bin/krobot-ia + @/bin/bash install-programs.sh $(PREFIX) .PHONY: uninstall uninstall: diff --git a/info/control/_tags b/info/control/_tags index 00d5dce..b468930 100644 --- a/info/control/_tags +++ b/info/control/_tags @@ -1,70 +1,14 @@ # -*- conf -*- -# +------------------------------------------------------------------+ -# | Krobot library | -# +------------------------------------------------------------------+ +# Uses the lwt syntax extension for all files: +<**/*.ml>: syntax_camlp4o, pkg_lwt.syntax, pkg_lwt.syntax.log -<lib-krobot/**/*.ml>: syntax_camlp4o, pkg_lwt.syntax, pkg_lwt.syntax.log -<lib-krobot/**>: pkg_lwt.unix, pkg_obus +# Libraries used by all part of the robot: +<**/*>: pkg_obus, pkg_lwt.text -# +------------------------------------------------------------------+ -# | Protocol | -# +------------------------------------------------------------------+ +# Only the driver and card tools have access to the hardware. The rest +# should be compilable even without ocaml-usb and ocaml-serial. +<{driver,usb-tools}/**/*>: thread, pkg_usb, pkg_serial -<protocol/*>: pkg_obus - -# +------------------------------------------------------------------+ -# | Card tools | -# +------------------------------------------------------------------+ - -<card-tools/**/*.ml>: syntax_camlp4o, pkg_lwt.syntax, pkg_lwt.syntax.log -<card-tools/**>: thread, pkg_usb, pkg_lwt.unix - -# +------------------------------------------------------------------+ -# | Clients | -# +------------------------------------------------------------------+ - -<clients/**/*.ml>: syntax_camlp4o, pkg_lwt.syntax, pkg_lwt.syntax.log -<clients/**>: pkg_lwt.unix, pkg_obus -<clients/joy_control.*>: pkg_sdl -<clients/controller.*>: pkg_lwt.text -<clients/script{.*,_lexer.*}>: pkg_text -<clients/ax12_control.*>: pkg_lwt.text -<clients/check.*>: pkg_lwt.text -<clients/scan.*>: pkg_lwt.text -<clients/replay.*>: pkg_lwt.text -<clients/play.*>: pkg_lwt.text - -# +------------------------------------------------------------------+ -# | Services | -# +------------------------------------------------------------------+ - -<services/**/*.ml>: syntax_camlp4o, pkg_lwt.syntax, pkg_lwt.syntax.log -<services/**>: pkg_lwt.unix, pkg_obus - -# +------------------------------------------------------------------+ -# | Common | -# +------------------------------------------------------------------+ - -<common/*>: pkg_react, pkg_obus, syntax_camlp4o, pkg_lwt.syntax - -# +------------------------------------------------------------------+ -# | Driver | -# +------------------------------------------------------------------+ - -<driver/**/*.ml>: syntax_camlp4o, pkg_lwt.syntax, pkg_lwt.syntax.log -<driver/**>: thread, pkg_lwt.unix, pkg_obus, pkg_usb, pkg_serial - -# +------------------------------------------------------------------+ -# | Tools | -# +------------------------------------------------------------------+ - -<tools/forward_dbus.ml>: syntax_camlp4o, pkg_lwt.syntax, pkg_lwt.syntax.log -<tools/forward_dbus.*>: pkg_obus - -# +------------------------------------------------------------------+ -# | Tests | -# +------------------------------------------------------------------+ - -<tests/**/*.ml>: syntax_camlp4o, pkg_lwt.syntax, pkg_lwt.syntax.log -<tests/**>: pkg_lwt.unix, pkg_obus, pkg_lwt.text +# SDL is used to access the sixaxis controller +<clients/krobot_joystick.*>: pkg_sdl diff --git a/info/control/bus.conf b/info/control/bus.conf new file mode 100644 index 0000000..080136b --- /dev/null +++ b/info/control/bus.conf @@ -0,0 +1,31 @@ +<!-- Configuration of the D-Bus daemon used by programs of the robot --> + +<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Krobot_configuration 1.0//EN" + "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> +<busconfig> + <keep_umask/> + + <!-- Krobot D-Bus daemon default address --> + <listen>unix:abstract=krobot</listen> + + <!-- Allow everything --> + <policy context="default"> + <allow send_destination="*" eavesdrop="true"/> + <allow eavesdrop="true"/> + <allow own="*"/> + </policy> + + <!-- Raise limits --> + <limit name="max_incoming_bytes">1000000000</limit> + <limit name="max_outgoing_bytes">1000000000</limit> + <limit name="max_message_size">1000000000</limit> + <limit name="service_start_timeout">120000</limit> + <limit name="auth_timeout">240000</limit> + <limit name="max_completed_connections">100000</limit> + <limit name="max_incomplete_connections">10000</limit> + <limit name="max_connections_per_user">100000</limit> + <limit name="max_pending_service_starts">10000</limit> + <limit name="max_names_per_connection">50000</limit> + <limit name="max_match_rules_per_connection">50000</limit> + <limit name="max_replies_per_connection">50000</limit> +</busconfig> diff --git a/info/control/card-tools/boardname.mli b/info/control/card-tools/boardname.mli deleted file mode 100644 index 51dc1b5..0000000 --- a/info/control/card-tools/boardname.mli +++ /dev/null @@ -1,12 +0,0 @@ -(* - * krobot_boardname.mli - * -------------------- - * Copyright : (c) 2009, Stéphane Glondu <st...@gl...> - * Licence : BSD3 - * - * This file is a part of Krobot. - *) - -val get_board_name : string -> string option - (** [get_board_name dump] recherche dans le [dump] mémoire (peut - être également un fichier .hex chargé) le nom de la carte. *) diff --git a/info/control/card-tools/boardname.mll b/info/control/card-tools/boardname.mll deleted file mode 100644 index 3c41e97..0000000 --- a/info/control/card-tools/boardname.mll +++ /dev/null @@ -1,22 +0,0 @@ -(* - * krobot_boardname.mll - * -------------------- - * Copyright : (c) 2009, Stéphane Glondu <st...@gl...> - * Licence : BSD3 - * - * This file is a part of Krobot. - *) - - -let boardname_regex = ("Carte " | "Robot Interface" | "Battery Monitoring " | "Sensor Interface") [^'\n']+ - -rule boardname = parse - | (boardname_regex as name) '\n' { Some name } - | _ { boardname lexbuf } - | eof { None } - -{ - let get_board_name str = - let lexbuf = Lexing.from_string str in - boardname lexbuf -} diff --git a/info/control/card-tools/bootloader.ml b/info/control/card-tools/bootloader.ml deleted file mode 100644 index 7151d00..0000000 --- a/info/control/card-tools/bootloader.ml +++ /dev/null @@ -1,184 +0,0 @@ -(* - * krobot_Bootloader.ml - * -------------------- - * Copyright : (c) 2009, Stéphane Glondu <st...@gl...> - * Licence : BSD3 - * - * This file is a part of Krobot. - *) - -open Lwt -open Lwt_io - -(* Code très inspiré de kard.ml, mais mis à part car le mode de - communication avec la carte est différent (bulk au lieu - d'interrupt). *) - -type t = { - mutable is_open : bool; - (* La carte est-elle ouverte ? *) - - handle : USB.handle; - (* Handle pour le périphérique usb *) - - kernel_active : bool; - (* Est-ce qu'un driver noyau était attaché à la carte avant qu'on - l'utilise ? *) -} - -type error = - | IncompleteWrite of int * int - | IncompleteRead of int * int - | UnexpectedReply of string * string - | WriteError of string * string - -let string_of_error = function - | IncompleteWrite (a, b) -> Printf.sprintf "%d byte(s) written instead of %d" a b - | IncompleteRead (a, b) -> Printf.sprintf "%d byte(s) read instead of %d" a b - | UnexpectedReply (a, b) -> Printf.sprintf "received unexpected reply %S instead of %S" a b - | WriteError (a, b) -> Printf.sprintf "written: %S, read back: %S" a b - -exception Error of error - -let failwith e = fail (Error e) - -let close k = - if k.is_open then begin - lwt _ = USB.release_interface k.handle 0 in - lwt _ = USB.reset_device k.handle in - (*if k.kernel_active then USB.attach_kernel_driver k.handle 0;*) - (*USB.close k.handle;*) - k.is_open <- false; - return () - end else return () - -let open_card () = - let handle = USB.open_device_with - ~vendor_id:PcInterface.usb_vid - ~product_id:PcInterface.usb_pid_bootloader - in - let kernel_active = USB.kernel_driver_active handle 0 in - if kernel_active then USB.detach_kernel_driver handle 0; - lwt _ = USB.set_configuration handle 1 in - lwt _ = USB.claim_interface handle 0 in - let k = { is_open = true; - handle = handle; - kernel_active = kernel_active } in - let _ = Lwt_sequence.add_l (fun _ -> close k) Lwt_main.exit_hooks in - return k - -let header_length = 5 - -let put_message buffer cmd length address data = - let body_length = String.length data in - assert (String.length buffer >= header_length+body_length); - let set i n = buffer.[i] <- char_of_int n in - set 0 cmd; - assert (length < 0x100); - set 1 length; - assert (address <= 0x1000000); - set 2 (address land 0xff); - set 3 ((address lsr 8) land 0xff); - set 4 ((address lsr 16) land 0xff); - String.blit data 0 buffer 5 body_length - -let send_receive_packet k send_buffer send_length receive_buffer receive_length send_delay receive_delay = - let handle = k.handle and endpoint = 1 in - lwt sent = USB.bulk_send ~handle ~endpoint ~timeout:1. send_buffer 0 send_length in - if sent <> send_length then - failwith (IncompleteWrite (sent, send_length)) - else begin - lwt received = USB.bulk_recv ~handle ~endpoint ~timeout:3. receive_buffer 0 receive_length in - if received <> receive_length then - failwith (IncompleteRead (received, receive_length)) - else - return () - end - -let get_flash k ~address ~length = - let response_length = 64 in - let increment = response_length-header_length in - assert (increment < 256); - let send_buffer = String.create header_length in - let receive_buffer = String.create response_length in - let result_buffer = String.create length in - let rec loop offset total_length = - if total_length <= 0 then - return result_buffer - else begin - let length = min increment total_length in - let response_length = length+header_length in - let address = address+offset in - put_message send_buffer PcInterface.read_flash length address ""; - lwt () = send_receive_packet k send_buffer header_length receive_buffer response_length 1. 3. in - let receive_header = String.sub receive_buffer 0 header_length in - if receive_header <> send_buffer then - failwith (UnexpectedReply (receive_header, send_buffer)) - else begin - String.blit receive_buffer header_length result_buffer offset length; - loop (offset+length) (total_length-length); - end - end - in loop 0 length - -let erase_flash k ~address ~length = - let response_length = 1 in - (* les effacements se font par blocs de 64 octets *) - let increment = 64 in - let send_buffer = String.create header_length in - let receive_buffer = String.create response_length in - let rec loop offset total_length = - if total_length <= 0 then - return () - else begin - let address = address+offset in - put_message send_buffer PcInterface.erase_flash 1 address ""; - lwt () = send_receive_packet k send_buffer header_length receive_buffer response_length 1. 5. in - if int_of_char receive_buffer.[0] <> PcInterface.erase_flash then - failwith (UnexpectedReply (receive_buffer, String.make 1 (char_of_int PcInterface.erase_flash))) - else - loop (offset+increment) (total_length-increment); - end - in loop 0 length - -let reference = String.make 16 '\255' - -let write_flash k ~address data offset length = - let send_length = 64 and receive_length = 1 in - (* les écritures se font par blocs de 16 octets *) - let increment = 16 in - let send_buffer = String.create send_length in - let receive_buffer = String.create receive_length in - let rec loop address offset total_length = - (* address: sur le PIC, offset: dans data, total_length: taille restante *) - if total_length <= 0 then - return () - else begin - let packet = String.make increment '\255' in - String.blit data offset packet 0 (min total_length increment); - if packet = reference then begin - (* le paquet n'a pas de contenu, on l'ignore *) - (* lwt () = printf "Skipping address 0x%06X...\n" address in *) - loop (address+increment) (offset+increment) (total_length-increment) - end else begin - (* lwt () = printf "Processing address 0x%06X...\n" address in *) - put_message send_buffer PcInterface.write_flash increment address packet; - lwt () = send_receive_packet k send_buffer send_length receive_buffer receive_length 0.5 1. in - if int_of_char receive_buffer.[0] <> PcInterface.write_flash then - failwith (UnexpectedReply (receive_buffer, String.make 1 (char_of_int PcInterface.erase_flash))) - else begin - lwt written = get_flash k ~address ~length:increment in - if written <> packet then - failwith (WriteError (packet, written)) - else - loop (address+increment) (offset+increment) (total_length-increment) - end - end - end - in loop address offset length - -let reset_board k = - let send_buffer = String.create 64 and receive_buffer = String.create 64 in - send_buffer.[0] <- char_of_int PcInterface.reset; - lwt () = send_receive_packet k send_buffer 1 receive_buffer 64 5. 5. in - return () diff --git a/info/control/card-tools/dump_memory.ml b/info/control/card-tools/dump_memory.ml deleted file mode 100644 index a19af09..0000000 --- a/info/control/card-tools/dump_memory.ml +++ /dev/null @@ -1,28 +0,0 @@ -(* - * krobot_dump_memory.ml - * --------------------- - * Copyright : (c) 2009, Stéphane Glondu <st...@gl...> - * Licence : BSD3 - * - * This file is a part of Krobot. - *) - -open Printf -open Lwt -open Lwt_io - -lwt () = - lwt k = Bootloader.open_card () in - try_lwt - lwt data = Bootloader.get_flash k ~address:0x0 ~length:0x8000 in - let msg = match Boardname.get_board_name data with - | Some s -> sprintf "Board: %S" s - | None -> "Unable to identify board!" - in - lwt () = eprintlf "%s" msg in - (if Unix.isatty Unix.stdout then hexdump else write) stdout data >> flush stdout - with - | Bootloader.Error e -> - eprintlf "%s" (Bootloader.string_of_error e) - | e -> - eprintlf "%s" (Printexc.to_string e) diff --git a/info/control/card-tools/hexfile.ml b/info/control/card-tools/hexfile.ml deleted file mode 100644 index 2d2c361..0000000 --- a/info/control/card-tools/hexfile.ml +++ /dev/null @@ -1,112 +0,0 @@ -(* - * krobot_hexfile.ml - * ----------------- - * Copyright : (c) 2009, Stéphane Glondu <st...@gl...> - * Licence : BSD3 - * - * This file is a part of Krobot. - *) - -open Lwt -open Lwt_io - -type hex_record = - | Data of int * string - | ExtendedLinearAddress of int - | EndOfFile of int - -let string_of_hexline str = - let n = String.length str in - assert (n > 0 && n mod 2 = 1 && str.[0] = ':'); - let m = n/2 in - let result = String.create m in - for i = 0 to m-1 do - let j = 2*i+1 in - result.[i] <- char_of_int (int_of_string ("0x"^(String.sub str j 2))) - done; - result - -let compute_checksum str = - let rec aux i accu = - if i < 0 then - (-accu) land 0xff - else - aux (i-1) (accu+(int_of_char str.[i])) - in aux (String.length str - 2) 0 - -let parse_line str = - let str = string_of_hexline str in - let get i = int_of_char str.[i] in - let n = String.length str in - assert (n >= 5 && compute_checksum str = int_of_char str.[n-1]); - let count = get 0 in - assert (count+5 = n); - let address = ((get 1) lsl 8) lor (get 2) in - let record_type = get 3 in - let data = String.sub str 4 count in - match record_type with - | 0x00 -> - Data (address, data) - | 0x01 -> - assert (count = 0); - EndOfFile address - | 0x04 -> - assert (count = 2 && address = 0); - let msb = int_of_char data.[0] and lsb = int_of_char data.[1] in - (* check for possible overflow *) - assert (msb land 0x80 = 0); - ExtendedLinearAddress ((msb lsl 8) lor lsb) - | _ -> assert false - -let parse_file file = - let ic = Lwt_io.open_file ~mode:input file in - let lines = Lwt_io.read_lines ic in - let lines = Lwt_stream.map parse_line lines in - lwt lines = Lwt_stream.get_while (fun _ -> true) lines in - lwt _ = Lwt_io.close ic in - return lines - -let print_record = function - | Data (address, data) -> - Printf.printf "DAT %04x" address; - String.iter (fun c -> Printf.printf " %02x" (int_of_char c)) data; - Printf.printf "\n" - | ExtendedLinearAddress address -> - Printf.printf "ELA %04x\n" address - | EndOfFile address -> - Printf.printf "EOF %04x\n" address - -let validate_and_copy hex addr_base buffer offset length = - assert (offset+length <= String.length buffer); - let min_address = addr_base+offset in - let max_address = min_address+length in - let addr_high = ref 0 in - let execute_record = function - | Data (address, data) -> - assert (address land 0xFFFF = address); - let address = !addr_high lor address in - if address < min_address || address >= max_address then - Printf.eprintf - "0x%04x is outside range, all bytes dropped\n" - address - else begin - let length = - let n = String.length data in - if address+n >= max_address then begin - Printf.eprintf - "some bytes at address 0x%04x are outside range (dropped)\n" - address; - max_address-address - end else n - in - let offset2 = address-addr_base in - String.blit data 0 buffer offset2 length; - end - | ExtendedLinearAddress address -> - assert (address land 0x8000 = 0); - addr_high := address lsl 16 - | EndOfFile address -> - assert (address = 0); - raise Exit - in - try List.iter execute_record hex with Exit -> () diff --git a/info/control/card-tools/hexfile.mli b/info/control/card-tools/hexfile.mli deleted file mode 100644 index 932e32e..0000000 --- a/info/control/card-tools/hexfile.mli +++ /dev/null @@ -1,26 +0,0 @@ -(* - * krobot_hexfile.mli - * ------------------ - * Copyright : (c) 2009, Stéphane Glondu <st...@gl...> - * Licence : BSD3 - * - * This file is a part of Krobot. - *) - -type hex_record = - | Data of int * string - | ExtendedLinearAddress of int - | EndOfFile of int - -val parse_file : string -> hex_record list Lwt.t - -val print_record : hex_record -> unit - (** Prints one record on standard output. *) - -val validate_and_copy : hex_record list -> int -> string -> int -> int -> unit - (** [validate_and_copy hex addr_base buffer offset length] copies - the contents of the (parsed) [hex] file to [buffer]. [offset] - and [length] denote the valid range inside [buffer] that can be - written. [addr_base] is the address [buffer] is mapped to on the - microcontroller. Bytes outside the range are ignored (and a - warning is printed on standard error. *) diff --git a/info/control/card-tools/send_firmware.ml b/info/control/card-tools/send_firmware.ml deleted file mode 100644 index 45e7645..0000000 --- a/info/control/card-tools/send_firmware.ml +++ /dev/null @@ -1,69 +0,0 @@ -(* - * krobot_send_firmware.ml - * ----------------------- - * Copyright : (c) 2009, Stéphane Glondu <st...@gl...> - * Licence : BSD3 - * - * This file is a part of Krobot. - *) - -open Lwt -open Lwt_io - -let do_flash force filename = - lwt hex = Hexfile.parse_file filename in - let memory = - let buffer = String.make 0x8000 '\255' in - Hexfile.validate_and_copy hex 0x0 buffer 0 0x8000; - buffer - in - let firmware_name = Boardname.get_board_name memory in - lwt () = match firmware_name with - | Some s -> printf "Detected firmware: %S\n" s - | None -> printf "Unable to identify firmware!\n" - in - let address = 0x800 and length = 0x8000-0x800 in - lwt k = Bootloader.open_card () in - lwt () = printf "Card opened\n" in - lwt data = Bootloader.get_flash k ~address:0x0 ~length:0x8000 in - let board_name = Boardname.get_board_name data in - lwt () = match board_name with - | Some s -> printf "Detected card: %S\n" s - | None -> printf "Unable to identify card!\n" - in - lwt () = - if not force && (board_name = None || firmware_name = None || board_name <> firmware_name) then begin - lwt () = eprintf "board name and firmware name do not match, use --force\n" in - exit 1 - end else return () - in - lwt () = Bootloader.erase_flash k ~address ~length in - lwt () = printf "Flash erased\n" in - lwt () = Bootloader.write_flash k ~address memory address length in - lwt () = printf "Flashing completed\n" in - lwt () = Bootloader.reset_board k in - return () - -lwt () = - let force = ref false in - let filename = ref None in - let speclist = [ - "--force", Arg.Set force, "Force flashing even if board id and firmware id do not match"; - ] in - Arg.parse speclist - (fun s -> - match !filename with - | None -> filename := Some s - | Some _ -> raise (Arg.Bad s)) - "Send a firmware to a board in Bootloader mode"; - let filename = match !filename with - | None -> Printf.eprintf "You must specify a .hex file!\n"; exit 1 - | Some s -> s - in - try_lwt - do_flash !force filename - with - | Bootloader.Error e -> - eprintl (Bootloader.string_of_error e) - | e -> - eprintl (Printexc.to_string e) diff --git a/info/control/clients/ax12_control.ml b/info/control/clients/ax12_control.ml deleted file mode 100644 index 8d7f465..0000000 --- a/info/control/clients/ax12_control.ml +++ /dev/null @@ -1,83 +0,0 @@ -(* - * ax12_control.ml - * --------------- - * Copyright : (c) 2010, Jeremie Dimino <je...@di...> - * Licence : BSD3 - * - * This file is a part of [kro]bot. - *) - -(* AX12 interactive controller *) - -open Lwt -open Lwt_io -open Lwt_term - -let render positions selected = - let size = React.S.value Lwt_term.size in - let zone = Zone.make ~width:size.columns ~height:size.lines in - let x = (size.columns / 2) - 7 in - let y = (size.lines / 2) - (Array.length positions / 2) in - for i = 0 to Array.length positions - 1 do - if i = selected then - Draw.textc ~zone ~x ~y:(y + i * 2) - ~text:[inverse; textf "ax12[%d] : %4d" (i + 1) positions.(i)] - else - Draw.textc ~zone ~x ~y:(y + i * 2) - ~text:[textf "ax12[%d] : %4d" (i + 1) positions.(i)] - done; - Lwt_term.render (Zone.points zone) - -lwt () = - lwt krobot = Krobot.create () in - - lwt () = Lwt_log.notice "reading current ax12 positions" in - lwt pos1 = Krobot.unsafe_call Commands.AX12.get_position krobot (1, 100) - and pos2 = Krobot.unsafe_call Commands.AX12.get_position krobot (2, 100) - and pos3 = Krobot.unsafe_call Commands.AX12.get_position krobot (3, 100) in - lwt () = Lwt_log.notice "done" in - - let positions = [|pos1; pos2; pos3|] in - - let rec loop selected = - lwt () = render positions selected in - Lwt_term.read_key () >>= function - | Key_up -> - if selected > 0 then - loop (selected - 1) - else - loop selected - | Key_down -> - if selected < Array.length positions - 1 then - loop (selected + 1) - else - loop selected - | Key_left -> - positions.(selected) <- max 0 (positions.(selected) - 10); - lwt () = Krobot.unsafe_call Commands.AX12.goto krobot (selected + 1, positions.(selected), 50, `Now) in - loop selected - | Key_right -> - positions.(selected) <- min 1023 (positions.(selected) + 10); - lwt () = Krobot.unsafe_call Commands.AX12.goto krobot (selected + 1, positions.(selected), 50, `Now) in - loop selected - | Key ("\027[d" | "\027[1;2D") -> - positions.(selected) <- max 0 (positions.(selected) - 1); - lwt () = Krobot.unsafe_call Commands.AX12.goto krobot (selected + 1, positions.(selected), 50, `Now) in - loop selected - | Key ("\027[c" | "\027[1;2C") -> - positions.(selected) <- min 1023 (positions.(selected) + 1); - lwt () = Krobot.unsafe_call Commands.AX12.goto krobot (selected + 1, positions.(selected), 50, `Now) in - loop selected - | Key_control '[' -> - return () - | _ -> - loop selected - in - - lwt () = Lwt_term.enter_drawing_mode () in - lwt () = Lwt_term.hide_cursor () in - - try_lwt - loop 0 - finally - Lwt_term.leave_drawing_mode () diff --git a/info/control/clients/check.ml b/info/control/clients/check.ml deleted file mode 100644 index 4a59a31..0000000 --- a/info/control/clients/check.ml +++ /dev/null @@ -1,78 +0,0 @@ -(* - * check.ml - * -------- - * Copyright : (c) 2010, Jeremie Dimino <je...@di...> - * Licence : BSD3 - * - * This file is a part of [kro]bot. - *) - -open Lwt -open Lwt_io -open Lwt_term - -let test name f = - lwt () = printlf "=[ testing %s ]%s" name (String.make (React.S.value columns - 13 - String.length name) '=') in - try_lwt - lwt () = f () in - printlf "test succeed" - with exn -> - printlc [fg lred; textf "test failed with: %s" (Printexc.to_string exn)] - -lwt () = - lwt krobot = Krobot.create () in - - lwt () = - test "gate" - (fun () -> - lwt () = Krobot.Gate.enable krobot in - lwt () = printl "opening the gate" in - lwt () = Krobot.Gate.open_ krobot in - lwt () = Lwt_unix.sleep 0.5 in - lwt () = printl "closing the gate" in - lwt () = Krobot.Gate.close krobot in - lwt () = Lwt_unix.sleep 0.5 in - return ()) - in - - lwt () = - test "claws" - (fun () -> - lwt () = Krobot.Claws.enable krobot in - lwt () = printl "opening the claws" in - lwt () = Krobot.Claws.open_ krobot in - lwt () = Lwt_unix.sleep 0.5 in - lwt () = printl "closing the claws" in - lwt () = Krobot.Claws.close krobot in - lwt () = Lwt_unix.sleep 0.5 in - return ()) - in - - lwt () = - test "grip" - (fun () -> - lwt () = printl "opening the grip" in - lwt () = Krobot.Grip.open_ krobot in - lwt () = Lwt_unix.sleep 1.0 in - lwt () = printl "closing the grip" in - lwt () = Krobot.Grip.close krobot in - lwt () = Lwt_unix.sleep 1.0 in - return ()) - in - - lwt () = - test "infrared" - (fun () -> - lwt () = printl "going to the left" in - lwt () = Krobot.Infrared.go_left krobot in - lwt () = Lwt_unix.sleep 1.5 in - lwt () = printl "going to the right" in - lwt () = Krobot.Infrared.go_right krobot in - lwt () = Lwt_unix.sleep 1.5 in - lwt () = printl "going to the center" in - lwt () = Krobot.Infrared.go_center krobot in - lwt () = Lwt_unix.sleep 1.0 in - return ()) - in - - return () diff --git a/info/control/clients/controller.ml b/info/control/clients/controller.ml deleted file mode 100644 index 69af1d4..0000000 --- a/info/control/clients/controller.ml +++ /dev/null @@ -1,565 +0,0 @@ -(* - * controller.ml - * ------------- - * Copyright : (c) 2010, Jeremie Dimino <je...@di...> - * Licence : BSD3 - * - * This file is a part of [kro]bot. - *) - -open Lwt -open Lwt_term -open Lwt_read_line - -module TextSet = Set.Make(Text) - -(* Maximum number of refresh by seconds: *) -let refresh_rate = 10 - -(* +-----------------------------------------------------------------+ - | Logging | - +-----------------------------------------------------------------+ *) - -(* Maximum number of lines to keep in logs: *) -let log_count = 16384 - -(* Signal holding the current logs: *) -let logs, set_logs = React.S.create [] - -let add_date line = - let buffer = Buffer.create 42 in - Lwt_log.render ~buffer ~level:Lwt_log.Info ~message:"" ~template:"$(date): " ~section:Lwt_log.Section.main; - text (Buffer.contents buffer) :: line - -(* Add a list of lines to logs *) -let log_add_lines lines = - let rec truncate n = function - | [] -> - [] - | line :: rest -> - if n = log_count then - [] - else - line :: truncate (n + 1) rest - in - set_logs (truncate 0 (List.rev_map add_date lines @ (React.S.value logs))) - -let log_add_line line = - log_add_lines [line] - -(* Redirect stderr to logs *) -let redirect_stderr () = - let rec copy_logs ic = - lwt line = Lwt_io.read_line ic in - log_add_line [text line]; - copy_logs ic - in - let fdr, fdw = Unix.pipe () in - Unix.dup2 fdw Unix.stderr; - Unix.close fdw; - ignore (copy_logs (Lwt_io.of_unix_fd ~mode:Lwt_io.input fdr)) - -(* Make the default logger to logs into the log buffer *) -let init_logger () = - Lwt_log.default := - Lwt_log.make - ~output:(fun section level lines -> - log_add_lines - (List.map - (fun line -> - if level >= Lwt_log.Warning then - (* Colorize error in red: *) - [fg lred; text line] - else - [text line]) - lines); - return ()) - ~close:return - -(* +-----------------------------------------------------------------+ - | Read-line | - +-----------------------------------------------------------------+ *) - -let engine_state, set_engine_state = React.S.create (Engine.init []) -let box, set_box = React.S.create Terminal.Box_empty - -let () = - Lwt_signal.always_notify - (function - | Engine.Edition(before, after) -> - let comp = Script.complete before after in - set_box (Terminal.Box_words(comp.comp_words, 0)) - | Engine.Selection _ -> - set_box (Terminal.Box_message "<selection>") - | Engine.Search _ -> - set_box (Terminal.Box_message "<backward search>")) - (React.S.map (fun state -> state.Engine.mode) engine_state) - -let history_file_name = - Filename.concat (try Unix.getenv "HOME" with _ -> "") ".krobot-controller-history" - -let save_history history = - Lwt_read_line.save_history history_file_name history - -let rec loop krobot history = - lwt key = read_key () in - if key = key_escape then - save_history history - else - match Command.of_key key with - | Command.Accept_line -> - let line = Text.strip (Engine.all_input (React.S.value engine_state)) in - if line = "exit" then - save_history history - else if line <> "" then begin - let history = Lwt_read_line.add_entry line history in - set_engine_state (Engine.init history); - lwt () = Lwt_log.notice line in - ignore (Script.exec ~krobot ~logger:(fun line -> log_add_line line; return ()) ~command:line); - loop krobot history - end else - loop krobot history - | Command.Complete -> - let engine_state = Engine.reset (React.S.value engine_state) in - let before, after = Engine.edition_state engine_state in - let comp = Script.complete before after in - set_engine_state { engine_state with Engine.mode = Engine.Edition comp.comp_state }; - loop krobot history - | command -> - set_engine_state (Engine.update (React.S.value engine_state) command ()); - loop krobot history - -(* +-----------------------------------------------------------------+ - | Service monitoring | - +-----------------------------------------------------------------+ *) - -let services, set_services = React.S.create [] -let set_services l = set_services (List.sort Pervasives.compare l) - -let check_services bus = - lwt l = OBus_bus.list_names bus in - set_services (List.fold_left (fun acc name -> - if Text.starts_with name "fr.krobot." then - String.sub name 10 (String.length name - 10) :: acc - else - acc) [] l); - return () - -(* +-----------------------------------------------------------------+ - | Drawing | - +-----------------------------------------------------------------+ *) - -(* Draw the whole screen *) -let draw krobot = - - let size = React.S.value Lwt_term.size in - - let screen = Zone.make ~width:size.columns ~height:size.lines in - let points = Zone.points screen in - - let line_color = lblue in - let line = { blank with style = { blank.style with foreground = line_color } } in - let name_color = lwhite in - - let driver = List.mem "Driver" (React.S.value services) in - lwt services_status = - if driver then - OBus_property.get (Krobot.services_status krobot) - else - return { - Krobot.srv_compass = false; - Krobot.srv_range_finders = false; - Krobot.srv_logic_sensors = false; - Krobot.srv_motor = false; - Krobot.srv_grip = false; - Krobot.srv_lcd = false; - Krobot.srv_infrared = false; - Krobot.srv_power = false; - } - in - - (* ===== Borders ===== *) - - for i = 1 to size.columns - 2 do - points.(0).(i) <- { line with char = "─" }; - points.(size.lines - 1).(i) <- { line with char = "─" } - done; - for i = 1 to size.lines - 2 do - points.(i).(0) <- { line with char = "│" }; - points.(i).(size.columns - 1) <- { line with char = "│" } - done; - points.(0).(0) <- { line with char = "┌" }; - points.(size.lines - 1).(0) <- { line with char = "└" }; - points.(size.lines - 1).(size.columns - 1) <- { line with char = "┘" }; - points.(0).(size.columns - 1) <- { line with char = "┐" }; - - (* ===== Status ===== *) - - Draw.textc screen 1 0 [fg line_color; text "─[ "; - fg name_color; text "Range finders"; - fg line_color; text " ]─┬─[ "; - fg name_color; text "Logic Sensors"; - fg line_color; text " ]─┬─[ "; - fg name_color; text "Services"; - fg line_color; text " ]─┬─[ "; - fg name_color; text "Cards"; - fg line_color; text " ]─┬─[ "; - fg name_color; text "Status"; - fg line_color; text " ]─"]; - points.(9).(0) <- { line with char = "├" }; - points.(9).(size.columns - 1) <- { line with char = "┤" }; - for i = 1 to size.columns - 2 do - points.(9).(i) <- { line with char = "─" } - done; - for i = 1 to 8 do - points.(i).(20) <- { line with char = "│" }; - points.(i).(40) <- { line with char = "│" }; - points.(i).(55) <- { line with char = "│" }; - points.(i).(67) <- { line with char = "│" } - done; - Draw.textc screen 1 9 [fg line_color; text "───────────────────┴───────────────────┴──────────────┴───────────┴"]; - - let zone = Zone.inner screen in - - lwt () = - if driver && services_status.Krobot.srv_range_finders then begin - lwt range_finders = OBus_property.get (Krobot.Range_finders.measures krobot) in - let y = ref 0 in - List.iter - (fun i -> - Draw.textc zone 0 !y [textf "%d : %d" i range_finders.(i)]; - incr y) - [3; 8]; - return () - end else begin - for i = 0 to 7 do - Draw.textc zone 0 i [fg red; text "unavailable"] - done; - return () - end - in - - lwt () = - if driver && services_status.Krobot.srv_logic_sensors then begin - lwt logic_sensors = OBus_property.get (Krobot.Logic_sensors.states krobot) in - for i = 0 to 7 do - let j = i * 2 in - Draw.textf zone 20 i "%02d : %s %02d : %s" - (j + 0) (if logic_sensors.(j + 0) then "O" else ".") - (j + 1) (if logic_sensors.(j + 1) then "O" else ".") - done; - return () - end else begin - for i = 0 to 7 do - Draw.textc zone 20 i [fg red; text "unavailable"] - done; - return () - end - in - - let zone' = Zone.sub ~zone ~x:40 ~y:0 ~width:14 ~height:8 in - let rec loop y = function - | [] -> - () - | name :: rest -> - Draw.text ~zone:zone' ~x:0 ~y ~text:name; - loop (y + 1) rest - in - loop 0 (React.S.value services); - - let x = 55 in - let text_of_state name = function - | `Absent -> [fg lred; text name] - | `Present -> [text name] - in - lwt () = - if driver then begin - lwt card_interface = OBus_property.get (Krobot.Card.state krobot `Interface) - and card_sensor = OBus_property.get (Krobot.Card.state krobot `Sensor) - and card_motor = OBus_property.get (Krobot.Card.state krobot `Motor) - and card_monitoring = OBus_property.get (Krobot.Card.state krobot `Monitoring) in - Draw.textc zone x 0 (text_of_state "interface" card_interface); - Draw.textc zone x 1 (text_of_state "sensor" card_sensor); - Draw.textc zone x 2 (text_of_state "motor" card_motor); - Draw.textc zone x 3 (text_of_state "monitoring" card_monitoring); - return () - end else begin - Draw.textc zone x 0 (text_of_state "interface" `Absent); - Draw.textc zone x 1 (text_of_state "sensor" `Absent); - Draw.textc zone x 2 (text_of_state "motor" `Absent); - Draw.textc zone x 3 (text_of_state "monitoring" `Absent); - return () - end - in - let x = x + 12 in - lwt () = - if driver && services_status.Krobot.srv_compass then begin - lwt compass = OBus_property.get (Krobot.Compass.measure krobot) in - Draw.textf zone x 0 "compass = %d" compass; - return () - end else begin - Draw.textc zone x 0 [fg red; text "unavailable"]; - return () - end - in - let date = Unix.gettimeofday () in - let text_of_motor_state mode until = - if date < until then - [text mode; fg lyellow; text "inhibited"] - else - [text mode; text "OK"] - in - lwt () = - if driver && services_status.Krobot.srv_motor then begin - lwt forward = OBus_property.get (Krobot.Motors.inhibit_forward_until krobot) - and backward = OBus_property.get (Krobot.Motors.inhibit_backward_until krobot) in - Draw.textc zone x 1 (text_of_motor_state "move forward: " forward); - Draw.textc zone x 2 (text_of_motor_state "move backward: " backward); - return () - end else begin - for i = 1 to 2 do - Draw.textc zone x i [fg red; text "unavailable"] - done; - return () - end - in - lwt () = - if driver && services_status.Krobot.srv_infrared then begin - lwt ar = OBus_property.get (Krobot.Infrared.states krobot) in - for i = 0 to 3 do - Draw.textc zone x (i + 3) [textf "infrared %d: %d" i ar.(i)] - done; - return () - end else begin - for i = 3 to 6 do - Draw.textc zone x i [fg red; text "unavailable"] - done; - return () - end - in - lwt () = - if driver && services_status.Krobot.srv_power then begin - lwt current = OBus_property.get (Krobot.Power.current krobot) in - Draw.textc zone x 7 [textf "current: %d mA" current]; - return () - end else begin - Draw.textc zone x 7 [fg red; text "unavailable"]; - return () - end - in - - (* ===== History ===== *) - - let zone = Zone.sub ~zone:screen ~x:1 ~y:10 ~width:(Zone.width screen - 2) ~height:(Zone.height screen - 15) in - let rec loop y = function - | [] -> - () - | line :: rest -> - if y < 0 then - () - else begin - Draw.textc zone 0 y line; - loop (y - 1) rest - end - in - loop (Zone.height zone - 1) (React.S.value logs); - - (* ===== Read-line ===== *) - - points.(size.lines - 3).(0) <- { line with char = "├" }; - points.(size.lines - 3).(size.columns - 1) <- { line with char = "┤" }; - points.(size.lines - 5).(0) <- { line with char = "├" }; - points.(size.lines - 5).(size.columns - 1) <- { line with char = "┤" }; - for i = 1 to size.columns - 2 do - points.(size.lines - 5).(i) <- { line with char = "─" }; - points.(size.lines - 3).(i) <- { line with char = "─" } - done; - - let zone = Zone.sub ~zone:screen ~x:1 ~y:(size.lines - 4) ~width:(size.columns - 2) ~height:1 in - let engine_state = React.S.value engine_state in - let cursor_position = - match engine_state.Engine.mode with - | Engine.Edition(before, after) -> - let len = Text.length before in - Draw.textc zone 0 0 [Text before; Text after]; - len - | Engine.Selection state -> - let a = min state.Engine.sel_cursor state.Engine.sel_mark - and b = max state.Engine.sel_cursor state.Engine.sel_mark in - let part_before = Text.chunk (Text.pointer_l state.Engine.sel_text) a - and part_selected = Text.chunk a b - and part_after = Text.chunk (Text.pointer_r state.Engine.sel_text) b in - Draw.textc zone 0 0 [Text part_before; Underlined; Text part_selected; Reset; Text part_after]; - if state.Engine.sel_cursor < state.Engine.sel_mark then - Text.length part_before - else - Text.length part_before + Text.length part_selected - | Engine.Search state -> - let len = Text.length state.Engine.search_word in - Draw.text zone 0 0 (Printf.sprintf "(reverse-i-search)'%s'" state.Engine.search_word); - begin match state.Engine.search_history with - | [] -> - 19 + len - | phrase :: _ -> - let ptr_start = match Text.find phrase state.Engine.search_word with - | Some ptr -> - ptr - | None -> - assert false - in - let ptr_end = Text.move len ptr_start in - let before = Text.chunk (Text.pointer_l phrase) ptr_start - and selected = Text.chunk ptr_start ptr_end - and after = Text.chunk ptr_end (Text.pointer_r phrase) in - Draw.textc zone (20 + len) 0 [ - Text ": "; - Text before; - Underlined; - Text selected; - Reset; - Text after; - ]; - 19 + len - end - in - Draw.map zone cursor_position 0 (fun point -> { point with style = { point.style with inverse = true } }); - - let zone = Zone.sub ~zone:screen ~x:1 ~y:(size.lines - 3) ~width:(size.columns - 2) ~height:3 in - begin - match React.S.value box with - | Terminal.Box_none | Terminal.Box_empty -> - () - | Terminal.Box_message msg -> - Draw.text zone 0 1 msg - | Terminal.Box_words(words, _) -> - ignore (TextSet.fold - (fun word i -> - let len = Text.length word in - Draw.text zone i 1 word; - let i = i + len in - Draw.textc zone i 0 [fg line_color; text "┬"]; - Draw.textc zone i 1 [fg line_color; text "│"]; - Draw.textc zone i 2 [fg line_color; text "┴"]; - i + 1) - words 0) - end; - - Lwt_term.render (Zone.points screen) - -(* Wether the screen need to be refreshed *) -let refresh_needed = ref false - -let draw_mutex = Lwt_mutex.create () - -(* Program a refresh before the next main loop iteration *) -let refresh krobot = - if !refresh_needed then - return () - else begin - refresh_needed := true; - lwt () = Lwt.pause () in - refresh_needed := false; - Lwt_mutex.with_lock draw_mutex (fun () -> draw krobot) - end - -(* +-----------------------------------------------------------------+ - | Entry point | - +-----------------------------------------------------------------+ *) - -lwt () = - lwt () = Lwt_log.notice "connecting to the krobot bus..." in - lwt krobot = Krobot.create () in - let bus = OBus_peer.connection (Krobot.to_peer krobot) in - - (* Put the terminal into drawing mode: *) - lwt () = Lwt_term.enter_drawing_mode () in - lwt () = Lwt_term.hide_cursor () in - - init_logger (); - redirect_stderr (); - - (* Dump all logs to stdout on abnormal exit: *) - let node = - Lwt_sequence.add_l - (fun () -> - lwt () = Lwt_term.leave_drawing_mode () in - Lwt_list.iter_s printlc (List.rev (React.S.value logs))) - Lwt_main.exit_hooks - in - - (* Service monitoring *) - lwt () = check_services bus in - Lwt_event.always_notify_p (fun _ -> check_services bus) (OBus_signal.event (OBus_bus.name_owner_changed bus)); - - (* Minimum delay to wait between two screen redrawing *) - let delay = 1.0 /. (float_of_int refresh_rate) in - (* Event which refresh the screen when it occurs: *) - let event, push = React.E.create () in - Lwt_event.always_notify_p - (fun () -> refresh krobot) - (* Limit the number of redraw per seconds: *) - (Lwt_event.limit (fun () -> Lwt_unix.sleep delay) event); - (* Ask for a refresh when [signal] changes: *) - let notify signal = Lwt_signal.always_notify (fun _ -> push ()) signal in - notify box; - notify logs; - notify services; - let notifiers = ref [] in - let notify_property property = - try_lwt - lwt signal = OBus_property.monitor property in - notifiers := Lwt_signal.notify (fun _ -> push ()) signal :: !notifiers; - return () - with exn -> - Lwt_log.error_f ~exn "cannot monitor property" - in - ignore ( - lwt () = Lwt_unix.yield () in - Lwt_signal.always_notify_s - (function - | true -> - join [ - notify_property (Krobot.Compass.measure krobot); - notify_property (Krobot.Logic_sensors.states krobot); - notify_property (Krobot.Range_finders.measures krobot); - notify_property (Krobot.Motors.inhibit_forward_until krobot); - notify_property (Krobot.Motors.inhibit_backward_until krobot); - notify_property (Krobot.Card.state krobot `Interface); - notify_property (Krobot.Card.state krobot `Sensor); - notify_property (Krobot.Card.state krobot `Motor); - notify_property (Krobot.Card.state krobot `Monitoring); - notify_property (Krobot.services_status krobot); - notify_property (Krobot.Infrared.states krobot); - notify_property (Krobot.Power.current krobot); - ] - | false -> - List.iter Lwt_signal.disable !notifiers; - notifiers := []; - return ()) - (React.S.map (fun services -> List.mem "Driver" services) services); - return () - ); - - List.iter - (fun card -> - Lwt_event.always_notify - (fun error -> log_add_line [fg lred; textf "error on card %s: %s" (Krobot.Card.name card) error]) - (OBus_signal.event (Krobot.Card.errors krobot card))) - [`Interface; `Sensor; `Motor; `Monitoring]; - - (* Redraw immedlatly the screen when [signal] changes: *) - let urgent signal = Lwt_signal.always_notify_p (fun _ -> refresh krobot) signal in - urgent Lwt_term.size; - urgent engine_state; - - lwt history = Lwt_read_line.load_history history_file_name in - set_engine_state (Engine.init history); - - (* User input loop *) - lwt () = Lwt_term.with_raw_mode (fun () -> loop krobot history) in - - (* Normal exit, do not dump logs on stdout: *) - Lwt_sequence.remove node; - - (* Leave drawing mode *) - Lwt_term.leave_drawing_mode () diff --git a/info/control/clients/ia.ml b/info/control/clients/ia.ml deleted file mode 100644 index 3c45afa..0000000 --- a/info/control/clients/ia.ml +++ /dev/null @@ -1,295 +0,0 @@ -(* - * ia.ml - * ----- - * Copyright : (c) 2010, Jeremie Dimino <je...@di...> - * Licence : BSD3 - * - * This file is a part of [kro]bot. - *) - -open Lwt -open Krobot_move - -let section = Lwt_log.Section.make "ia" - -let velocity = 400 -let acceleration = 800 - -(* +-----------------------------------------------------------------+ - | Graph of the game board | - +-----------------------------------------------------------------+ *) - -let a = { vx = 240; vy = 1960 } -let b = { vx = 500; vy = 1378 } -let c = { vx = 600; vy = 878 } -let d = { vx = 600; vy = 378 } -let e = { vx = 1050; vy = 628 } -let f = { vx = 1050; vy = 1128 } -let g = { vx = 1050; vy = 1378 } -let h = { vx = 1500; vy = 378 } -let i = { vx = 1500; vy = 878 } -let j = { vx = 1500; vy = 1128 } -let k = { vx = 1500; vy = 1378 } -let l = { vx = 1950; vy = 628 } -let m = { vx = 1950; vy = 1128 } -let n = { vx = 1950; vy = 1378 } -let o = { vx = 2400; vy = 378 } -let p = { vx = 2400; vy = 878 } -let q = { vx = 2500; vy = 1378 } -let r = { vx = 2760; vy = 1960 } - -let vertices = [a; b; c; d; e; f; g; h; i; j; k; l; m; n; o; p; q; r] - -let graph = List.fold_left (fun graph edge -> Krobot_move.add_edge edge graph) Krobot_move.empty [ - (a, b); - (b, g); - (b, f); - (c, f); - (c, e); - (d, e); - (g, f); - (g, k); - (g, j); - (g, i); - (e, i); - (e, h); - (k, j); - (k, n); - (k, m); - (j, n); - (j, i); - (j, m); - (i, n); - (i, m); - (i, l); - (h, l); - (n, q); - (n, m); - (m, q); - (m, p); - (l, p); - (l, o); - (q, r); -] - -(* +-----------------------------------------------------------------+ - | Ears | - +-----------------------------------------------------------------+ *) - -(* List of potentially valid ears *) -let ears = ref [ - { vx = 150; vy = 378 }; - { vx = 150; vy = 878 }; - { vx = 150; vy = 1378 }; - - { vx = 600; vy = 128 }; - { vx = 600; vy = 628 }; - { vx = 600; vy = 1128 }; - - { vx = 1050; vy = 378 }; - { vx = 1050; vy = 878 }; - - { vx = 1500; vy = 128 }; - { vx = 1500; vy = 628 }; - - { vx = 1950; vy = 378 }; - { vx = 1950; vy = 878 }; - - { vx = 2400; vy = 128 }; - { vx = 2400; vy = 628 }; - { vx = 2400; vy = 1128 }; - - { vx = 2850; vy = 378 }; - { vx = 2850; vy = 878 }; - { vx = 2850; vy = 1378 }; -] - -(* Mark an ear as a fake *) -let mark_fake v = - ears := List.filter (fun v' -> v.vy <> v'.vy || (v.vx <> v'.vx && v.vx <> 3000 - v'.vx)) !ears - -(* Look for the closest reachable ear, and returns the ear and the - vertex from which the ear can be reached *) -let closest_ear pos = - let rec aux acc = function - | [] -> - acc - | ear :: ears -> - let rec search acc = function - | [] -> - acc - | v :: rest -> - if (match acc with - | None -> true - | Some v' -> Krobot_move.distance pos v < Krobot_move.distance pos v') - && v.vy = ear.vy && abs (v.vx - ear.vx) = 450 - && (try let _ = Krobot_move.next graph pos v in true with Not_found -> false) - then - search (Some v) rest - else - search acc rest - in - match search None vertices with - | None -> - aux acc ears - | Some v -> - match acc with - | None -> - aux (Some(ear, v)) ears - | Some(ear', v') -> - if Krobot_move.distance pos v < Krobot_move.distance pos v' then - aux (Some(ear, v)) ears - else - aux acc ears - in - aux None !ears - -(* +-----------------------------------------------------------------+ - | Movements | - +-----------------------------------------------------------------+ *) - -let reverse_orientation krobot = - lwt _ = Krobot.Motors.move krobot ~distance:(-250) ~velocity ~acceleration in - lwt _ = Krobot.Motors.turn krobot ~angle:(-90) ~velocity ~acceleration in - lwt _ = Krobot.Motors.move krobot ~distance:200 ~velocity ~acceleration in - lwt _ = Krobot.Motors.turn krobot ~angle:(-51) ~velocity ~acceleration in - lwt _ = Krobot.Motors.move krobot ~distance:(-320) ~velocity ~acceleration in - lwt _ = Krobot.Motors.turn krobot ~angle:(-39) ~velocity ~acceleration in - return () - -let rec goto krobot state dest = - if state.position = dest then - return state - else - let next = Krobot_move.next graph state.position dest in - lwt () = Lwt_log.info_f "next position: (%d, %d)" next.vx next.vy in - let angle, distance, state' = Krobot_move.move state next in - lwt () = Lwt_log.info_f "angle: %d, distance: %d, new state: position: (%d, %d), oritentation: %d" angle distance state'.position.vx state'.position.vy state'.orientation in - lwt () = - if angle <> 0 then - lwt _ = Krobot.Motors.turn krobot ~angle ~velocity ~acceleration in - return () - else - return () - in - lwt _ = Krobot.Motors.move krobot ~distance ~velocity ~acceleration in - goto krobot state' dest - -let take_ear_simple krobot state ear = - lwt a, d = Krobot.Infrared.find krobot in - let alpha = a in - lwt _ = Krobot.Motors.turn krobot ~angle:a ~velocity ~acceleration in - lwt a, d = Krobot.Infrared.find krobot in - let alpha = alpha + a in - lwt _ = Krobot.Motors.turn krobot ~angle:a ~velocity ~acceleration in - lwt _ = Krobot.Motors.move krobot ~distance:(d - 100) ~velocity ~acceleration in - lwt () = Krobot.Grip.down krobot in - lwt () = Krobot.Grip.open_ krobot in - lwt _ = Krobot.Motors.move krobot ~distance:100 ~velocity ~acceleration in - lwt () = Krobot.Grip.close krobot in - lwt () = Lwt_log.info ~section "grip up" in - lwt () = - try_lwt - lwt _ = Krobot.Grip.up krobot in - lwt () = Lwt_log.info ~section "grip release" in - Krobot.Grip.release krobot - with _ -> - return () - in - lwt () = Lwt_log.info ~section "ear collected" in - ears := List.filter ((<>) ear) !ears; - return (state, alpha, d) - -let take_ear krobot state ear = - lwt () = Lwt_log.info_f ~section "taking ear at position (%d, %d)" ear.vx ear.vy in - lwt state = - match abs state.orientation <= 90, ear.vx > state.position.vx with - | true, true -> - lwt _ = Krobot.Motors.turn krobot ~angle:(-state.orientation) ~velocity ~acceleration in - return { state with orientation = 0 } - | true, false -> - lwt _ = Krobot.Motors.turn krobot ~angle:(-state.orientation) ~velocity ~acceleration in - lwt () = reverse_orientation krobot in - return { state with orientation = 180 } - | false, true -> - lwt _ = - if state.orientation < 0 then - Krobot.Motors.turn krobot ~angle:(-180 - state.orientation) ~velocity ~acceleration - else - Krobot.Motors.turn krobot ~angle:(180 - state.orientation) ~velocity ~acceleration - in - lwt () = reverse_orientation krobot in - return { state with orientation = 0 } - | false, false -> - lwt _ = - if state.orientation < 0 then - Krobot.Motors.turn krobot ~angle:(-180 - state.orientation) ~velocity ~acceleration - else - Krobot.Motors.turn krobot ~angle:(180 - state.orientation) ~velocity ~acceleration - in - return { state with orientation = 180 } - in - lwt _ = Krobot.Motors.move krobot ~distance:100 ~velocity ~acceleration in - lwt state, alpha, d = take_ear_simple krobot state ear in - lwt _ = Krobot.Motors.move krobot ~distance:(-(d + 100)) ~velocity ~acceleration in - lwt _ = Krobot.Motors.turn krobot ~angle:(-alpha) ~velocity ~acceleration in - return state - -let take_straight krobot state ear = - let d = distance state.position ear in - let d' = d - 270 - 110 in - let m = { vx = state.position.vx + (ear.vx - state.position.vx) * d' / d; - vy = state.position.vy + (ear.vy - state.position.vy) * d' / d } in - let angle, distance, state' = Krobot_move.move state m in - lwt () = - if angle <> 0 then - lwt _ = Krobot.Motors.turn krobot ~angle ~velocity ~acceleration in - return () - else - return () - in - lwt _ = Krobot.Motors.move krobot ~distance ~velocity ~acceleration in - lwt state, alpha, d = take_ear_simple krobot state' ear in - lwt _ = Krobot.Motors.move krobot ~distance:(-d) ~velocity ~acceleration ... [truncated message content] |
From: Jérémie D. <Ba...@us...> - 2010-05-23 15:40:20
|
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 6ed445d2f79860a1a6251c6013b25c2d98f3fad2 (commit) from 217a9ec1d740143de8973a71ffbe35d58dfca212 (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 6ed445d2f79860a1a6251c6013b25c2d98f3fad2 Author: Jérémie Dimino <je...@di...> Date: Sun May 23 17:35:18 2010 +0200 send a command to one ax12 each time the interface card comes up ----------------------------------------------------------------------- Changes: diff --git a/info/control/driver/driver.ml b/info/control/driver/driver.ml index 420934a..eed1d80 100644 --- a/info/control/driver/driver.ml +++ b/info/control/driver/driver.ml @@ -1446,7 +1446,10 @@ lwt () = ~vendor_id:PcInterface.usb_vid ~product_id:PcInterface.usb_pid_robot_interface ~set:set_card_interface - (fun card -> Gate.enable ()) + (fun card -> + lwt () = Gate.enable () in + lwt _ = get_ax12 1 in + return ()) (fun () -> return ()) in hooks/post-receive -- krobot |
From: Xavier L. <Ba...@us...> - 2010-05-23 14:51:09
|
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 217a9ec1d740143de8973a71ffbe35d58dfca212 (commit) from 804d30b9270027e496e3c21627314b14901e95f6 (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 217a9ec1d740143de8973a71ffbe35d58dfca212 Author: Xavier Lagorce <Xav...@cr...> Date: Sun May 23 16:50:36 2010 +0200 Added a function to get an ADC sample ----------------------------------------------------------------------- Changes: diff --git a/elec/boards/MotherBoard_KrobotJr2010/Firmware/watch_adc.c b/elec/boards/MotherBoard_KrobotJr2010/Firmware/watch_adc.c index af02c0c..0968153 100644 --- a/elec/boards/MotherBoard_KrobotJr2010/Firmware/watch_adc.c +++ b/elec/boards/MotherBoard_KrobotJr2010/Firmware/watch_adc.c @@ -6,9 +6,10 @@ #include "watch_adc.h" #define ADC_GRP1_NUM_CHANNELS 8 -#define ADC_GRP1_BUF_DEPTH 16 +#define ADC_GRP1_BUF_DEPTH 3 static adcsample_t samples[ADC_GRP1_NUM_CHANNELS * ADC_GRP1_BUF_DEPTH]; +static adcsample_t *curBuffer; static Thread *adctp; static uint16_t compHigh[8] = {4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096}; @@ -40,6 +41,8 @@ static void adccallback(adcsample_t *buffer, size_t n) { (void)n; + curBuffer = buffer; + for (i=0; i < 8; i++) { if (alarmActi[i]) { if (ind[i] == 0 && buffer[i] >= compHigh[i]) { @@ -99,3 +102,9 @@ void adcSetAlarm(uint8_t adc, uint16_t histLow, uint16_t histHigh) { void adcResetAlarm(uint8_t adc) { alarmActi[adc] = 0; } + +adcsample_t adcGetSample(uint8_t adc) { + if (adc > 7) + return 0; + return curBuffer[adc]; +} diff --git a/elec/boards/MotherBoard_KrobotJr2010/Firmware/watch_adc.h b/elec/boards/MotherBoard_KrobotJr2010/Firmware/watch_adc.h index 650acc7..e4cea30 100644 --- a/elec/boards/MotherBoard_KrobotJr2010/Firmware/watch_adc.h +++ b/elec/boards/MotherBoard_KrobotJr2010/Firmware/watch_adc.h @@ -25,5 +25,6 @@ EventSource adcAlarmWarn[8], adcAlarmOK[8]; void adcWatchInit(void); void adcSetAlarm(uint8_t adc, uint16_t histLow, uint16_t histHigh); void adcResetAlarm(uint8_t adc); +adcsample_t adcGetSample(uint8_t adc); #endif hooks/post-receive -- krobot |
From: Xavier L. <Ba...@us...> - 2010-05-23 14:10:50
|
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 804d30b9270027e496e3c21627314b14901e95f6 (commit) from 583b99a782254c915c3d667ad6363ef3affb5407 (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 804d30b9270027e496e3c21627314b14901e95f6 Author: Xavier Lagorce <Xav...@cr...> Date: Sun May 23 16:10:06 2010 +0200 Added hysteretic comparators and event generation to the watch_adc module. the main.c program has been update to reflect these changes ----------------------------------------------------------------------- Changes: diff --git a/elec/boards/MotherBoard_KrobotJr2010/Firmware/main.c b/elec/boards/MotherBoard_KrobotJr2010/Firmware/main.c index 34d77fb..bbb1bec 100644 --- a/elec/boards/MotherBoard_KrobotJr2010/Firmware/main.c +++ b/elec/boards/MotherBoard_KrobotJr2010/Firmware/main.c @@ -167,6 +167,13 @@ static void TimerHandler(eventid_t id) { }*/ } +static void adcHandler(eventid_t id) { + palClearPad(IOPORT3, GPIOC_LED); +} +static void adcNHandler(eventid_t id) { + palSetPad(IOPORT3, GPIOC_LED); +} + /* * Entry point, note, the main() function is already a thread in the system * on entry. @@ -175,9 +182,11 @@ int main(int argc, char **argv) { static const evhandler_t evhndl[] = { TimerHandler, + adcHandler, + adcNHandler }; static EvTimer evt; - struct EventListener el0; + struct EventListener el0, elADC, elNADC; (void)argc; (void)argv; @@ -228,6 +237,9 @@ int main(int argc, char **argv) { evtInit(&evt, MS2ST(500)); /* Initializes an event timer object. */ evtStart(&evt); /* Starts the event timer. */ chEvtRegister(&evt.et_es, &el0, 0); /* Registers on the timer event source. */ + chEvtRegister(&adcAlarmWarn[ADC_3], &elADC, 1); + chEvtRegister(&adcAlarmOK[ADC_3], &elNADC, 2); + adcSetAlarm(ADC_3, 1800, 2200); while (TRUE) chEvtDispatch(evhndl, chEvtWaitOne(ALL_EVENTS)); return 0; diff --git a/elec/boards/MotherBoard_KrobotJr2010/Firmware/watch_adc.c b/elec/boards/MotherBoard_KrobotJr2010/Firmware/watch_adc.c index 1946b3b..af02c0c 100644 --- a/elec/boards/MotherBoard_KrobotJr2010/Firmware/watch_adc.c +++ b/elec/boards/MotherBoard_KrobotJr2010/Firmware/watch_adc.c @@ -11,6 +11,10 @@ static adcsample_t samples[ADC_GRP1_NUM_CHANNELS * ADC_GRP1_BUF_DEPTH]; static Thread *adctp; +static uint16_t compHigh[8] = {4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096}; +static uint16_t compLow[8] = {0, 0, 0, 0, 0, 0, 0, 0}; +static uint8_t alarmActi[8] = {0, 0, 0, 0, 0, 0, 0, 0}; + const ADCConfig adccfg = {}; const ADCConversionGroup adcgrpcfg = { TRUE, @@ -31,11 +35,23 @@ const ADCConversionGroup adcgrpcfg = { */ static void adccallback(adcsample_t *buffer, size_t n) { + static uint8_t ind[8] = {0, 0, 0, 0, 0, 0, 0, 0}; + uint8_t i; + (void)n; - if (buffer[ADC_3] >= 2000) - palClearPad(IOPORT3, GPIOC_LED); - else - palSetPad(IOPORT3, GPIOC_LED); + + for (i=0; i < 8; i++) { + if (alarmActi[i]) { + if (ind[i] == 0 && buffer[i] >= compHigh[i]) { + ind[i] = 1; + chEvtBroadcastI(&adcAlarmWarn[i]); + } + if (ind[i] == 1 && buffer[i] <= compLow[i]) { + ind[i] = 0; + chEvtBroadcastI(&adcAlarmOK[i]); + } + } + } } static WORKING_AREA(adc_continuous_wa, 256); @@ -50,6 +66,8 @@ static msg_t adc_continuous_thread(void *p){ void adcWatchInit(void) { + uint8_t i; + // Init pins palSetGroupMode(IOPORT1, PAL_PORT_BIT(4) | PAL_PORT_BIT(5), PAL_MODE_INPUT_ANALOG); palSetGroupMode(IOPORT3, PAL_PORT_BIT(0) | PAL_PORT_BIT(1) | PAL_PORT_BIT(2) @@ -58,7 +76,26 @@ void adcWatchInit(void) { // Start ADC driver adcStart(&ADCD1, &adccfg); + // Init trigger event + for (i=0; i < 8; i++) { + chEvtInit(&adcAlarmWarn[i]); + chEvtInit(&adcAlarmOK[i]); + } + // Start conversion Thread adctp = chThdCreateStatic(adc_continuous_wa, sizeof(adc_continuous_wa), NORMALPRIO + 9, adc_continuous_thread, NULL); } + +void adcSetAlarm(uint8_t adc, uint16_t histLow, uint16_t histHigh) { + + chSysLock(); + compLow[adc] = histLow; + compHigh[adc] = histHigh; + alarmActi[adc] = 1; + chSysUnlock(); +} + +void adcResetAlarm(uint8_t adc) { + alarmActi[adc] = 0; +} diff --git a/elec/boards/MotherBoard_KrobotJr2010/Firmware/watch_adc.h b/elec/boards/MotherBoard_KrobotJr2010/Firmware/watch_adc.h index 892cddb..650acc7 100644 --- a/elec/boards/MotherBoard_KrobotJr2010/Firmware/watch_adc.h +++ b/elec/boards/MotherBoard_KrobotJr2010/Firmware/watch_adc.h @@ -19,6 +19,11 @@ #define ADC_6 6 #define ADC_7 7 +// Event sources +EventSource adcAlarmWarn[8], adcAlarmOK[8]; + void adcWatchInit(void); +void adcSetAlarm(uint8_t adc, uint16_t histLow, uint16_t histHigh); +void adcResetAlarm(uint8_t adc); #endif hooks/post-receive -- krobot |
From: Xavier L. <Ba...@us...> - 2010-05-23 14:09:38
|
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 583b99a782254c915c3d667ad6363ef3affb5407 (commit) from 3619e193e91c744894201e22dd4f4a2bcbdb5aed (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 583b99a782254c915c3d667ad6363ef3affb5407 Author: Xavier Lagorce <Xav...@cr...> Date: Sun May 23 16:08:44 2010 +0200 Serial command shell seems to be more reliable with slower bitrate and more working area ----------------------------------------------------------------------- Changes: diff --git a/elec/boards/MotherBoard_KrobotJr2010/Firmware/halconf.h b/elec/boards/MotherBoard_KrobotJr2010/Firmware/halconf.h index ba5f1cb..9b6165a 100644 --- a/elec/boards/MotherBoard_KrobotJr2010/Firmware/halconf.h +++ b/elec/boards/MotherBoard_KrobotJr2010/Firmware/halconf.h @@ -116,7 +116,7 @@ /* * Default SERIAL settings overrides (uncomment to override). */ -#define SERIAL_DEFAULT_BITRATE 115200 +#define SERIAL_DEFAULT_BITRATE 38400 /*#define SERIAL_BUFFERS_SIZE 64*/ /*===========================================================================*/ diff --git a/elec/boards/MotherBoard_KrobotJr2010/Firmware/monitor.c b/elec/boards/MotherBoard_KrobotJr2010/Firmware/monitor.c index 02fc816..79f74e9 100644 --- a/elec/boards/MotherBoard_KrobotJr2010/Firmware/monitor.c +++ b/elec/boards/MotherBoard_KrobotJr2010/Firmware/monitor.c @@ -413,6 +413,6 @@ static const ShellConfig shellConfig = { void monitorInit(void) { shellInit(); - shellCreate(&shellConfig, THD_WA_SIZE(512), NORMALPRIO); - cdtp = chThdCreateFromHeap(NULL, THD_WA_SIZE(128), NORMALPRIO + 1, consoleThread, NULL); + shellCreate(&shellConfig, THD_WA_SIZE(1024), NORMALPRIO); + cdtp = chThdCreateFromHeap(NULL, THD_WA_SIZE(256), NORMALPRIO + 1, consoleThread, NULL); } hooks/post-receive -- krobot |
From: Xavier L. <Ba...@us...> - 2010-05-23 12:23:22
|
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 3619e193e91c744894201e22dd4f4a2bcbdb5aed (commit) from 89ddd7a054b08aca0b9e46ae6807c072dd674117 (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 3619e193e91c744894201e22dd4f4a2bcbdb5aed Author: Xavier Lagorce <Xav...@cr...> Date: Sun May 23 14:22:37 2010 +0200 More reasonable working area size Removed useless infinite loop ----------------------------------------------------------------------- Changes: diff --git a/elec/boards/MotherBoard_KrobotJr2010/Firmware/watch_adc.c b/elec/boards/MotherBoard_KrobotJr2010/Firmware/watch_adc.c index 96a8ce0..1946b3b 100644 --- a/elec/boards/MotherBoard_KrobotJr2010/Firmware/watch_adc.c +++ b/elec/boards/MotherBoard_KrobotJr2010/Firmware/watch_adc.c @@ -38,15 +38,13 @@ static void adccallback(adcsample_t *buffer, size_t n) { palSetPad(IOPORT3, GPIOC_LED); } -static WORKING_AREA(adc_continuous_wa, 2048); +static WORKING_AREA(adc_continuous_wa, 256); static msg_t adc_continuous_thread(void *p){ (void)p; - while(1) { - adcStartConversion(&ADCD1, &adcgrpcfg, samples, - ADC_GRP1_BUF_DEPTH, adccallback); - adcWaitConversion(&ADCD1, TIME_INFINITE); - } + adcStartConversion(&ADCD1, &adcgrpcfg, samples, + ADC_GRP1_BUF_DEPTH, adccallback); + adcWaitConversion(&ADCD1, TIME_INFINITE); return 0; } hooks/post-receive -- krobot |
From: Xavier L. <Ba...@us...> - 2010-05-23 12:03:08
|
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 89ddd7a054b08aca0b9e46ae6807c072dd674117 (commit) from c8feadfc3316ced518603530e94cc31031cdeefd (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 89ddd7a054b08aca0b9e46ae6807c072dd674117 Author: Xavier Lagorce <Xav...@cr...> Date: Sun May 23 14:02:42 2010 +0200 Removed some warnings ----------------------------------------------------------------------- Changes: diff --git a/elec/boards/MotherBoard_KrobotJr2010/Firmware/watch_adc.c b/elec/boards/MotherBoard_KrobotJr2010/Firmware/watch_adc.c index f0cdb91..96a8ce0 100644 --- a/elec/boards/MotherBoard_KrobotJr2010/Firmware/watch_adc.c +++ b/elec/boards/MotherBoard_KrobotJr2010/Firmware/watch_adc.c @@ -29,9 +29,9 @@ const ADCConversionGroup adcgrpcfg = { /* * ADC continuous conversion thread. */ -size_t nx = 0, ny = 0; static void adccallback(adcsample_t *buffer, size_t n) { + (void)n; if (buffer[ADC_3] >= 2000) palClearPad(IOPORT3, GPIOC_LED); else hooks/post-receive -- krobot |
From: Xavier L. <Ba...@us...> - 2010-05-22 22:53:50
|
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 c8feadfc3316ced518603530e94cc31031cdeefd (commit) via 0412434c7131927aa3516d50caf132dd4cd18b5a (commit) via 30c9dbd4a9a8c5df25144521eb92ead7db96022b (commit) from 84809cd9ce8a1ad570318606bb343b1adc818511 (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 c8feadfc3316ced518603530e94cc31031cdeefd Author: Xavier Lagorce <Xav...@cr...> Date: Sun May 23 00:52:30 2010 +0200 Replaced ADCs management by watch_adc in main.c commit 0412434c7131927aa3516d50caf132dd4cd18b5a Author: Xavier Lagorce <Xav...@cr...> Date: Sun May 23 00:50:12 2010 +0200 Added cleaner interfacing with ADCs using ChibiOS driver commit 30c9dbd4a9a8c5df25144521eb92ead7db96022b Author: Xavier Lagorce <Xav...@cr...> Date: Sun May 23 00:49:42 2010 +0200 Bigger square in demo 1 ----------------------------------------------------------------------- Changes: diff --git a/elec/boards/MotherBoard_KrobotJr2010/Firmware/Makefile b/elec/boards/MotherBoard_KrobotJr2010/Firmware/Makefile index 8f09bc3..03ea4a3 100644 --- a/elec/boards/MotherBoard_KrobotJr2010/Firmware/Makefile +++ b/elec/boards/MotherBoard_KrobotJr2010/Firmware/Makefile @@ -81,6 +81,7 @@ CSRC += monitor.c CSRC += can_monitor.c CSRC += lift.c CSRC += ax12.c +CSRC += watch_adc.c CSRC += main.c # C++ sources that can be compiled in ARM or THUMB mode depending on the global diff --git a/elec/boards/MotherBoard_KrobotJr2010/Firmware/main.c b/elec/boards/MotherBoard_KrobotJr2010/Firmware/main.c index e15ff48..34d77fb 100644 --- a/elec/boards/MotherBoard_KrobotJr2010/Firmware/main.c +++ b/elec/boards/MotherBoard_KrobotJr2010/Firmware/main.c @@ -18,6 +18,8 @@ #include "lift.h" #include "ax12.h" +#include "watch_adc.h" + /* * Global variables */ @@ -40,67 +42,6 @@ static msg_t Thread1(void *arg) { return 0; } -#define ADC_GRP1_NUM_CHANNELS 8 -#define ADC_GRP1_BUF_DEPTH 16 - -static adcsample_t samples[ADC_GRP1_NUM_CHANNELS * ADC_GRP1_BUF_DEPTH]; -static Thread *adctp; - -const ADCConfig adccfg = {}; -const ADCConversionGroup adcgrpcfg = { - TRUE, - ADC_GRP1_NUM_CHANNELS, - 0, - ADC_CR2_EXTSEL_SWSTART | ADC_CR2_TSVREFE | ADC_CR2_CONT, - 0, - 0, - ADC_SQR1_NUM_CH(ADC_GRP1_NUM_CHANNELS), - ADC_SQR2_SQ7_N(ADC_CHANNEL_SENSOR) | ADC_SQR2_SQ6_N(ADC_CHANNEL_VREFINT), - ADC_SQR3_SQ5_N(ADC_CHANNEL_IN11) | ADC_SQR3_SQ4_N(ADC_CHANNEL_IN10) | - ADC_SQR3_SQ3_N(ADC_CHANNEL_IN11) | ADC_SQR3_SQ2_N(ADC_CHANNEL_IN10) | - ADC_SQR3_SQ1_N(ADC_CHANNEL_IN11) | ADC_SQR3_SQ0_N(ADC_CHANNEL_IN10) -}; - -/* - * ADC continuous conversion thread. - */ -size_t nx = 0, ny = 0; -static void adccallback(adcsample_t *buffer, size_t n) { - - static uint16_t count = 0; - - if (buffer[11] >= 2400 ) { - palClearPad(IOPORT3, GPIOC_LED); - //canSetScrew(0,0,0,0,0); - //while(1); - count++; - } - else - palSetPad(IOPORT3, GPIOC_LED); - - if (count >= 10) { - canSetScrew(0,0,0,0,0); - while(1); - } -} - -static WORKING_AREA(adc_continuous_wa, 256); -static msg_t adc_continuous_thread(void *p){ - - (void)p; - palSetGroupMode(IOPORT3, - PAL_PORT_BIT(0) | PAL_PORT_BIT(1), - PAL_MODE_INPUT_ANALOG); - adcStart(&ADCD1, &adccfg); - while(1) { - adcStartConversion(&ADCD1, &adcgrpcfg, samples, - ADC_GRP1_BUF_DEPTH, adccallback); - adcWaitConversion(&ADCD1, TIME_INFINITE); - adcStop(&ADCD1);} - return 0; -} - - static WORKING_AREA(waThread2, 1024); static msg_t Thread2(void *arg) { @@ -128,9 +69,6 @@ static msg_t Thread2(void *arg) { } };*/ - adctp = chThdCreateStatic(adc_continuous_wa, sizeof(adc_continuous_wa), - NORMALPRIO + 9, adc_continuous_thread, NULL); - chThdSleep(MS2ST(85000)); canSetScrew(0, 0, 0, 0, 0); while(1); @@ -174,6 +112,7 @@ static void TimerHandler(eventid_t id) { chThdSleep(MS2ST(15000)); canSetScrew(0, 0, 0, 0, 0); } + /*if (!palReadPad(IOPORT1, GPIOA_BUTTON)) { palClearPad(IOPORT3, GPIOC_LED); @@ -260,21 +199,21 @@ int main(int argc, char **argv) { canMonitorStart(); /* - * Initialise the lift + * Initialise lift and grips */ liftInit(); ax12Init(); - //chThdSleep(MS2ST(2000)); - + /* + * Initialise ADCs + */ + adcWatchInit(); + /* * Init pins */ palSetGroupMode(IOPORT3, PAL_PORT_BIT(6) | PAL_PORT_BIT(8), PAL_MODE_INPUT_PULLDOWN); - palSetGroupMode(IOPORT3, PAL_PORT_BIT(0) | PAL_PORT_BIT(2), PAL_MODE_INPUT_ANALOG); - adcStart(&ADCD1, NULL); - //adctp = chThdCreateStatic(adc_continuous_wa, sizeof(adc_continuous_wa), - // NORMALPRIO + 9, adc_continuous_thread, NULL); + /* * Creates the blinker thread. */ @@ -286,9 +225,6 @@ int main(int argc, char **argv) { * sleeping in a loop and listen for events. */ - uint8_t params[] = {P_GOAL_POSITION, 0x00, 0x02, 0x00, 0x02}; - ax12SendPacket(1, INST_WRITE, 5, params); - evtInit(&evt, MS2ST(500)); /* Initializes an event timer object. */ evtStart(&evt); /* Starts the event timer. */ chEvtRegister(&evt.et_es, &el0, 0); /* Registers on the timer event source. */ diff --git a/elec/boards/MotherBoard_KrobotJr2010/Firmware/monitor.c b/elec/boards/MotherBoard_KrobotJr2010/Firmware/monitor.c index 66d0b06..02fc816 100644 --- a/elec/boards/MotherBoard_KrobotJr2010/Firmware/monitor.c +++ b/elec/boards/MotherBoard_KrobotJr2010/Firmware/monitor.c @@ -99,13 +99,13 @@ void demoHandler(BaseChannel *chp, int argc, char* argv[]) { } switch (argv[0][0]) { case '1': - canSetScrew(0, 0, 100, 0, 0); + canSetScrew(0, 0, 200, 0, 0); chThdSleepMilliseconds(2000); - canSetScrew(0, 0, 0, 100, 0); + canSetScrew(0, 0, 0, 200, 0); chThdSleepMilliseconds(2000); - canSetScrew(0, 0, -100, 0, 0); + canSetScrew(0, 0, -200, 0, 0); chThdSleepMilliseconds(2000); - canSetScrew(0, 0, 0, -100, 0); + canSetScrew(0, 0, 0, -200, 0); chThdSleepMilliseconds(2000); canSetScrew(0, 0, 0, 0, 0); break; diff --git a/elec/boards/MotherBoard_KrobotJr2010/Firmware/watch_adc.c b/elec/boards/MotherBoard_KrobotJr2010/Firmware/watch_adc.c new file mode 100644 index 0000000..f0cdb91 --- /dev/null +++ b/elec/boards/MotherBoard_KrobotJr2010/Firmware/watch_adc.c @@ -0,0 +1,66 @@ +/* + * Manager to watch the card ADCs + * Xavier Lagorce + */ + +#include "watch_adc.h" + +#define ADC_GRP1_NUM_CHANNELS 8 +#define ADC_GRP1_BUF_DEPTH 16 + +static adcsample_t samples[ADC_GRP1_NUM_CHANNELS * ADC_GRP1_BUF_DEPTH]; +static Thread *adctp; + +const ADCConfig adccfg = {}; +const ADCConversionGroup adcgrpcfg = { + TRUE, + ADC_GRP1_NUM_CHANNELS, + 0, + ADC_CR2_EXTSEL_SWSTART | ADC_CR2_TSVREFE | ADC_CR2_CONT, + 0, + 0, + ADC_SQR1_NUM_CH(ADC_GRP1_NUM_CHANNELS), + ADC_SQR2_SQ7_N(ADC_CHANNEL_IN5) | ADC_SQR2_SQ6_N(ADC_CHANNEL_IN4), + ADC_SQR3_SQ5_N(ADC_CHANNEL_IN15) | ADC_SQR3_SQ4_N(ADC_CHANNEL_IN14) | + ADC_SQR3_SQ3_N(ADC_CHANNEL_IN13) | ADC_SQR3_SQ2_N(ADC_CHANNEL_IN12) | + ADC_SQR3_SQ1_N(ADC_CHANNEL_IN11) | ADC_SQR3_SQ0_N(ADC_CHANNEL_SENSOR) +}; + +/* + * ADC continuous conversion thread. + */ +size_t nx = 0, ny = 0; +static void adccallback(adcsample_t *buffer, size_t n) { + + if (buffer[ADC_3] >= 2000) + palClearPad(IOPORT3, GPIOC_LED); + else + palSetPad(IOPORT3, GPIOC_LED); +} + +static WORKING_AREA(adc_continuous_wa, 2048); +static msg_t adc_continuous_thread(void *p){ + + (void)p; + while(1) { + adcStartConversion(&ADCD1, &adcgrpcfg, samples, + ADC_GRP1_BUF_DEPTH, adccallback); + adcWaitConversion(&ADCD1, TIME_INFINITE); + } + return 0; +} + +void adcWatchInit(void) { + + // Init pins + palSetGroupMode(IOPORT1, PAL_PORT_BIT(4) | PAL_PORT_BIT(5), PAL_MODE_INPUT_ANALOG); + palSetGroupMode(IOPORT3, PAL_PORT_BIT(0) | PAL_PORT_BIT(1) | PAL_PORT_BIT(2) + | PAL_PORT_BIT(3) | PAL_PORT_BIT(5), PAL_MODE_INPUT_ANALOG); + + // Start ADC driver + adcStart(&ADCD1, &adccfg); + + // Start conversion Thread + adctp = chThdCreateStatic(adc_continuous_wa, sizeof(adc_continuous_wa), + NORMALPRIO + 9, adc_continuous_thread, NULL); +} diff --git a/elec/boards/MotherBoard_KrobotJr2010/Firmware/watch_adc.h b/elec/boards/MotherBoard_KrobotJr2010/Firmware/watch_adc.h new file mode 100644 index 0000000..892cddb --- /dev/null +++ b/elec/boards/MotherBoard_KrobotJr2010/Firmware/watch_adc.h @@ -0,0 +1,24 @@ +/* + * Manager to watch the card ADCs + * Xavier Lagorce + */ + +#ifndef HEADER__WATCH_ADC +#define HEADER__WATCH_ADC + +#include "ch.h" +#include "hal.h" +#include "pal.h" + +#define ADC_TEMP 0 +#define ADC_1 1 +#define ADC_2 2 +#define ADC_3 3 +#define ADC_4 4 +#define ADC_5 5 +#define ADC_6 6 +#define ADC_7 7 + +void adcWatchInit(void); + +#endif hooks/post-receive -- krobot |
From: Jérémie D. <Ba...@us...> - 2010-05-22 21:02:39
|
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 84809cd9ce8a1ad570318606bb343b1adc818511 (commit) via 54c3d52a05711a2a2b6f6d1c42410239ea018156 (commit) from 2ef5b21f3ff7a30b55cf604ddc3a07e547bc225f (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 84809cd9ce8a1ad570318606bb343b1adc818511 Author: Jérémie Dimino <je...@di...> Date: Sat May 22 23:01:00 2010 +0200 small fixes in the ia commit 54c3d52a05711a2a2b6f6d1c42410239ea018156 Author: [Kro]bot <kr...@wa...> Date: Sat May 22 23:00:32 2010 +0200 make the grip move faster ----------------------------------------------------------------------- Changes: diff --git a/info/control/clients/ia.ml b/info/control/clients/ia.ml index 08e3ae2..3c45afa 100644 --- a/info/control/clients/ia.ml +++ b/info/control/clients/ia.ml @@ -12,7 +12,7 @@ open Krobot_move let section = Lwt_log.Section.make "ia" -let velocity = 100 +let velocity = 400 let acceleration = 800 (* +-----------------------------------------------------------------+ @@ -187,7 +187,16 @@ let take_ear_simple krobot state ear = lwt () = Krobot.Grip.open_ krobot in lwt _ = Krobot.Motors.move krobot ~distance:100 ~velocity ~acceleration in lwt () = Krobot.Grip.close krobot in - lwt () = try_lwt Krobot.Grip.up krobot >> Krobot.Grip.release krobot with _ -> return () in + lwt () = Lwt_log.info ~section "grip up" in + lwt () = + try_lwt + lwt _ = Krobot.Grip.up krobot in + lwt () = Lwt_log.info ~section "grip release" in + Krobot.Grip.release krobot + with _ -> + return () + in + lwt () = Lwt_log.info ~section "ear collected" in ears := List.filter ((<>) ear) !ears; return (state, alpha, d) @@ -228,7 +237,7 @@ let take_ear krobot state ear = let take_straight krobot state ear = let d = distance state.position ear in - let d' = d - 270 - 100 in + let d' = d - 270 - 110 in let m = { vx = state.position.vx + (ear.vx - state.position.vx) * d' / d; vy = state.position.vy + (ear.vy - state.position.vy) * d' / d } in let angle, distance, state' = Krobot_move.move state m in @@ -241,7 +250,7 @@ let take_straight krobot state ear = in lwt _ = Krobot.Motors.move krobot ~distance ~velocity ~acceleration in lwt state, alpha, d = take_ear_simple krobot state' ear in - lwt _ = Krobot.Motors.move krobot ~distance:(-(d + 100)) ~velocity ~acceleration in + lwt _ = Krobot.Motors.move krobot ~distance:(-d) ~velocity ~acceleration in lwt _ = Krobot.Motors.turn krobot ~angle:(-alpha) ~velocity ~acceleration in return state' diff --git a/info/control/driver/driver.ml b/info/control/driver/driver.ml index cb940ca..420934a 100644 --- a/info/control/driver/driver.ml +++ b/info/control/driver/driver.ml @@ -343,7 +343,7 @@ let set_ax12 actions = 0 actions in lwt () = Lwt_unix.sleep 0.1 in - if delta < 10 then + if delta < 15 then return () else loop () @@ -356,7 +356,7 @@ let set_rx64 position velocity = let rec loop () = lwt pos = RX64Card.call Commands.RX64.read16 (get_card card_rx64) (0x24, 2) in lwt () = Lwt_unix.sleep 0.1 in - if abs (pos - position) < 10 then + if abs (pos - position) < 15 then return () else loop () @@ -392,10 +392,10 @@ struct let grip_up () = let thread = - lwt () = set_rx64 222 50 + lwt () = set_rx64 222 0 and () = set_ax12 [{ aa_id = 2; aa_position = 180; - aa_velocity = 70 }] + aa_velocity = 200 }] in return () in @@ -411,17 +411,17 @@ struct return true let grip_empty_up () = - lwt () = set_rx64 222 50 + lwt () = set_rx64 222 0 and () = set_ax12 [{ aa_id = 2; aa_position = 180; - aa_velocity = 90 }] in + aa_velocity = 200 }] in return () let grip_down () = - lwt () = set_rx64 536 50 + lwt () = set_rx64 536 0 and () = set_ax12 [{ aa_id = 2; aa_position = 510; - aa_velocity = 50 }; + aa_velocity = 0 }; { aa_id = 3; aa_position = 390; aa_velocity = 0 }] in hooks/post-receive -- krobot |
From: Jérémie D. <Ba...@us...> - 2010-05-22 19:43:11
|
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 2ef5b21f3ff7a30b55cf604ddc3a07e547bc225f (commit) from 14f3f3fb92621a0e816bad8022ff38ff5cf66e88 (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 2ef5b21f3ff7a30b55cf604ddc3a07e547bc225f Author: Jérémie Dimino <je...@di...> Date: Sat May 22 21:42:19 2010 +0200 take ears of the first line ----------------------------------------------------------------------- Changes: diff --git a/info/control/clients/ia.ml b/info/control/clients/ia.ml index 4941964..08e3ae2 100644 --- a/info/control/clients/ia.ml +++ b/info/control/clients/ia.ml @@ -12,7 +12,7 @@ open Krobot_move let section = Lwt_log.Section.make "ia" -let velocity = 400 +let velocity = 100 let acceleration = 800 (* +-----------------------------------------------------------------+ @@ -175,6 +175,22 @@ let rec goto krobot state dest = lwt _ = Krobot.Motors.move krobot ~distance ~velocity ~acceleration in goto krobot state' dest +let take_ear_simple krobot state ear = + lwt a, d = Krobot.Infrared.find krobot in + let alpha = a in + lwt _ = Krobot.Motors.turn krobot ~angle:a ~velocity ~acceleration in + lwt a, d = Krobot.Infrared.find krobot in + let alpha = alpha + a in + lwt _ = Krobot.Motors.turn krobot ~angle:a ~velocity ~acceleration in + lwt _ = Krobot.Motors.move krobot ~distance:(d - 100) ~velocity ~acceleration in + lwt () = Krobot.Grip.down krobot in + lwt () = Krobot.Grip.open_ krobot in + lwt _ = Krobot.Motors.move krobot ~distance:100 ~velocity ~acceleration in + lwt () = Krobot.Grip.close krobot in + lwt () = try_lwt Krobot.Grip.up krobot >> Krobot.Grip.release krobot with _ -> return () in + ears := List.filter ((<>) ear) !ears; + return (state, alpha, d) + let take_ear krobot state ear = lwt () = Lwt_log.info_f ~section "taking ear at position (%d, %d)" ear.vx ear.vy in lwt state = @@ -205,23 +221,30 @@ let take_ear krobot state ear = return { state with orientation = 180 } in lwt _ = Krobot.Motors.move krobot ~distance:100 ~velocity ~acceleration in - lwt a, d = Krobot.Infrared.find krobot in - let alpha = a in - lwt _ = Krobot.Motors.turn krobot ~angle:a ~velocity ~acceleration in - lwt a, d = Krobot.Infrared.find krobot in - let alpha = alpha + a in - lwt _ = Krobot.Motors.turn krobot ~angle:a ~velocity ~acceleration in - lwt _ = Krobot.Motors.move krobot ~distance:(d - 100) ~velocity ~acceleration in - lwt () = Krobot.Grip.down krobot in - lwt () = Krobot.Grip.open_ krobot in - lwt _ = Krobot.Motors.move krobot ~distance:100 ~velocity ~acceleration in - lwt () = Krobot.Grip.close krobot in - lwt () = try_lwt Krobot.Grip.up krobot >> Krobot.Grip.release krobot with _ -> return () - and _ = Krobot.Motors.move krobot ~distance:(-(d + 100)) ~velocity ~acceleration in + lwt state, alpha, d = take_ear_simple krobot state ear in + lwt _ = Krobot.Motors.move krobot ~distance:(-(d + 100)) ~velocity ~acceleration in lwt _ = Krobot.Motors.turn krobot ~angle:(-alpha) ~velocity ~acceleration in - ears := List.filter ((<>) ear) !ears; return state +let take_straight krobot state ear = + let d = distance state.position ear in + let d' = d - 270 - 100 in + let m = { vx = state.position.vx + (ear.vx - state.position.vx) * d' / d; + vy = state.position.vy + (ear.vy - state.position.vy) * d' / d } in + let angle, distance, state' = Krobot_move.move state m in + lwt () = + if angle <> 0 then + lwt _ = Krobot.Motors.turn krobot ~angle ~velocity ~acceleration in + return () + else + return () + in + lwt _ = Krobot.Motors.move krobot ~distance ~velocity ~acceleration in + lwt state, alpha, d = take_ear_simple krobot state' ear in + lwt _ = Krobot.Motors.move krobot ~distance:(-(d + 100)) ~velocity ~acceleration in + lwt _ = Krobot.Motors.turn krobot ~angle:(-alpha) ~velocity ~acceleration in + return state' + (* +-----------------------------------------------------------------+ | Entry point | +-----------------------------------------------------------------+ *) @@ -249,8 +272,15 @@ lwt () = lwt state = take_ear krobot state ear in loop state (n - 1) in - let init = { + let state = { orientation = -90; position = if team = `Blue then a else r; } in - loop init 2 + (*loop state 2*) + lwt state = take_straight krobot state { vx = 150; vy = 1378 } in + lwt state = take_straight krobot state { vx = 600; vy = 1128 } in + lwt state = take_straight krobot state { vx = 150; vy = 878 } in + lwt state = take_straight krobot state { vx = 600; vy = 628 } in + lwt state = take_straight krobot state { vx = 150; vy = 378 } in + lwt state = take_straight krobot state { vx = 600; vy = 128 } in + return () hooks/post-receive -- krobot |
From: Jérémie D. <Ba...@us...> - 2010-05-22 14:00:45
|
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 14f3f3fb92621a0e816bad8022ff38ff5cf66e88 (commit) via f983539a6786f1b5817a9736a4a202beea9af550 (commit) via 636151c8b2ab6aaa0f1fd75fde0f166e5f68b3be (commit) via f1ad9c81359debc2656d5286760df5764bde5e8e (commit) from f775e431796cbf2718c9c9128347b21f172ea159 (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 14f3f3fb92621a0e816bad8022ff38ff5cf66e88 Author: Jérémie Dimino <je...@di...> Date: Sat May 22 15:56:24 2010 +0200 small fixes in the ia commit f983539a6786f1b5817a9736a4a202beea9af550 Author: Jérémie Dimino <je...@di...> Date: Sat May 22 15:27:23 2010 +0200 better scanning with the infrared commit 636151c8b2ab6aaa0f1fd75fde0f166e5f68b3be Author: Jérémie Dimino <je...@di...> Date: Sat May 22 15:26:20 2010 +0200 more precise calibration commit f1ad9c81359debc2656d5286760df5764bde5e8e Author: Jérémie Dimino <je...@di...> Date: Sat May 22 13:24:14 2010 +0200 add Infrared.Find ----------------------------------------------------------------------- Changes: diff --git a/info/control/clients/ia.ml b/info/control/clients/ia.ml index 0da42ae..4941964 100644 --- a/info/control/clients/ia.ml +++ b/info/control/clients/ia.ml @@ -12,7 +12,7 @@ open Krobot_move let section = Lwt_log.Section.make "ia" -let velocity = 100 +let velocity = 400 let acceleration = 800 (* +-----------------------------------------------------------------+ @@ -205,59 +205,21 @@ let take_ear krobot state ear = return { state with orientation = 180 } in lwt _ = Krobot.Motors.move krobot ~distance:100 ~velocity ~acceleration in - let pi = 4.0 *. atan 1.0 in - let sqr x = x *. x in - let scan () = - lwt pts = Krobot.Infrared.scan krobot in - let dist_min = List.fold_left (fun dist_min (angle, dist) -> - if dist >= 0 && dist <= 130 && dist < dist_min then - dist - else - dist_min) max_int pts in - let pts = List.filter (fun (a, d) -> d >= 0 && d <= 130 && d < dist_min + 10) pts in - lwt () = - Lwt_list.iter_s - (fun (angle, dist) -> - Lwt_io.printlf "angle = %d, distance = %d" angle dist) - pts - in - if dist_min = max_int then - lwt () = Lwt_io.printl "no ears found" in - exit 2 - else begin - let mean = float_of_int (List.fold_left (fun acc (a, d) -> acc + a) 0 pts) /. float_of_int (List.length pts) in - lwt () = Lwt_io.printlf "ears found at angle = %f, distance = %d" mean dist_min in - let alpha = mean /. 180.0 *. pi and d = float_of_int dist_min +. 60.0 +. 25.0 in - let a = d *. cos alpha +. 270.0 and b = d *. sin alpha in - let b = - if b < -25.0 then - b -. 25.0 - else if b <= 0.0 && b >= -25.0 then - 25.0 -. b - else - b +. 25.0 - in - let beta = atan(b /. a) in - let c = sqrt (sqr a +. sqr b) in - let e = c -. 270.0 -. 110.0 in - let beta = beta /. pi *. 180.0 in - lwt () = Lwt_io.printlf "a = %f, b = %f, c = %f" a b c in - lwt () = Lwt_io.printlf "turn: %f, move: %f" beta e in - return (beta, e) - end - in - lwt a, d = scan () in - lwt _ = Krobot.Motors.turn krobot ~angle:(-(truncate a)) ~velocity ~acceleration in - lwt a, d = scan () in - lwt _ = Krobot.Motors.turn krobot ~angle:(truncate a) ~velocity ~acceleration in - lwt _ = Krobot.Motors.move krobot ~distance:(truncate d) ~velocity ~acceleration in - lwt _ = Krobot.Motors.move krobot ~distance:(-100) ~velocity ~acceleration in + lwt a, d = Krobot.Infrared.find krobot in + let alpha = a in + lwt _ = Krobot.Motors.turn krobot ~angle:a ~velocity ~acceleration in + lwt a, d = Krobot.Infrared.find krobot in + let alpha = alpha + a in + lwt _ = Krobot.Motors.turn krobot ~angle:a ~velocity ~acceleration in + lwt _ = Krobot.Motors.move krobot ~distance:(d - 100) ~velocity ~acceleration in lwt () = Krobot.Grip.down krobot in lwt () = Krobot.Grip.open_ krobot in - lwt _ = Krobot.Motors.move krobot ~distance:80 ~velocity ~acceleration in + lwt _ = Krobot.Motors.move krobot ~distance:100 ~velocity ~acceleration in lwt () = Krobot.Grip.close krobot in lwt () = try_lwt Krobot.Grip.up krobot >> Krobot.Grip.release krobot with _ -> return () - and _ = Krobot.Motors.move krobot ~distance:(-85) ~velocity ~acceleration in + and _ = Krobot.Motors.move krobot ~distance:(-(d + 100)) ~velocity ~acceleration in + lwt _ = Krobot.Motors.turn krobot ~angle:(-alpha) ~velocity ~acceleration in + ears := List.filter ((<>) ear) !ears; return state (* +-----------------------------------------------------------------+ @@ -291,4 +253,4 @@ lwt () = orientation = -90; position = if team = `Blue then a else r; } in - loop init 1 + loop init 2 diff --git a/info/control/clients/record_infrared.ml b/info/control/clients/record_infrared.ml index 0ae4da1..76ec6b0 100644 --- a/info/control/clients/record_infrared.ml +++ b/info/control/clients/record_infrared.ml @@ -12,7 +12,7 @@ open Lwt open Lwt_io -let step = 10 +let step = 1 let measure_infrareds krobot infrareds = let rec loop acc1 acc2 = function diff --git a/info/control/common/error.ml b/info/control/common/error.ml index 5bcb78c..a37dd43 100644 --- a/info/control/common/error.ml +++ b/info/control/common/error.ml @@ -8,8 +8,10 @@ *) exception Card_unavailable +exception No_ear_found let () = List.iter (fun (name, exn) -> OBus_error.register name exn) [ - "fr.krobot.CardUnavailable", Card_unavailable; + "fr.krobot.Error.CardUnavailable", Card_unavailable; + "fr.krobot.Error.NoEarFound", Card_unavailable; ] diff --git a/info/control/common/error.mli b/info/control/common/error.mli index b04e2b1..a741d30 100644 --- a/info/control/common/error.mli +++ b/info/control/common/error.mli @@ -11,3 +11,6 @@ exception Card_unavailable (** The card is currently not available *) + +exception No_ear_found + (** The infrared scanner found no ear in front of the robot *) diff --git a/info/control/driver/driver.ml b/info/control/driver/driver.ml index 09fcb87..cb940ca 100644 --- a/info/control/driver/driver.ml +++ b/info/control/driver/driver.ml @@ -608,6 +608,33 @@ struct in loop [] + let pi = 4.0 *. atan 1.0 + let sqr x = x *. x + + let find () = + lwt points = scan () in + let dist_min = List.fold_left (fun dist_min (angle, dist) -> + if dist >= 0 && dist <= 130 && dist < dist_min then + dist + else + dist_min) max_int points in + let points = List.filter (fun (a, d) -> d >= 0 && d <= 130 && d < dist_min + 10) points in + if dist_min = max_int then + OBus_error.fail Error.No_ear_found "no ear found in front of the robot" + else begin + let mean = float_of_int (List.fold_left (fun acc (a, d) -> acc + a) 0 points) /. float_of_int (List.length points) in + let alpha = mean /. 180.0 *. pi and c = float_of_int dist_min +. 60.0 +. 25.0 in + lwt () = Lwt_io.printlf "alpha = %f, c = %f" alpha c in + let x = -25.0 +. c *. sin alpha and y = 270.0 +. c *. cos alpha in + lwt () = Lwt_io.printlf "x = %f, y = %f" x y in + let dist = sqrt (sqr x +. sqr y) in + let beta = asin (x /. dist) *. 180. /. 3.14159265 in + lwt () = Lwt_io.printlf "beta = %f, dist = %f" beta dist in + let beta = -(truncate beta) and dist = truncate dist - 25 - 270 - 110 in + lwt () = Lwt_io.printlf "beta = %d, dist = %d" beta dist in + return (beta, dist) + end + let () = OBus_object.add_interfaces obus [make @@ -634,6 +661,11 @@ struct lwt result = scan () in OBus_method.return ctx result ); + m_Find = ( + fun ctx () () -> + lwt angle, distance = find () in + OBus_method.return ctx (Int32.of_int angle, Int32.of_int distance) + ); m_ReloadConfig = ( fun ctx () () -> lwt () = reload_config () in diff --git a/info/control/lib-krobot/krobot.ml b/info/control/lib-krobot/krobot.ml index d0543c5..40f6c32 100644 --- a/info/control/lib-krobot/krobot.ml +++ b/info/control/lib-krobot/krobot.ml @@ -56,7 +56,6 @@ let services_status krobot = srv_power = List.assoc "Power" l; }) (OBus_property.make - Krobot_interfaces.Fr_krobot_Manager.p_ServicesStatus (OBus_proxy.make krobot ["fr"; "krobot"; "Manager"])) @@ -89,6 +88,10 @@ struct lwt l = OBus_method.call m_Scan (service krobot "Infrared") () in return (List.rev_map (fun (x, y) -> (Int32.to_int x, Int32.to_int y)) l) + let find krobot = + lwt a, d = OBus_method.call m_Find (service krobot "Infrared") () in + return (Int32.to_int a, Int32.to_int d) + let reload_config krobot = OBus_method.call m_ReloadConfig (service krobot "Infrared") () end diff --git a/info/control/lib-krobot/krobot.mli b/info/control/lib-krobot/krobot.mli index aa0b023..baa2e94 100644 --- a/info/control/lib-krobot/krobot.mli +++ b/info/control/lib-krobot/krobot.mli @@ -57,6 +57,11 @@ module Infrared : sig (** Scans the front of the robot and returns a list of [(angle, distance)] *) + val find : t -> (int * int) Lwt.t + (** Scans the front of the robot and returns the angle to turn and + the distance to move in order to take an ear in front of the + robot *) + val reload_config : t -> unit Lwt.t (** Reload calirbatino data *) end diff --git a/info/control/protocol/krobot.obus b/info/control/protocol/krobot.obus index 2446015..bd82223 100644 --- a/info/control/protocol/krobot.obus +++ b/info/control/protocol/krobot.obus @@ -24,13 +24,25 @@ interface fr.krobot.Service.Infrared { method GoRight : () -> () method GoCenter : () -> () - method Scan : () -> (values : (int32 * int32) structure array) + method Scan : () -> (values : (int32, int32) dict) + (** Scan the front of the robot and returns the distances measured + for each angle. *) + + method Find : () -> (angle : int32, distance : int32) + (** Scan the front the robot, and returns: + + - the angle the robot must turn to take the ear + - the distance the robot must move to take the ear + + It raises "fr.krobot.Error.NoEartFound" if no ear + is found at the front of the robot. *) + method ReloadConfig : () -> () } -interface fr.krobot.Service.Gate { - method Enable : () -> () - (** Enable the motor of the gate *) + interface fr.krobot.Service.Gate { + method Enable : () -> () + (** Enable the motor of the gate *) method Disable : () -> () (** Disable the motor of the gate *) diff --git a/info/control/tests/take_ear_with_infrared.ml b/info/control/tests/take_ear_with_infrared.ml index 6a48e1f..c048e83 100644 --- a/info/control/tests/take_ear_with_infrared.ml +++ b/info/control/tests/take_ear_with_infrared.ml @@ -10,6 +10,7 @@ (* Scan the front of the robot to find an ear, then take it *) open Lwt +open Krobot_move let pi = 4.0 *. atan 1.0 let sqr x = x *. x @@ -17,6 +18,13 @@ let sqr x = x *. x let pos_90_degree = 515 let pos_0_degree = 205 +let pause () = + Lwt_term.read_key () >>= function + | Lwt_term.Key "q" -> + exit 0 + | _ -> + return () + lwt () = lwt krobot = Krobot.create () in let prout () = @@ -40,36 +48,37 @@ lwt () = let mean = float_of_int (List.fold_left (fun acc (a, d) -> acc + a) 0 pts) /. float_of_int (List.length pts) in lwt () = Lwt_io.printlf "ears found at angle = %f, distance = %d" mean dist_min in lwt () = Krobot.unsafe_call Commands.AX12.goto krobot (1, pos_90_degree - (truncate mean * (pos_90_degree - pos_0_degree) / 90), 0, `Now) in - let alpha = mean /. 180.0 *. pi and d = float_of_int dist_min +. 60.0 +. 25.0 in - let a = d *. cos alpha +. 270.0 and b = d *. sin alpha in - let b = - if b < -25.0 then - b -. 25.0 - else if b <= 0.0 && b >= -25.0 then - 25.0 -. b - else - b +. 25.0 - in - let beta = atan(b /. a) in - let c = sqrt (sqr a +. sqr b) in - let e = c -. 270.0 -. 110.0 in - let beta = beta /. pi *. 180.0 in - lwt () = Lwt_io.printlf "a = %f, b = %f, c = %f" a b c in - lwt () = Lwt_io.printlf "turn: %f, move: %f" beta e in - return (beta, e) + let alpha = mean /. 180.0 *. pi and c = float_of_int dist_min +. 60.0 +. 25.0 in + lwt () = Lwt_io.printlf "alpha = %f, c = %f" alpha c in + let x = -25.0 +. c *. sin alpha and y = 270.0 +. c *. cos alpha in + lwt () = Lwt_io.printlf "x = %f, y = %f" x y in + let dist = sqrt (sqr x +. sqr y) in + let beta = asin (x /. dist) *. 180. /. 3.14159265 in + lwt () = Lwt_io.printlf "beta = %f, dist = %f" beta dist in + let beta = -(truncate beta) and dist = truncate dist - 25 - 270 - 110 in + lwt () = Lwt_io.printlf "beta = %d, dist = %d" beta dist in + return (beta, dist) end in lwt a, d = prout () in - let velocity = 400 and acceleration = 800 in - lwt _ = Krobot.Motors.turn krobot ~angle:(-(truncate a)) ~velocity ~acceleration in + lwt () = pause () in + let velocity = 100 and acceleration = 800 in + lwt _ = Krobot.Motors.turn krobot ~angle:a ~velocity ~acceleration in + lwt () = pause () in lwt a, d = prout () in - lwt _ = Krobot.Motors.turn krobot ~angle:(truncate a) ~velocity ~acceleration in - lwt _ = Krobot.Motors.move krobot ~distance:(truncate d) ~velocity ~acceleration in - lwt _ = Krobot.Motors.move krobot ~distance:(-100) ~velocity ~acceleration in + lwt () = pause () in + lwt _ = Krobot.Motors.turn krobot ~angle:a ~velocity ~acceleration in + lwt () = pause () in + lwt _ = Krobot.Motors.move krobot ~distance:(d - 100) ~velocity ~acceleration in + lwt () = pause () in lwt () = Krobot.Grip.down krobot in + lwt () = pause () in lwt () = Krobot.Grip.open_ krobot in - lwt _ = Krobot.Motors.move krobot ~distance:80 ~velocity ~acceleration in + lwt () = pause () in + lwt _ = Krobot.Motors.move krobot ~distance:100 ~velocity ~acceleration in + lwt () = pause () in lwt () = Krobot.Grip.close krobot in + lwt () = pause () in lwt _ = Krobot.Grip.up krobot in return () hooks/post-receive -- krobot |
From: Xavier L. <Ba...@us...> - 2010-05-22 13:19:12
|
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 f775e431796cbf2718c9c9128347b21f172ea159 (commit) from 247835b690cefcfe64fa7296ff1233aed7af2a77 (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 f775e431796cbf2718c9c9128347b21f172ea159 Author: Xavier Lagorce <Xav...@cr...> Date: Sat May 22 15:18:36 2010 +0200 Added Firmware for US Rangefinders base on PSoC ----------------------------------------------------------------------- Changes: diff --git a/elec/boards/Sensor_USRangeFinder/Firmware/.gitignore b/elec/boards/Sensor_USRangeFinder/Firmware/.gitignore new file mode 100644 index 0000000..40b6267 --- /dev/null +++ b/elec/boards/Sensor_USRangeFinder/Firmware/.gitignore @@ -0,0 +1,3 @@ +backup/ +output/ +obj/ diff --git a/elec/boards/Sensor_USRangeFinder/Firmware/teleUScms.app b/elec/boards/Sensor_USRangeFinder/Firmware/teleUScms.app new file mode 100644 index 0000000..1734922 --- /dev/null +++ b/elec/boards/Sensor_USRangeFinder/Firmware/teleUScms.app @@ -0,0 +1,5 @@ +<PSOC_DB> + <PSOC_PROJECT_LIST> + <PSOC_PROJECT PATH="\teleUScms\teleUScms.cmx" IS_ACTIVE="TRUE" /> + </PSOC_PROJECT_LIST> +</PSOC_DB> \ No newline at end of file diff --git a/elec/boards/Sensor_USRangeFinder/Firmware/teleUScms/VarOffset.xml b/elec/boards/Sensor_USRangeFinder/Firmware/teleUScms/VarOffset.xml new file mode 100644 index 0000000..9194de8 --- /dev/null +++ b/elec/boards/Sensor_USRangeFinder/Firmware/teleUScms/VarOffset.xml @@ -0,0 +1,3 @@ +<CMX_DB> +<CMX_VARIABLE_OFFSET_LIST TOTAL_VARIABLE_SIZE="0" RW_VARIABLE_SIZE="0"/> +</CMX_DB> diff --git a/elec/boards/Sensor_USRangeFinder/Firmware/teleUScms/teleUScms.cmx b/elec/boards/Sensor_USRangeFinder/Firmware/teleUScms/teleUScms.cmx new file mode 100644 index 0000000..1ab7f41 --- /dev/null +++ b/elec/boards/Sensor_USRangeFinder/Firmware/teleUScms/teleUScms.cmx @@ -0,0 +1,19 @@ +<CMX_DB> + <CMX_PROJECT NAME="teleUScms" LEGACY_PSOC_PROJECT="TRUE" VERSION="5.0.1127.0" VENDOR="" AUTOASSIGN_PINS="" HYBRID_PROJECT="FALSE" LEGACY_CHIP_NAME="CY8C29466"> + <BASEPROJ_FILE_PATH PATH="CY8C29466" BASEPROJ_PSOC_PART="" BASEPROJ_BASE_DEVICE=""/> + <CMX_MAKER_APPLICATION NAME="Fan Controller"/> + <CMX_CONSTANT_LIST/> + <CMX_IO_DRIVER_LIST/><CMX_VARIABLE_LIST/><CMX_VARIABLE_CONTAINER_LIST/><CMX_PROJECT_PROPERTY_LIST/><CMX_PROJECT_HIDDEN_PROPERTY_LIST/><CMX_DRAW_LIST/> + <CMX_PIN_ASSIGNMENT_LIST/> + <CMX_UM_SPEC_LIST/> + <CMX_CHANNEL_INSTANCE_RESOURCE_LIST></CMX_CHANNEL_INSTANCE_RESOURCE_LIST><CMX_PROJECT_STATE_LIST CURRENT_PROJECT_STATE="6"> + <CMX_PROJECT_STATE PROJECT_STATE="0" CPU_TIME="1271332199"/> + <CMX_PROJECT_STATE PROJECT_STATE="1" CPU_TIME="1271332199"/> + <CMX_PROJECT_STATE PROJECT_STATE="2" CPU_TIME="1271332199"/> + <CMX_PROJECT_STATE PROJECT_STATE="3" CPU_TIME="1271332199"/> + <CMX_PROJECT_STATE PROJECT_STATE="4" CPU_TIME="1273063430"/> + <CMX_PROJECT_STATE PROJECT_STATE="5" CPU_TIME="1273765687"/> + <CMX_PROJECT_STATE PROJECT_STATE="6" CPU_TIME="1273765750"/> + <CMX_PROJECT_STATE PROJECT_STATE="7" CPU_TIME="0"/> + </CMX_PROJECT_STATE_LIST></CMX_PROJECT> +</CMX_DB> diff --git a/elec/boards/Sensor_USRangeFinder/Firmware/teleUScms/teleUScms.pep b/elec/boards/Sensor_USRangeFinder/Firmware/teleUScms/teleUScms.pep new file mode 100644 index 0000000..81b9fbb --- /dev/null +++ b/elec/boards/Sensor_USRangeFinder/Firmware/teleUScms/teleUScms.pep @@ -0,0 +1,82 @@ +<?xml version="1.0"?> +<PSOC_WND_PERSIST> + <APP_EDITOR_SETTINGS> + <OPEN_FILE PATH="C:\Documents and Settings\XL\My Documents\PSoC Designer 5.0 Projects\teleUS\teleUScms\teleUScms\teleUScms.soc" ACTIVE="true" /> + <OPEN_FILE PATH="C:\Documents and Settings\XL\My Documents\PSoC Designer 5.0 Projects\teleUS\teleUScms\teleUScms.cmx" /> + </APP_EDITOR_SETTINGS> + <DEBUGGER_SETTINGS> + <TRACE_MODE VALUE="PCOnly" /> + <EVENT NUMBER="0" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="1" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="2" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="3" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="4" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="5" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="6" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="7" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="8" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="9" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="10" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="11" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="12" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="13" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="14" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="15" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="16" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="17" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="18" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="19" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="20" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="21" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="22" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="23" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="24" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="25" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="26" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="27" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="28" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="29" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="30" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="31" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="32" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="33" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="34" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="35" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="36" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="37" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="38" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="39" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="40" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="41" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="42" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="43" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="44" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="45" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="46" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="47" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="48" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="49" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="50" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="51" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="52" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="53" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="54" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="55" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="56" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="57" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="58" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="59" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="60" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="61" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="62" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <EVENT NUMBER="63" THREAD8="Disabled" THREAD16="Disabled" LOGIC="Disabled" /> + <GLOBAL_EVENT_CONTROL THREAD8="8 Bit Thread - Active" THREAD16="16 Bit Thread - Active" LOGIC="State Logic - Active" /> + <MEMWIN_TABGROUP SPLIT="Horizontal"> + <VIEW BANK="RAM" TITLE="RAM" COLUMNS="8" /> + <VIEW BANK="FLASH" TITLE="FLASH" COLUMNS="8" /> + <VIEW BANK="IO Bank 0" TITLE="IO Bank 0" COLUMNS="1" /> + <VIEW BANK="IO Bank 1" TITLE="IO Bank 1" COLUMNS="1" /> + </MEMWIN_TABGROUP> + </DEBUGGER_SETTINGS> + <WINDOWPARAMS SCALE_AND_TRANS="0,0,1" /> +</PSOC_WND_PERSIST> \ No newline at end of file diff --git a/elec/boards/Sensor_USRangeFinder/Firmware/teleUScms/teleUScms/BuildMsg.txt b/elec/boards/Sensor_USRangeFinder/Firmware/teleUScms/teleUScms/BuildMsg.txt new file mode 100644 index 0000000..38f96a3 --- /dev/null +++ b/elec/boards/Sensor_USRangeFinder/Firmware/teleUScms/teleUScms/BuildMsg.txt @@ -0,0 +1,39 @@ +Starting MAKE... +creating project.mk +lib/bufcomp.asm +lib/bufcompint.asm +lib/comp.asm +lib/compteur.asm +lib/compteurint.asm +lib/declencheur.asm +lib/declencheurint.asm +lib/filtre1.asm +lib/filtre2.asm +lib/i2chwcommon.asm +lib/i2chwint.asm +lib/i2chwrsrcinits.asm +lib/inverseur.asm +lib/inverseurint.asm +lib/pga_1.asm +lib/pga_2.asm +lib/pga_3.asm +lib/porteuse.asm +lib/porteuseint.asm +lib/psocconfig.asm +lib/psocconfigtbl.asm +lib/tempsmort.asm +lib/tempsmortint.asm +./boot.asm +./delay.asm +./main.c +Linking.. +LMM info: area 'InterruptRAM' uses 8 bytes in SRAM bank 0 +LMM info: area 'virtual_registers' uses 15 bytes in SRAM page 0 +LMM info: area 'data' item of 2 bytes allocated in SRAM page 0 +LMM info: area 'data' item of 1 bytes allocated in SRAM page 0 +LMM info: area 'data' item of 1 bytes allocated in SRAM page 0 + ROM 11% full. 3302 out of 32768 bytes used (does not include absolute areas). + RAM 2% full. 27 bytes used (does not include stack usage). +idata dump at output/teleUScms.idata + +teleUScms - 0 error(s) 0 warning(s) 17:49:10 diff --git a/elec/boards/Sensor_USRangeFinder/Firmware/teleUScms/teleUScms/PSoCConfig.xml b/elec/boards/Sensor_USRangeFinder/Firmware/teleUScms/teleUScms/PSoCConfig.xml new file mode 100644 index 0000000..39e5374 --- /dev/null +++ b/elec/boards/Sensor_USRangeFinder/Firmware/teleUScms/teleUScms/PSoCConfig.xml @@ -0,0 +1,1688 @@ +<PSOC_DEVICE_DB> + <PSOC_CONFIG_LIST> + <PSOC_CONFIG NAME="teleuscms" BASE_DEVICE="CY8C29466" SOURCE_GEN_TIME="1273765681" CONFIG_SAVE_TIME="1273765681" CONFIG_SAVE_DATE="Thu May 13 17:48:01 2010 +" VERSION="4.0" DESCRIPTION="" PACKAGE_TYPE="PDIP" PACKAGE_SHAPE="2" LOOP_CONFIG_INIT="Enable" UM_INT_GEN_CONTROL="Disable" CONFIG_NAME_PREPEND="Enable" DESIGN_VERSION="" DOC_FILENAME="" DEVICE_DISPLAY_NAME="CY8C29466-24SXI" PSOC_EXPRESS_PROJECT="FALSE"> + <DESIGN_FILE_LIST/> + <USER_MODULE_LIST> + <USER_MODULE NAME="I2CHW" INSTANCE_NAME="I2CHW" VERSION="1.6"> + <SHAPE SHAPE_TYPE="BLOCKLIST" COLOR_INDEX="0" NAME="I2CHWSlave"> + <RESOURCE_LIST> + <RESOURCE NAME="I2C" TYPE="I2C_CONTROLLER" DEVICE_RESOURCE_NAME="I2CController"/> + </RESOURCE_LIST> + </SHAPE> + <PARAMETER_LIST> + <PARAMETER NAME="ADDR_REG_PRESENT" VALUE="No"/> + <PARAMETER NAME="Active Distance Threshold X" VALUE=""/> + <PARAMETER NAME="Active Distance Threshold Y" VALUE=""/> + <PARAMETER NAME="Auto_Addr_Check" VALUE="Disable"/> + <PARAMETER NAME="BaselineUpdateThreshold" VALUE=""/> + <PARAMETER NAME="Button FingerThreshold" VALUE=""/> + <PARAMETER NAME="CPU_Clk_speed_(CY8C27xA)" VALUE="NOT CY8C27xA"/> + <PARAMETER NAME="Centroid" VALUE=""/> + <PARAMETER NAME="Communication_Service_Type" VALUE="Interrupt"/> + <PARAMETER NAME="DeadTime" VALUE=""/> + <PARAMETER NAME="Debounce" VALUE=""/> + <PARAMETER NAME="Debounce MT Pan Count" VALUE=""/> + <PARAMETER NAME="Debounce MT Pan to Zoom Count" VALUE=""/> + <PARAMETER NAME="Debounce MT Zoom Count" VALUE=""/> + <PARAMETER NAME="Debounce ST Pan Count" VALUE=""/> + <PARAMETER NAME="Feedback Resistor Pin" VALUE=""/> + <PARAMETER NAME="FingerThreshold" VALUE=""/> + <PARAMETER NAME="Gain-Offset Compensation" VALUE=""/> + <PARAMETER NAME="Hysteresis" VALUE=""/> + <PARAMETER NAME="I2C Clock" VALUE="100K Standard"/> + <PARAMETER NAME="I2C Pin" VALUE="P[1]5-P[1]7"/> + <PARAMETER NAME="IntDispatchMode" VALUE="ActiveStatus"/> + <PARAMETER NAME="Integration Cycles" VALUE=""/> + <PARAMETER NAME="LowBaselineReset" VALUE=""/> + <PARAMETER NAME="MT Finger Settling Count" VALUE=""/> + <PARAMETER NAME="MT Gesture Timeout Msec" VALUE=""/> + <PARAMETER NAME="MT Max Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="MT Min Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="Maximum Centroid Count" VALUE=""/> + <PARAMETER NAME="Modulator Capacitor Pin" VALUE=""/> + <PARAMETER NAME="NegativeNoiseThreshold" VALUE=""/> + <PARAMETER NAME="NoiseThreshold" VALUE=""/> + <PARAMETER NAME="On-Chip Centroid" VALUE=""/> + <PARAMETER NAME="Prescaler Period" VALUE=""/> + <PARAMETER NAME="RawData IIR Filter" VALUE=""/> + <PARAMETER NAME="RawData IIR Filter Coeff" VALUE=""/> + <PARAMETER NAME="RawData Jitter Filter" VALUE=""/> + <PARAMETER NAME="RawData Median Filter" VALUE=""/> + <PARAMETER NAME="Read_Buffer_Types" VALUE="RAM ONLY"/> + <PARAMETER NAME="Ref Value" VALUE=""/> + <PARAMETER NAME="Reference" VALUE=""/> + <PARAMETER NAME="Resolution" VALUE=""/> + <PARAMETER NAME="Rotate Debounce Limit" VALUE=""/> + <PARAMETER NAME="ST Click X Radius PX" VALUE=""/> + <PARAMETER NAME="ST Click Y Radius PX" VALUE=""/> + <PARAMETER NAME="ST Max Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="ST Max DblClick Radius PX" VALUE=""/> + <PARAMETER NAME="ST Max DblClick Timeout Msec" VALUE=""/> + <PARAMETER NAME="ST Min Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="ST Min DblClick Timeout Msec" VALUE=""/> + <PARAMETER NAME="Scanning Speed" VALUE=""/> + <PARAMETER NAME="Sensors Autoreset" VALUE=""/> + <PARAMETER NAME="ShieldElectrodeOut" VALUE=""/> + <PARAMETER NAME="Slave_Addr" VALUE="5"/> + <PARAMETER NAME="Tuner" VALUE=""/> + <PARAMETER NAME="USED_I2C_BLOCK" VALUE="I2CController_0"/> + <PARAMETER NAME="WOT FingerThreshold" VALUE=""/> + <PARAMETER NAME="XY IIR Filter" VALUE=""/> + <PARAMETER NAME="XY IIR Filter Coeff" VALUE=""/> + <PARAMETER NAME="XY Jitter Filter" VALUE=""/> + <PARAMETER NAME="Zoom Active Distance Threshold X" VALUE=""/> + <PARAMETER NAME="Zoom Active Distance Threshold Y" VALUE=""/> + <PARAMETER NAME="iDAC Range" VALUE=""/> + </PARAMETER_LIST> + </USER_MODULE> + <USER_MODULE NAME="PGA" INSTANCE_NAME="PGA_1" VERSION="3.2"> + <SHAPE SHAPE_TYPE="BLOCKLIST" COLOR_INDEX="4" NAME="PGA27"> + <BLOCK_LIST> + <BLOCK NAME="GAIN" TYPE="ANALOG_CT" LOCATION="0 0"> + <REGISTER_LIST> + <REGISTER NAME="CR0" ADDR="71" VALUE="fe" DATASHEET_NAME="ACB00CR0"/> + <REGISTER NAME="CR1" ADDR="72" VALUE="a1" DATASHEET_NAME="ACB00CR1"/> + <REGISTER NAME="CR2" ADDR="73" VALUE="20" DATASHEET_NAME="ACB00CR2"/> + <REGISTER NAME="CR3" ADDR="70" VALUE="0" DATASHEET_NAME="ACB00CR3"/> + </REGISTER_LIST> + <INPUT_LIST/> + </BLOCK> + </BLOCK_LIST> + <RESOURCE_LIST/> + </SHAPE> + <PARAMETER_LIST> + <PARAMETER NAME="Active Distance Threshold X" VALUE=""/> + <PARAMETER NAME="Active Distance Threshold Y" VALUE=""/> + <PARAMETER NAME="AnalogBus" VALUE="AnalogOutBus_0"/> + <PARAMETER NAME="BaselineUpdateThreshold" VALUE=""/> + <PARAMETER NAME="Button FingerThreshold" VALUE=""/> + <PARAMETER NAME="Centroid" VALUE=""/> + <PARAMETER NAME="DeadTime" VALUE=""/> + <PARAMETER NAME="Debounce" VALUE=""/> + <PARAMETER NAME="Debounce MT Pan Count" VALUE=""/> + <PARAMETER NAME="Debounce MT Pan to Zoom Count" VALUE=""/> + <PARAMETER NAME="Debounce MT Zoom Count" VALUE=""/> + <PARAMETER NAME="Debounce ST Pan Count" VALUE=""/> + <PARAMETER NAME="Feedback Resistor Pin" VALUE=""/> + <PARAMETER NAME="FingerThreshold" VALUE=""/> + <PARAMETER NAME="Gain" VALUE="1.000"/> + <PARAMETER NAME="Gain-Offset Compensation" VALUE=""/> + <PARAMETER NAME="Hysteresis" VALUE=""/> + <PARAMETER NAME="Input" VALUE="AnalogColumn_InputMUX_0"/> + <PARAMETER NAME="Integration Cycles" VALUE=""/> + <PARAMETER NAME="LowBaselineReset" VALUE=""/> + <PARAMETER NAME="MT Finger Settling Count" VALUE=""/> + <PARAMETER NAME="MT Gesture Timeout Msec" VALUE=""/> + <PARAMETER NAME="MT Max Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="MT Min Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="Maximum Centroid Count" VALUE=""/> + <PARAMETER NAME="Modulator Capacitor Pin" VALUE=""/> + <PARAMETER NAME="NegativeNoiseThreshold" VALUE=""/> + <PARAMETER NAME="NoiseThreshold" VALUE=""/> + <PARAMETER NAME="On-Chip Centroid" VALUE=""/> + <PARAMETER NAME="Prescaler Period" VALUE=""/> + <PARAMETER NAME="RawData IIR Filter" VALUE=""/> + <PARAMETER NAME="RawData IIR Filter Coeff" VALUE=""/> + <PARAMETER NAME="RawData Jitter Filter" VALUE=""/> + <PARAMETER NAME="RawData Median Filter" VALUE=""/> + <PARAMETER NAME="Ref Value" VALUE=""/> + <PARAMETER NAME="Reference" VALUE="VSS"/> + <PARAMETER NAME="Resolution" VALUE=""/> + <PARAMETER NAME="Rotate Debounce Limit" VALUE=""/> + <PARAMETER NAME="ST Click X Radius PX" VALUE=""/> + <PARAMETER NAME="ST Click Y Radius PX" VALUE=""/> + <PARAMETER NAME="ST Max Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="ST Max DblClick Radius PX" VALUE=""/> + <PARAMETER NAME="ST Max DblClick Timeout Msec" VALUE=""/> + <PARAMETER NAME="ST Min Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="ST Min DblClick Timeout Msec" VALUE=""/> + <PARAMETER NAME="Scanning Speed" VALUE=""/> + <PARAMETER NAME="Sensors Autoreset" VALUE=""/> + <PARAMETER NAME="ShieldElectrodeOut" VALUE=""/> + <PARAMETER NAME="Tuner" VALUE=""/> + <PARAMETER NAME="WOT FingerThreshold" VALUE=""/> + <PARAMETER NAME="XY IIR Filter" VALUE=""/> + <PARAMETER NAME="XY IIR Filter Coeff" VALUE=""/> + <PARAMETER NAME="XY Jitter Filter" VALUE=""/> + <PARAMETER NAME="Zoom Active Distance Threshold X" VALUE=""/> + <PARAMETER NAME="Zoom Active Distance Threshold Y" VALUE=""/> + <PARAMETER NAME="iDAC Range" VALUE=""/> + </PARAMETER_LIST> + </USER_MODULE> + <USER_MODULE NAME="PGA" INSTANCE_NAME="PGA_2" VERSION="3.2"> + <SHAPE SHAPE_TYPE="BLOCKLIST" COLOR_INDEX="5" NAME="PGA27"> + <BLOCK_LIST> + <BLOCK NAME="GAIN" TYPE="ANALOG_CT" LOCATION="0 1"> + <REGISTER_LIST> + <REGISTER NAME="CR0" ADDR="75" VALUE="3d" DATASHEET_NAME="ACB01CR0"/> + <REGISTER NAME="CR1" ADDR="76" VALUE="a5" DATASHEET_NAME="ACB01CR1"/> + <REGISTER NAME="CR2" ADDR="77" VALUE="20" DATASHEET_NAME="ACB01CR2"/> + <REGISTER NAME="CR3" ADDR="74" VALUE="0" DATASHEET_NAME="ACB01CR3"/> + </REGISTER_LIST> + <INPUT_LIST/> + </BLOCK> + </BLOCK_LIST> + <RESOURCE_LIST/> + </SHAPE> + <PARAMETER_LIST> + <PARAMETER NAME="Active Distance Threshold X" VALUE=""/> + <PARAMETER NAME="Active Distance Threshold Y" VALUE=""/> + <PARAMETER NAME="AnalogBus" VALUE="AnalogOutBus_1"/> + <PARAMETER NAME="BaselineUpdateThreshold" VALUE=""/> + <PARAMETER NAME="Button FingerThreshold" VALUE=""/> + <PARAMETER NAME="Centroid" VALUE=""/> + <PARAMETER NAME="DeadTime" VALUE=""/> + <PARAMETER NAME="Debounce" VALUE=""/> + <PARAMETER NAME="Debounce MT Pan Count" VALUE=""/> + <PARAMETER NAME="Debounce MT Pan to Zoom Count" VALUE=""/> + <PARAMETER NAME="Debounce MT Zoom Count" VALUE=""/> + <PARAMETER NAME="Debounce ST Pan Count" VALUE=""/> + <PARAMETER NAME="Feedback Resistor Pin" VALUE=""/> + <PARAMETER NAME="FingerThreshold" VALUE=""/> + <PARAMETER NAME="Gain" VALUE="4.000"/> + <PARAMETER NAME="Gain-Offset Compensation" VALUE=""/> + <PARAMETER NAME="Hysteresis" VALUE=""/> + <PARAMETER NAME="Input" VALUE="ASC10"/> + <PARAMETER NAME="Integration Cycles" VALUE=""/> + <PARAMETER NAME="LowBaselineReset" VALUE=""/> + <PARAMETER NAME="MT Finger Settling Count" VALUE=""/> + <PARAMETER NAME="MT Gesture Timeout Msec" VALUE=""/> + <PARAMETER NAME="MT Max Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="MT Min Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="Maximum Centroid Count" VALUE=""/> + <PARAMETER NAME="Modulator Capacitor Pin" VALUE=""/> + <PARAMETER NAME="NegativeNoiseThreshold" VALUE=""/> + <PARAMETER NAME="NoiseThreshold" VALUE=""/> + <PARAMETER NAME="On-Chip Centroid" VALUE=""/> + <PARAMETER NAME="Prescaler Period" VALUE=""/> + <PARAMETER NAME="RawData IIR Filter" VALUE=""/> + <PARAMETER NAME="RawData IIR Filter Coeff" VALUE=""/> + <PARAMETER NAME="RawData Jitter Filter" VALUE=""/> + <PARAMETER NAME="RawData Median Filter" VALUE=""/> + <PARAMETER NAME="Ref Value" VALUE=""/> + <PARAMETER NAME="Reference" VALUE="AGND"/> + <PARAMETER NAME="Resolution" VALUE=""/> + <PARAMETER NAME="Rotate Debounce Limit" VALUE=""/> + <PARAMETER NAME="ST Click X Radius PX" VALUE=""/> + <PARAMETER NAME="ST Click Y Radius PX" VALUE=""/> + <PARAMETER NAME="ST Max Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="ST Max DblClick Radius PX" VALUE=""/> + <PARAMETER NAME="ST Max DblClick Timeout Msec" VALUE=""/> + <PARAMETER NAME="ST Min Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="ST Min DblClick Timeout Msec" VALUE=""/> + <PARAMETER NAME="Scanning Speed" VALUE=""/> + <PARAMETER NAME="Sensors Autoreset" VALUE=""/> + <PARAMETER NAME="ShieldElectrodeOut" VALUE=""/> + <PARAMETER NAME="Tuner" VALUE=""/> + <PARAMETER NAME="WOT FingerThreshold" VALUE=""/> + <PARAMETER NAME="XY IIR Filter" VALUE=""/> + <PARAMETER NAME="XY IIR Filter Coeff" VALUE=""/> + <PARAMETER NAME="XY Jitter Filter" VALUE=""/> + <PARAMETER NAME="Zoom Active Distance Threshold X" VALUE=""/> + <PARAMETER NAME="Zoom Active Distance Threshold Y" VALUE=""/> + <PARAMETER NAME="iDAC Range" VALUE=""/> + </PARAMETER_LIST> + </USER_MODULE> + <USER_MODULE NAME="PGA" INSTANCE_NAME="PGA_3" VERSION="3.2"> + <SHAPE SHAPE_TYPE="BLOCKLIST" COLOR_INDEX="6" NAME="PGA27"> + <BLOCK_LIST> + <BLOCK NAME="GAIN" TYPE="ANALOG_CT" LOCATION="0 2"> + <REGISTER_LIST> + <REGISTER NAME="CR0" ADDR="79" VALUE="1d" DATASHEET_NAME="ACB02CR0"/> + <REGISTER NAME="CR1" ADDR="7a" VALUE="20" DATASHEET_NAME="ACB02CR1"/> + <REGISTER NAME="CR2" ADDR="7b" VALUE="20" DATASHEET_NAME="ACB02CR2"/> + <REGISTER NAME="CR3" ADDR="78" VALUE="0" DATASHEET_NAME="ACB02CR3"/> + </REGISTER_LIST> + <INPUT_LIST/> + </BLOCK> + </BLOCK_LIST> + <RESOURCE_LIST/> + </SHAPE> + <PARAMETER_LIST> + <PARAMETER NAME="Active Distance Threshold X" VALUE=""/> + <PARAMETER NAME="Active Distance Threshold Y" VALUE=""/> + <PARAMETER NAME="AnalogBus" VALUE="Disable"/> + <PARAMETER NAME="BaselineUpdateThreshold" VALUE=""/> + <PARAMETER NAME="Button FingerThreshold" VALUE=""/> + <PARAMETER NAME="Centroid" VALUE=""/> + <PARAMETER NAME="DeadTime" VALUE=""/> + <PARAMETER NAME="Debounce" VALUE=""/> + <PARAMETER NAME="Debounce MT Pan Count" VALUE=""/> + <PARAMETER NAME="Debounce MT Pan to Zoom Count" VALUE=""/> + <PARAMETER NAME="Debounce MT Zoom Count" VALUE=""/> + <PARAMETER NAME="Debounce ST Pan Count" VALUE=""/> + <PARAMETER NAME="Feedback Resistor Pin" VALUE=""/> + <PARAMETER NAME="FingerThreshold" VALUE=""/> + <PARAMETER NAME="Gain" VALUE="8.000"/> + <PARAMETER NAME="Gain-Offset Compensation" VALUE=""/> + <PARAMETER NAME="Hysteresis" VALUE=""/> + <PARAMETER NAME="Input" VALUE="ACB01"/> + <PARAMETER NAME="Integration Cycles" VALUE=""/> + <PARAMETER NAME="LowBaselineReset" VALUE=""/> + <PARAMETER NAME="MT Finger Settling Count" VALUE=""/> + <PARAMETER NAME="MT Gesture Timeout Msec" VALUE=""/> + <PARAMETER NAME="MT Max Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="MT Min Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="Maximum Centroid Count" VALUE=""/> + <PARAMETER NAME="Modulator Capacitor Pin" VALUE=""/> + <PARAMETER NAME="NegativeNoiseThreshold" VALUE=""/> + <PARAMETER NAME="NoiseThreshold" VALUE=""/> + <PARAMETER NAME="On-Chip Centroid" VALUE=""/> + <PARAMETER NAME="Prescaler Period" VALUE=""/> + <PARAMETER NAME="RawData IIR Filter" VALUE=""/> + <PARAMETER NAME="RawData IIR Filter Coeff" VALUE=""/> + <PARAMETER NAME="RawData Jitter Filter" VALUE=""/> + <PARAMETER NAME="RawData Median Filter" VALUE=""/> + <PARAMETER NAME="Ref Value" VALUE=""/> + <PARAMETER NAME="Reference" VALUE="AGND"/> + <PARAMETER NAME="Resolution" VALUE=""/> + <PARAMETER NAME="Rotate Debounce Limit" VALUE=""/> + <PARAMETER NAME="ST Click X Radius PX" VALUE=""/> + <PARAMETER NAME="ST Click Y Radius PX" VALUE=""/> + <PARAMETER NAME="ST Max Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="ST Max DblClick Radius PX" VALUE=""/> + <PARAMETER NAME="ST Max DblClick Timeout Msec" VALUE=""/> + <PARAMETER NAME="ST Min Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="ST Min DblClick Timeout Msec" VALUE=""/> + <PARAMETER NAME="Scanning Speed" VALUE=""/> + <PARAMETER NAME="Sensors Autoreset" VALUE=""/> + <PARAMETER NAME="ShieldElectrodeOut" VALUE=""/> + <PARAMETER NAME="Tuner" VALUE=""/> + <PARAMETER NAME="WOT FingerThreshold" VALUE=""/> + <PARAMETER NAME="XY IIR Filter" VALUE=""/> + <PARAMETER NAME="XY IIR Filter Coeff" VALUE=""/> + <PARAMETER NAME="XY Jitter Filter" VALUE=""/> + <PARAMETER NAME="Zoom Active Distance Threshold X" VALUE=""/> + <PARAMETER NAME="Zoom Active Distance Threshold Y" VALUE=""/> + <PARAMETER NAME="iDAC Range" VALUE=""/> + </PARAMETER_LIST> + </USER_MODULE> + <USER_MODULE NAME="DigBuf" INSTANCE_NAME="bufComp" VERSION="1.3"> + <SHAPE SHAPE_TYPE="BLOCKLIST" COLOR_INDEX="0" NAME="DigBuf27"> + <BLOCK_LIST> + <BLOCK NAME="DigBuf" TYPE="DIGITAL" LOCATION="11"> + <REGISTER_LIST> + <REGISTER NAME="CONTROL_0" ADDR="4f" VALUE="3" DATASHEET_NAME="DCB23CR0"/> + <REGISTER NAME="DATA_0" ADDR="4c" VALUE="0" DATASHEET_NAME="DCB23DR0"/> + <REGISTER NAME="DATA_1" ADDR="4d" VALUE="0" DATASHEET_NAME="DCB23DR1"/> + <REGISTER NAME="DATA_2" ADDR="4e" VALUE="0" DATASHEET_NAME="DCB23DR2"/> + <REGISTER NAME="DIG_BasicFunction" ADDR="14c" VALUE="22" DATASHEET_NAME="DCB23FN"/> + <REGISTER NAME="DIG_Input" ADDR="14d" VALUE="70" DATASHEET_NAME="DCB23IN"/> + <REGISTER NAME="DIG_Output" ADDR="14e" VALUE="0" DATASHEET_NAME="DCB23OU"/> + </REGISTER_LIST> + <INPUT_LIST/> + </BLOCK> + </BLOCK_LIST> + <RESOURCE_LIST/> + </SHAPE> + <PARAMETER_LIST> + <PARAMETER NAME="Active Distance Threshold X" VALUE=""/> + <PARAMETER NAME="Active Distance Threshold Y" VALUE=""/> + <PARAMETER NAME="BaselineUpdateThreshold" VALUE=""/> + <PARAMETER NAME="Button FingerThreshold" VALUE=""/> + <PARAMETER NAME="Centroid" VALUE=""/> + <PARAMETER NAME="DeadTime" VALUE=""/> + <PARAMETER NAME="Debounce" VALUE=""/> + <PARAMETER NAME="Debounce MT Pan Count" VALUE=""/> + <PARAMETER NAME="Debounce MT Pan to Zoom Count" VALUE=""/> + <PARAMETER NAME="Debounce MT Zoom Count" VALUE=""/> + <PARAMETER NAME="Debounce ST Pan Count" VALUE=""/> + <PARAMETER NAME="Default Load Status" VALUE="Enable"/> + <PARAMETER NAME="Feedback Resistor Pin" VALUE=""/> + <PARAMETER NAME="FingerThreshold" VALUE=""/> + <PARAMETER NAME="Gain-Offset Compensation" VALUE=""/> + <PARAMETER NAME="Hysteresis" VALUE=""/> + <PARAMETER NAME="Input1" VALUE="ComparatorBus_3"/> + <PARAMETER NAME="Input2" VALUE="Disable"/> + <PARAMETER NAME="Input2 ClockSync" VALUE="Unsynchronized"/> + <PARAMETER NAME="IntDispatchMode" VALUE="ActiveStatus"/> + <PARAMETER NAME="Integration Cycles" VALUE=""/> + <PARAMETER NAME="InterruptAPI" VALUE="Enable"/> + <PARAMETER NAME="InvertInput1" VALUE="Normal"/> + <PARAMETER NAME="LowBaselineReset" VALUE=""/> + <PARAMETER NAME="MT Finger Settling Count" VALUE=""/> + <PARAMETER NAME="MT Gesture Timeout Msec" VALUE=""/> + <PARAMETER NAME="MT Max Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="MT Min Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="Maximum Centroid Count" VALUE=""/> + <PARAMETER NAME="Modulator Capacitor Pin" VALUE=""/> + <PARAMETER NAME="NegativeNoiseThreshold" VALUE=""/> + <PARAMETER NAME="NoiseThreshold" VALUE=""/> + <PARAMETER NAME="On-Chip Centroid" VALUE=""/> + <PARAMETER NAME="Output1" VALUE="None"/> + <PARAMETER NAME="Output2" VALUE="None"/> + <PARAMETER NAME="Prescaler Period" VALUE=""/> + <PARAMETER NAME="RawData IIR Filter" VALUE=""/> + <PARAMETER NAME="RawData IIR Filter Coeff" VALUE=""/> + <PARAMETER NAME="RawData Jitter Filter" VALUE=""/> + <PARAMETER NAME="RawData Median Filter" VALUE=""/> + <PARAMETER NAME="Ref Value" VALUE=""/> + <PARAMETER NAME="Reference" VALUE=""/> + <PARAMETER NAME="Resolution" VALUE=""/> + <PARAMETER NAME="Rotate Debounce Limit" VALUE=""/> + <PARAMETER NAME="ST Click X Radius PX" VALUE=""/> + <PARAMETER NAME="ST Click Y Radius PX" VALUE=""/> + <PARAMETER NAME="ST Max Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="ST Max DblClick Radius PX" VALUE=""/> + <PARAMETER NAME="ST Max DblClick Timeout Msec" VALUE=""/> + <PARAMETER NAME="ST Min Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="ST Min DblClick Timeout Msec" VALUE=""/> + <PARAMETER NAME="Scanning Speed" VALUE=""/> + <PARAMETER NAME="Sensors Autoreset" VALUE=""/> + <PARAMETER NAME="ShieldElectrodeOut" VALUE=""/> + <PARAMETER NAME="Tuner" VALUE=""/> + <PARAMETER NAME="WOT FingerThreshold" VALUE=""/> + <PARAMETER NAME="XY IIR Filter" VALUE=""/> + <PARAMETER NAME="XY IIR Filter Coeff" VALUE=""/> + <PARAMETER NAME="XY Jitter Filter" VALUE=""/> + <PARAMETER NAME="Zoom Active Distance Threshold X" VALUE=""/> + <PARAMETER NAME="Zoom Active Distance Threshold Y" VALUE=""/> + <PARAMETER NAME="iDAC Range" VALUE=""/> + </PARAMETER_LIST> + </USER_MODULE> + <USER_MODULE NAME="CMPPRG" INSTANCE_NAME="comp" VERSION="3.3"> + <SHAPE SHAPE_TYPE="BLOCKLIST" COLOR_INDEX="8" NAME="CMPPRG_27"> + <BLOCK_LIST> + <BLOCK NAME="COMP" TYPE="ANALOG_CT" LOCATION="0 3"> + <REGISTER_LIST> + <REGISTER NAME="CR0" ADDR="7d" VALUE="e9" DATASHEET_NAME="ACB03CR0"/> + <REGISTER NAME="CR1" ADDR="7e" VALUE="e5" DATASHEET_NAME="ACB03CR1"/> + <REGISTER NAME="CR2" ADDR="7f" VALUE="40" DATASHEET_NAME="ACB03CR2"/> + <REGISTER NAME="CR3" ADDR="7c" VALUE="0" DATASHEET_NAME="ACB03CR3"/> + </REGISTER_LIST> + <INPUT_LIST/> + </BLOCK> + </BLOCK_LIST> + <RESOURCE_LIST/> + </SHAPE> + <PARAMETER_LIST> + <PARAMETER NAME="Active Distance Threshold X" VALUE=""/> + <PARAMETER NAME="Active Distance Threshold Y" VALUE=""/> + <PARAMETER NAME="AnalogBus" VALUE="AnalogOutBus_3"/> + <PARAMETER NAME="BaselineUpdateThreshold" VALUE=""/> + <PARAMETER NAME="Button FingerThreshold" VALUE=""/> + <PARAMETER NAME="Centroid" VALUE=""/> + <PARAMETER NAME="CompBus" VALUE="ComparatorBus_3"/> + <PARAMETER NAME="DeadTime" VALUE=""/> + <PARAMETER NAME="Debounce" VALUE=""/> + <PARAMETER NAME="Debounce MT Pan Count" VALUE=""/> + <PARAMETER NAME="Debounce MT Pan to Zoom Count" VALUE=""/> + <PARAMETER NAME="Debounce MT Zoom Count" VALUE=""/> + <PARAMETER NAME="Debounce ST Pan Count" VALUE=""/> + <PARAMETER NAME="Feedback Resistor Pin" VALUE=""/> + <PARAMETER NAME="FingerThreshold" VALUE=""/> + <PARAMETER NAME="Gain-Offset Compensation" VALUE=""/> + <PARAMETER NAME="Hysteresis" VALUE=""/> + <PARAMETER NAME="Input" VALUE="ASC12"/> + <PARAMETER NAME="Integration Cycles" VALUE=""/> + <PARAMETER NAME="LowBaselineReset" VALUE=""/> + <PARAMETER NAME="LowLimit" VALUE="AGND"/> + <PARAMETER NAME="MT Finger Settling Count" VALUE=""/> + <PARAMETER NAME="MT Gesture Timeout Msec" VALUE=""/> + <PARAMETER NAME="MT Max Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="MT Min Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="Maximum Centroid Count" VALUE=""/> + <PARAMETER NAME="Modulator Capacitor Pin" VALUE=""/> + <PARAMETER NAME="NegativeNoiseThreshold" VALUE=""/> + <PARAMETER NAME="NoiseThreshold" VALUE=""/> + <PARAMETER NAME="On-Chip Centroid" VALUE=""/> + <PARAMETER NAME="Prescaler Period" VALUE=""/> + <PARAMETER NAME="RawData IIR Filter" VALUE=""/> + <PARAMETER NAME="RawData IIR Filter Coeff" VALUE=""/> + <PARAMETER NAME="RawData Jitter Filter" VALUE=""/> + <PARAMETER NAME="RawData Median Filter" VALUE=""/> + <PARAMETER NAME="Ref Value" VALUE=""/> + <PARAMETER NAME="RefValue" VALUE="0.937"/> + <PARAMETER NAME="Reference" VALUE=""/> + <PARAMETER NAME="Resolution" VALUE=""/> + <PARAMETER NAME="Rotate Debounce Limit" VALUE=""/> + <PARAMETER NAME="ST Click X Radius PX" VALUE=""/> + <PARAMETER NAME="ST Click Y Radius PX" VALUE=""/> + <PARAMETER NAME="ST Max Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="ST Max DblClick Radius PX" VALUE=""/> + <PARAMETER NAME="ST Max DblClick Timeout Msec" VALUE=""/> + <PARAMETER NAME="ST Min Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="ST Min DblClick Timeout Msec" VALUE=""/> + <PARAMETER NAME="Scanning Speed" VALUE=""/> + <PARAMETER NAME="Sensors Autoreset" VALUE=""/> + <PARAMETER NAME="ShieldElectrodeOut" VALUE=""/> + <PARAMETER NAME="Tuner" VALUE=""/> + <PARAMETER NAME="WOT FingerThreshold" VALUE=""/> + <PARAMETER NAME="XY IIR Filter" VALUE=""/> + <PARAMETER NAME="XY IIR Filter Coeff" VALUE=""/> + <PARAMETER NAME="XY Jitter Filter" VALUE=""/> + <PARAMETER NAME="Zoom Active Distance Threshold X" VALUE=""/> + <PARAMETER NAME="Zoom Active Distance Threshold Y" VALUE=""/> + <PARAMETER NAME="iDAC Range" VALUE=""/> + </PARAMETER_LIST> + </USER_MODULE> + <USER_MODULE NAME="TachTimer16" INSTANCE_NAME="compteur" VERSION="1.1"> + <SHAPE SHAPE_TYPE="BLOCKLIST" COLOR_INDEX="10" NAME="TachTmr1627"> + <BLOCK_LIST> + <BLOCK NAME="TIMER16_LSB" TYPE="DIGITAL" LOCATION="9"> + <REGISTER_LIST> + <REGISTER NAME="CONTROL_0" ADDR="47" VALUE="2" DATASHEET_NAME="DBB21CR0"/> + <REGISTER NAME="DATA_0" ADDR="44" VALUE="0" DATASHEET_NAME="DBB21DR0"/> + <REGISTER NAME="DATA_1" ADDR="45" VALUE="60" DATASHEET_NAME="DBB21DR1"/> + <REGISTER NAME="DATA_2" ADDR="46" VALUE="a" DATASHEET_NAME="DBB21DR2"/> + <REGISTER NAME="DIG_BasicFunction" ADDR="144" VALUE="0" DATASHEET_NAME="DBB21FN"/> + <REGISTER NAME="DIG_Input" ADDR="145" VALUE="71" DATASHEET_NAME="DBB21IN"/> + <REGISTER NAME="DIG_Output" ADDR="146" VALUE="40" DATASHEET_NAME="DBB21OU"/> + </REGISTER_LIST> + <INPUT_LIST/> + </BLOCK> + <BLOCK NAME="TIMER16_MSB" TYPE="DIGITAL" LOCATION="10"> + <REGISTER_LIST> + <REGISTER NAME="CONTROL_0" ADDR="4b" VALUE="4" DATASHEET_NAME="DCB22CR0"/> + <REGISTER NAME="DATA_0" ADDR="48" VALUE="0" DATASHEET_NAME="DCB22DR0"/> + <REGISTER NAME="DATA_1" ADDR="49" VALUE="ea" DATASHEET_NAME="DCB22DR1"/> + <REGISTER NAME="DATA_2" ADDR="4a" VALUE="ea" DATASHEET_NAME="DCB22DR2"/> + <REGISTER NAME="DIG_BasicFunction" ADDR="148" VALUE="20" DATASHEET_NAME="DCB22FN"/> + <REGISTER NAME="DIG_Input" ADDR="149" VALUE="31" DATASHEET_NAME="DCB22IN"/> + <REGISTER NAME="DIG_Output" ADDR="14a" VALUE="40" DATASHEET_NAME="DCB22OU"/> + </REGISTER_LIST> + <INPUT_LIST/> + </BLOCK> + </BLOCK_LIST> + <RESOURCE_LIST/> + </SHAPE> + <PARAMETER_LIST> + <PARAMETER NAME="Active Distance Threshold X" VALUE=""/> + <PARAMETER NAME="Active Distance Threshold Y" VALUE=""/> + <PARAMETER NAME="BaselineUpdateThreshold" VALUE=""/> + <PARAMETER NAME="Button FingerThreshold" VALUE=""/> + <PARAMETER NAME="Capture" VALUE="ComparatorBus_3"/> + <PARAMETER NAME="Centroid" VALUE=""/> + <PARAMETER NAME="Clock" VALUE="VC3"/> + <PARAMETER NAME="ClockSync" VALUE="Sync to SysClk"/> + <PARAMETER NAME="CompareOut" VALUE="None"/> + <PARAMETER NAME="CompareType" VALUE="Less Than Or Equal"/> + <PARAMETER NAME="CompareValue" VALUE="59914"/> + <PARAMETER NAME="DeadTime" VALUE=""/> + <PARAMETER NAME="Debounce" VALUE=""/> + <PARAMETER NAME="Debounce MT Pan Count" VALUE=""/> + <PARAMETER NAME="Debounce MT Pan to Zoom Count" VALUE=""/> + <PARAMETER NAME="Debounce MT Zoom Count" VALUE=""/> + <PARAMETER NAME="Debounce ST Pan Count" VALUE=""/> + <PARAMETER NAME="Feedback Resistor Pin" VALUE=""/> + <PARAMETER NAME="FingerThreshold" VALUE=""/> + <PARAMETER NAME="Gain-Offset Compensation" VALUE=""/> + <PARAMETER NAME="Hysteresis" VALUE=""/> + <PARAMETER NAME="IntDispatchMode" VALUE="ActiveStatus"/> + <PARAMETER NAME="Integration Cycles" VALUE=""/> + <PARAMETER NAME="InterruptAPI" VALUE="Enable"/> + <PARAMETER NAME="InvertCapture" VALUE="Normal"/> + <PARAMETER NAME="LowBaselineReset" VALUE=""/> + <PARAMETER NAME="MT Finger Settling Count" VALUE=""/> + <PARAMETER NAME="MT Gesture Timeout Msec" VALUE=""/> + <PARAMETER NAME="MT Max Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="MT Min Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="Maximum Centroid Count" VALUE=""/> + <PARAMETER NAME="Modulator Capacitor Pin" VALUE=""/> + <PARAMETER NAME="NegativeNoiseThreshold" VALUE=""/> + <PARAMETER NAME="NoiseThreshold" VALUE=""/> + <PARAMETER NAME="On-Chip Centroid" VALUE=""/> + <PARAMETER NAME="Period" VALUE="60000"/> + <PARAMETER NAME="Prescaler Period" VALUE=""/> + <PARAMETER NAME="RawData IIR Filter" VALUE=""/> + <PARAMETER NAME="RawData IIR Filter Coeff" VALUE=""/> + <PARAMETER NAME="RawData Jitter Filter" VALUE=""/> + <PARAMETER NAME="RawData Median Filter" VALUE=""/> + <PARAMETER NAME="Ref Value" VALUE=""/> + <PARAMETER NAME="Reference" VALUE=""/> + <PARAMETER NAME="Resolution" VALUE=""/> + <PARAMETER NAME="Rotate Debounce Limit" VALUE=""/> + <PARAMETER NAME="ST Click X Radius PX" VALUE=""/> + <PARAMETER NAME="ST Click Y Radius PX" VALUE=""/> + <PARAMETER NAME="ST Max Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="ST Max DblClick Radius PX" VALUE=""/> + <PARAMETER NAME="ST Max DblClick Timeout Msec" VALUE=""/> + <PARAMETER NAME="ST Min Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="ST Min DblClick Timeout Msec" VALUE=""/> + <PARAMETER NAME="Scanning Speed" VALUE=""/> + <PARAMETER NAME="Sensors Autoreset" VALUE=""/> + <PARAMETER NAME="ShieldElectrodeOut" VALUE=""/> + <PARAMETER NAME="TC_PulseWidth" VALUE="Full Clock"/> + <PARAMETER NAME="TerminalCountOut" VALUE="None"/> + <PARAMETER NAME="Tuner" VALUE=""/> + <PARAMETER NAME="WOT FingerThreshold" VALUE=""/> + <PARAMETER NAME="XY IIR Filter" VALUE=""/> + <PARAMETER NAME="XY IIR Filter Coeff" VALUE=""/> + <PARAMETER NAME="XY Jitter Filter" VALUE=""/> + <PARAMETER NAME="Zoom Active Distance Threshold X" VALUE=""/> + <PARAMETER NAME="Zoom Active Distance Threshold Y" VALUE=""/> + <PARAMETER NAME="iDAC Range" VALUE=""/> + </PARAMETER_LIST> + </USER_MODULE> + <USER_MODULE NAME="Timer16" INSTANCE_NAME="declencheur" VERSION="2.6"> + <SHAPE SHAPE_TYPE="BLOCKLIST" COLOR_INDEX="3" NAME="Tmr1627"> + <BLOCK_LIST> + <BLOCK NAME="TIMER16_LSB" TYPE="DIGITAL" LOCATION="4"> + <REGISTER_LIST> + <REGISTER NAME="CONTROL_0" ADDR="33" VALUE="0" DATASHEET_NAME="DBB10CR0"/> + <REGISTER NAME="DATA_0" ADDR="30" VALUE="0" DATASHEET_NAME="DBB10DR0"/> + <REGISTER NAME="DATA_1" ADDR="31" VALUE="60" DATASHEET_NAME="DBB10DR1"/> + <REGISTER NAME="DATA_2" ADDR="32" VALUE="0" DATASHEET_NAME="DBB10DR2"/> + <REGISTER NAME="DIG_BasicFunction" ADDR="130" VALUE="0" DATASHEET_NAME="DBB10FN"/> + <REGISTER NAME="DIG_Input" ADDR="131" VALUE="6" DATASHEET_NAME="DBB10IN"/> + <REGISTER NAME="DIG_Output" ADDR="132" VALUE="40" DATASHEET_NAME="DBB10OU"/> + </REGISTER_LIST> + <INPUT_LIST/> + </BLOCK> + <BLOCK NAME="TIMER16_MSB" TYPE="DIGITAL" LOCATION="5"> + <REGISTER_LIST> + <REGISTER NAME="CONTROL_0" ADDR="37" VALUE="4" DATASHEET_NAME="DBB11CR0"/> + <REGISTER NAME="DATA_0" ADDR="34" VALUE="0" DATASHEET_NAME="DBB11DR0"/> + <REGISTER NAME="DATA_1" ADDR="35" VALUE="ea" DATASHEET_NAME="DBB11DR1"/> + <REGISTER NAME="DATA_2" ADDR="36" VALUE="0" DATASHEET_NAME="DBB11DR2"/> + <REGISTER NAME="DIG_BasicFunction" ADDR="134" VALUE="20" DATASHEET_NAME="DBB11FN"/> + <REGISTER NAME="DIG_Input" ADDR="135" VALUE="36" DATASHEET_NAME="DBB11IN"/> + <REGISTER NAME="DIG_Output" ADDR="136" VALUE="40" DATASHEET_NAME="DBB11OU"/> + </REGISTER_LIST> + <INPUT_LIST/> + </BLOCK> + </BLOCK_LIST> + <RESOURCE_LIST/> + </SHAPE> + <PARAMETER_LIST> + <PARAMETER NAME="Active Distance Threshold X" VALUE=""/> + <PARAMETER NAME="Active Distance Threshold Y" VALUE=""/> + <PARAMETER NAME="BaselineUpdateThreshold" VALUE=""/> + <PARAMETER NAME="Button FingerThreshold" VALUE=""/> + <PARAMETER NAME="Capture" VALUE="Low"/> + <PARAMETER NAME="Centroid" VALUE=""/> + <PARAMETER NAME="Clock" VALUE="VC2"/> + <PARAMETER NAME="ClockSync" VALUE="Sync to SysClk"/> + <PARAMETER NAME="CompareOut" VALUE="None"/> + <PARAMETER NAME="CompareType" VALUE="Less Than Or Equal"/> + <PARAMETER NAME="CompareValue" VALUE="0000"/> + <PARAMETER NAME="DeadTime" VALUE=""/> + <PARAMETER NAME="Debounce" VALUE=""/> + <PARAMETER NAME="Debounce MT Pan Count" VALUE=""/> + <PARAMETER NAME="Debounce MT Pan to Zoom Count" VALUE=""/> + <PARAMETER NAME="Debounce MT Zoom Count" VALUE=""/> + <PARAMETER NAME="Debounce ST Pan Count" VALUE=""/> + <PARAMETER NAME="Feedback Resistor Pin" VALUE=""/> + <PARAMETER NAME="FingerThreshold" VALUE=""/> + <PARAMETER NAME="Gain-Offset Compensation" VALUE=""/> + <PARAMETER NAME="Hysteresis" VALUE=""/> + <PARAMETER NAME="IntDispatchMode" VALUE="ActiveStatus"/> + <PARAMETER NAME="Integration Cycles" VALUE=""/> + <PARAMETER NAME="InterruptAPI" VALUE="Enable"/> + <PARAMETER NAME="InterruptType" VALUE="Terminal Count"/> + <PARAMETER NAME="InvertCapture" VALUE="Normal"/> + <PARAMETER NAME="LowBaselineReset" VALUE=""/> + <PARAMETER NAME="MT Finger Settling Count" VALUE=""/> + <PARAMETER NAME="MT Gesture Timeout Msec" VALUE=""/> + <PARAMETER NAME="MT Max Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="MT Min Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="Maximum Centroid Count" VALUE=""/> + <PARAMETER NAME="Modulator Capacitor Pin" VALUE=""/> + <PARAMETER NAME="NegativeNoiseThreshold" VALUE=""/> + <PARAMETER NAME="NoiseThreshold" VALUE=""/> + <PARAMETER NAME="On-Chip Centroid" VALUE=""/> + <PARAMETER NAME="Period" VALUE="60000"/> + <PARAMETER NAME="Prescaler Period" VALUE=""/> + <PARAMETER NAME="RawData IIR Filter" VALUE=""/> + <PARAMETER NAME="RawData IIR Filter Coeff" VALUE=""/> + <PARAMETER NAME="RawData Jitter Filter" VALUE=""/> + <PARAMETER NAME="RawData Median Filter" VALUE=""/> + <PARAMETER NAME="Ref Value" VALUE=""/> + <PARAMETER NAME="Reference" VALUE=""/> + <PARAMETER NAME="Resolution" VALUE=""/> + <PARAMETER NAME="Rotate Debounce Limit" VALUE=""/> + <PARAMETER NAME="ST Click X Radius PX" VALUE=""/> + <PARAMETER NAME="ST Click Y Radius PX" VALUE=""/> + <PARAMETER NAME="ST Max Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="ST Max DblClick Radius PX" VALUE=""/> + <PARAMETER NAME="ST Max DblClick Timeout Msec" VALUE=""/> + <PARAMETER NAME="ST Min Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="ST Min DblClick Timeout Msec" VALUE=""/> + <PARAMETER NAME="Scanning Speed" VALUE=""/> + <PARAMETER NAME="Sensors Autoreset" VALUE=""/> + <PARAMETER NAME="ShieldElectrodeOut" VALUE=""/> + <PARAMETER NAME="TC_PulseWidth" VALUE="Full Clock"/> + <PARAMETER NAME="TerminalCountOut" VALUE="None"/> + <PARAMETER NAME="Tuner" VALUE=""/> + <PARAMETER NAME="WOT FingerThreshold" VALUE=""/> + <PARAMETER NAME="XY IIR Filter" VALUE=""/> + <PARAMETER NAME="XY IIR Filter Coeff" VALUE=""/> + <PARAMETER NAME="XY Jitter Filter" VALUE=""/> + <PARAMETER NAME="Zoom Active Distance Threshold X" VALUE=""/> + <PARAMETER NAME="Zoom Active Distance Threshold Y" VALUE=""/> + <PARAMETER NAME="iDAC Range" VALUE=""/> + </PARAMETER_LIST> + </USER_MODULE> + <USER_MODULE NAME="BPF2" INSTANCE_NAME="filtre1" VERSION="5.5"> + <SHAPE SHAPE_TYPE="BLOCKLIST" COLOR_INDEX="7" NAME="BPF2VA"> + <BLOCK_LIST> + <BLOCK NAME="FLFB" TYPE="ANALOG_SCB" LOCATION="2 0"> + <REGISTER_LIST> + <REGISTER NAME="CR0" ADDR="90" VALUE="82" DATASHEET_NAME="ASD20CR0"/> + <REGISTER NAME="CR1" ADDR="91" VALUE="0" DATASHEET_NAME="ASD20CR1"/> + <REGISTER NAME="CR2" ADDR="92" VALUE="0" DATASHEET_NAME="ASD20CR2"/> + <REGISTER NAME="CR3" ADDR="93" VALUE="20" DATASHEET_NAME="ASD20CR3"/> + </REGISTER_LIST> + <INPUT_LIST/> + </BLOCK> + <BLOCK NAME="FLIN" TYPE="ANALOG_SCA" LOCATION="1 0"> + <REGISTER_LIST> + <REGISTER NAME="CR0" ADDR="80" VALUE="a1" DATASHEET_NAME="ASC10CR0"/> + <REGISTER NAME="CR1" ADDR="81" VALUE="a6" DATASHEET_NAME="ASC10CR1"/> + <REGISTER NAME="CR2" ADDR="82" VALUE="2" DATASHEET_NAME="ASC10CR2"/> + <REGISTER NAME="CR3" ADDR="83" VALUE="2c" DATASHEET_NAME="ASC10CR3"/> + </REGISTER_LIST> + <INPUT_LIST/> + </BLOCK> + </BLOCK_LIST> + <RESOURCE_LIST/> + </SHAPE> + <PARAMETER_LIST> + <PARAMETER NAME="Active Distance Threshold X" VALUE=""/> + <PARAMETER NAME="Active Distance Threshold Y" VALUE=""/> + <PARAMETER NAME="AnalogBus" VALUE="Disable"/> + <PARAMETER NAME="BaselineUpdateThreshold" VALUE=""/> + <PARAMETER NAME="Button FingerThreshold" VALUE=""/> + <PARAMETER NAME="C1" VALUE="1"/> + <PARAMETER NAME="C2" VALUE="6"/> + <PARAMETER NAME="C3" VALUE="2"/> + <PARAMETER NAME="C4" VALUE="2"/> + <PARAMETER NAME="CA" VALUE="32"/> + <PARAMETER NAME="CB" VALUE="32"/> + <PARAMETER NAME="Centroid" VALUE=""/> + <PARAMETER NAME="CompBus" VALUE="DISABLE"/> + <PARAMETER NAME="DeadTime" VALUE=""/> + <PARAMETER NAME="Debounce" VALUE=""/> + <PARAMETER NAME="Debounce MT Pan Count" VALUE=""/> + <PARAMETER NAME="Debounce MT Pan to Zoom Count" VALUE=""/> + <PARAMETER NAME="Debounce MT Zoom Count" VALUE=""/> + <PARAMETER NAME="Debounce ST Pan Count" VALUE=""/> + <PARAMETER NAME="Feedback Resistor Pin" VALUE=""/> + <PARAMETER NAME="FingerThreshold" VALUE=""/> + <PARAMETER NAME="Gain-Offset Compensation" VALUE=""/> + <PARAMETER NAME="Hysteresis" VALUE=""/> + <PARAMETER NAME="Input" VALUE="ACB00"/> + <PARAMETER NAME="Integration Cycles" VALUE=""/> + <PARAMETER NAME="LowBaselineReset" VALUE=""/> + <PARAMETER NAME="MT Finger Settling Count" VALUE=""/> + <PARAMETER NAME="MT Gesture Timeout Msec" VALUE=""/> + <PARAMETER NAME="MT Max Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="MT Min Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="Maximum Centroid Count" VALUE=""/> + <PARAMETER NAME="Modulator Capacitor Pin" VALUE=""/> + <PARAMETER NAME="NegativeNoiseThreshold" VALUE=""/> + <PARAMETER NAME="NoiseThreshold" VALUE=""/> + <PARAMETER NAME="On-Chip Centroid" VALUE=""/> + <PARAMETER NAME="Polarity" VALUE="Inverting"/> + <PARAMETER NAME="Prescaler Period" VALUE=""/> + <PARAMETER NAME="RawData IIR Filter" VALUE=""/> + <PARAMETER NAME="RawData IIR Filter Coeff" VALUE=""/> + <PARAMETER NAME="RawData Jitter Filter" VALUE=""/> + <PARAMETER NAME="RawData Median Filter" VALUE=""/> + <PARAMETER NAME="Ref Value" VALUE=""/> + <PARAMETER NAME="Reference" VALUE=""/> + <PARAMETER NAME="Resolution" VALUE=""/> + <PARAMETER NAME="Rotate Debounce Limit" VALUE=""/> + <PARAMETER NAME="ST Click X Radius PX" VALUE=""/> + <PARAMETER NAME="ST Click Y Radius PX" VALUE=""/> + <PARAMETER NAME="ST Max Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="ST Max DblClick Radius PX" VALUE=""/> + <PARAMETER NAME="ST Max DblClick Timeout Msec" VALUE=""/> + <PARAMETER NAME="ST Min Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="ST Min DblClick Timeout Msec" VALUE=""/> + <PARAMETER NAME="Scanning Speed" VALUE=""/> + <PARAMETER NAME="Sensors Autoreset" VALUE=""/> + <PARAMETER NAME="ShieldElectrodeOut" VALUE=""/> + <PARAMETER NAME="Store0" VALUE=""/> + <PARAMETER NAME="Store1" VALUE=""/> + <PARAMETER NAME="Store2" VALUE=""/> + <PARAMETER NAME="Store3" VALUE=""/> + <PARAMETER NAME="Store4" VALUE=""/> + <PARAMETER NAME="Tuner" VALUE=""/> + <PARAMETER NAME="WOT FingerThreshold" VALUE=""/> + <PARAMETER NAME="XY IIR Filter" VALUE=""/> + <PARAMETER NAME="XY IIR Filter Coeff" VALUE=""/> + <PARAMETER NAME="XY Jitter Filter" VALUE=""/> + <PARAMETER NAME="Zoom Active Distance Threshold X" VALUE=""/> + <PARAMETER NAME="Zoom Active Distance Threshold Y" VALUE=""/> + <PARAMETER NAME="iDAC Range" VALUE=""/> + </PARAMETER_LIST> + </USER_MODULE> + <USER_MODULE NAME="BPF2" INSTANCE_NAME="filtre2" VERSION="5.5"> + <SHAPE SHAPE_TYPE="BLOCKLIST" COLOR_INDEX="9" NAME="BPF2VA"> + <BLOCK_LIST> + <BLOCK NAME="FLFB" TYPE="ANALOG_SCB" LOCATION="2 2"> + <REGISTER_LIST> + <REGISTER NAME="CR0" ADDR="98" VALUE="82" DATASHEET_NAME="ASD22CR0"/> + <REGISTER NAME="CR1" ADDR="99" VALUE="0" DATASHEET_NAME="ASD22CR1"/> + <REGISTER NAME="CR2" ADDR="9a" VALUE="0" DATASHEET_NAME="ASD22CR2"/> + <REGISTER NAME="CR3" ADDR="9b" VALUE="20" DATASHEET_NAME="ASD22CR3"/> + </REGISTER_LIST> + <INPUT_LIST/> + </BLOCK> + <BLOCK NAME="FLIN" TYPE="ANALOG_SCA" LOCATION="1 2"> + <REGISTER_LIST> + <REGISTER NAME="CR0" ADDR="88" VALUE="a1" DATASHEET_NAME="ASC12CR0"/> + <REGISTER NAME="CR1" ADDR="89" VALUE="a5" DATASHEET_NAME="ASC12CR1"/> + <REGISTER NAME="CR2" ADDR="8a" VALUE="82" DATASHEET_NAME="ASC12CR2"/> + <REGISTER NAME="CR3" ADDR="8b" VALUE="2c" DATASHEET_NAME="ASC12CR3"/> + </REGISTER_LIST> + <INPUT_LIST/> + </BLOCK> + </BLOCK_LIST> + <RESOURCE_LIST/> + </SHAPE> + <PARAMETER_LIST> + <PARAMETER NAME="Active Distance Threshold X" VALUE=""/> + <PARAMETER NAME="Active Distance Threshold Y" VALUE=""/> + <PARAMETER NAME="AnalogBus" VALUE="AnalogOutBus_2"/> + <PARAMETER NAME="BaselineUpdateThreshold" VALUE=""/> + <PARAMETER NAME="Button FingerThreshold" VALUE=""/> + <PARAMETER NAME="C1" VALUE="1"/> + <PARAMETER NAME="C2" VALUE="5"/> + <PARAMETER NAME="C3" VALUE="2"/> + <PARAMETER NAME="C4" VALUE="2"/> + <PARAMETER NAME="CA" VALUE="32"/> + <PARAMETER NAME="CB" VALUE="32"/> + <PARAMETER NAME="Centroid" VALUE=""/> + <PARAMETER NAME="CompBus" VALUE="DISABLE"/> + <PARAMETER NAME="DeadTime" VALUE=""/> + <PARAMETER NAME="Debounce" VALUE=""/> + <PARAMETER NAME="Debounce MT Pan Count" VALUE=""/> + <PARAMETER NAME="Debounce MT Pan to Zoom Count" VALUE=""/> + <PARAMETER NAME="Debounce MT Zoom Count" VALUE=""/> + <PARAMETER NAME="Debounce ST Pan Count" VALUE=""/> + <PARAMETER NAME="Feedback Resistor Pin" VALUE=""/> + <PARAMETER NAME="FingerThreshold" VALUE=""/> + <PARAMETER NAME="Gain-Offset Compensation" VALUE=""/> + <PARAMETER NAME="Hysteresis" VALUE=""/> + <PARAMETER NAME="Input" VALUE="ACB02"/> + <PARAMETER NAME="Integration Cycles" VALUE=""/> + <PARAMETER NAME="LowBaselineReset" VALUE=""/> + <PARAMETER NAME="MT Finger Settling Count" VALUE=""/> + <PARAMETER NAME="MT Gesture Timeout Msec" VALUE=""/> + <PARAMETER NAME="MT Max Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="MT Min Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="Maximum Centroid Count" VALUE=""/> + <PARAMETER NAME="Modulator Capacitor Pin" VALUE=""/> + <PARAMETER NAME="NegativeNoiseThreshold" VALUE=""/> + <PARAMETER NAME="NoiseThreshold" VALUE=""/> + <PARAMETER NAME="On-Chip Centroid" VALUE=""/> + <PARAMETER NAME="Polarity" VALUE="Inverting"/> + <PARAMETER NAME="Prescaler Period" VALUE=""/> + <PARAMETER NAME="RawData IIR Filter" VALUE=""/> + <PARAMETER NAME="RawData IIR Filter Coeff" VALUE=""/> + <PARAMETER NAME="RawData Jitter Filter" VALUE=""/> + <PARAMETER NAME="RawData Median Filter" VALUE=""/> + <PARAMETER NAME="Ref Value" VALUE=""/> + <PARAMETER NAME="Reference" VALUE=""/> + <PARAMETER NAME="Resolution" VALUE=""/> + <PARAMETER NAME="Rotate Debounce Limit" VALUE=""/> + <PARAMETER NAME="ST Click X Radius PX" VALUE=""/> + <PARAMETER NAME="ST Click Y Radius PX" VALUE=""/> + <PARAMETER NAME="ST Max Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="ST Max DblClick Radius PX" VALUE=""/> + <PARAMETER NAME="ST Max DblClick Timeout Msec" VALUE=""/> + <PARAMETER NAME="ST Min Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="ST Min DblClick Timeout Msec" VALUE=""/> + <PARAMETER NAME="Scanning Speed" VALUE=""/> + <PARAMETER NAME="Sensors Autoreset" VALUE=""/> + <PARAMETER NAME="ShieldElectrodeOut" VALUE=""/> + <PARAMETER NAME="Store0" VALUE=""/> + <PARAMETER NAME="Store1" VALUE=""/> + <PARAMETER NAME="Store2" VALUE=""/> + <PARAMETER NAME="Store3" VALUE=""/> + <PARAMETER NAME="Store4" VALUE=""/> + <PARAMETER NAME="Tuner" VALUE=""/> + <PARAMETER NAME="WOT FingerThreshold" VALUE=""/> + <PARAMETER NAME="XY IIR Filter" VALUE=""/> + <PARAMETER NAME="XY IIR Filter Coeff" VALUE=""/> + <PARAMETER NAME="XY Jitter Filter" VALUE=""/> + <PARAMETER NAME="Zoom Active Distance Threshold X" VALUE=""/> + <PARAMETER NAME="Zoom Active Distance Threshold Y" VALUE=""/> + <PARAMETER NAME="iDAC Range" VALUE=""/> + </PARAMETER_LIST> + </USER_MODULE> + <USER_MODULE NAME="DigInv" INSTANCE_NAME="inverseur" VERSION="1.5"> + <SHAPE SHAPE_TYPE="BLOCKLIST" COLOR_INDEX="2" NAME="DigInv27"> + <BLOCK_LIST> + <BLOCK NAME="DigInv" TYPE="DIGITAL" LOCATION="1"> + <REGISTER_LIST> + <REGISTER NAME="CONTROL_0" ADDR="27" VALUE="0" DATASHEET_NAME="DBB01CR0"/> + <REGISTER NAME="DATA_0" ADDR="24" VALUE="0" DATASHEET_NAME="DBB01DR0"/> + <REGISTER NAME="DATA_1" ADDR="25" VALUE="0" DATASHEET_NAME="DBB01DR1"/> + <REGISTER NAME="DATA_2" ADDR="26" VALUE="0" DATASHEET_NAME="DBB01DR2"/> + <REGISTER NAME="DIG_BasicFunction" ADDR="124" VALUE="20" DATASHEET_NAME="DBB01FN"/> + <REGISTER NAME="DIG_Input" ADDR="125" VALUE="a" DATASHEET_NAME="DBB01IN"/> + <REGISTER NAME="DIG_Output" ADDR="126" VALUE="47" DATASHEET_NAME="DBB01OU"/> + </REGISTER_LIST> + <INPUT_LIST/> + </BLOCK> + </BLOCK_LIST> + <RESOURCE_LIST/> + </SHAPE> + <PARAMETER_LIST> + <PARAMETER NAME="Active Distance Threshold X" VALUE=""/> + <PARAMETER NAME="Active Distance Threshold Y" VALUE=""/> + <PARAMETER NAME="BaselineUpdateThreshold" VALUE=""/> + <PARAMETER NAME="Button FingerThreshold" VALUE=""/> + <PARAMETER NAME="Centroid" VALUE=""/> + <PARAMETER NAME="ClockSync" VALUE="Sync to SysClk"/> + <PARAMETER NAME="DeadTime" VALUE=""/> + <PARAMETER NAME="Debounce" VALUE=""/> + <PARAMETER NAME="Debounce MT Pan Count" VALUE=""/> + <PARAMETER NAME="Debounce MT Pan to Zoom Count" VALUE=""/> + <PARAMETER NAME="Debounce MT Zoom Count" VALUE=""/> + <PARAMETER NAME="Debounce ST Pan Count" VALUE=""/> + <PARAMETER NAME="Feedback Resistor Pin" VALUE=""/> + <PARAMETER NAME="FingerThreshold" VALUE=""/> + <PARAMETER NAME="Gain-Offset Compensation" VALUE=""/> + <PARAMETER NAME="Hysteresis" VALUE=""/> + <PARAMETER NAME="Input" VALUE="Row_0_Output_2"/> + <PARAMETER NAME="IntDispatchMode" VALUE="ActiveStatus"/> + <PARAMETER NAME="Integration Cycles" VALUE=""/> + <PARAMETER NAME="InterruptAPI" VALUE="Enable"/> + <PARAMETER NAME="LowBaselineReset" VALUE=""/> + <PARAMETER NAME="MT Finger Settling Count" VALUE=""/> + <PARAMETER NAME="MT Gesture Timeout Msec" VALUE=""/> + <PARAMETER NAME="MT Max Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="MT Min Click Timeout Msec" VALUE=""/> + <PARAMETER NAME="Maximum Centroid Count" VALUE=""/> + <PARAMETER NAME="Modula... [truncated message content] |
From: Xavier L. <Ba...@us...> - 2010-05-22 13:03:21
|
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 247835b690cefcfe64fa7296ff1233aed7af2a77 (commit) from 4791b8a737302d52223f36b111ecbf4b21ddda29 (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 247835b690cefcfe64fa7296ff1233aed7af2a77 Author: Xavier Lagorce <Xav...@cr...> Date: Sat May 22 15:02:45 2010 +0200 Tuned constants for the last update of the controller ----------------------------------------------------------------------- Changes: diff --git a/elec/boards/Controller_HolonomicDrive/Firmware/speed_control.h b/elec/boards/Controller_HolonomicDrive/Firmware/speed_control.h index 3017066..b3bebf1 100644 --- a/elec/boards/Controller_HolonomicDrive/Firmware/speed_control.h +++ b/elec/boards/Controller_HolonomicDrive/Firmware/speed_control.h @@ -6,14 +6,14 @@ #ifndef HEADER__SPEEDCONTROL #define HEADER__SPEEDCONTROL -#define K_P 150 -#define K_I 3 -#define Tcomp 40 // speed will be computed on a Tcomp timesample -#define Te 50 +#define K_P 170 +#define K_I 4 +#define Tcomp 5 // speed will be computed on a Tcomp timesample +#define Te 10 #define K_v (1000/Tcomp) -#define INTEG_MAX 20000 +#define INTEG_MAX 200000 #include "ch.h" #include "motor.h" hooks/post-receive -- krobot |
From: Xavier L. <Ba...@us...> - 2010-05-22 12:54:34
|
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 4791b8a737302d52223f36b111ecbf4b21ddda29 (commit) via 0eae3c85c0ee88fdc2a26d9cf1d0c4f7de5d3c95 (commit) from 1c622c29659ace246c78926491a29bd98d75d13e (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 4791b8a737302d52223f36b111ecbf4b21ddda29 Author: Xavier Lagorce <Xav...@cr...> Date: Sat May 22 14:53:43 2010 +0200 Improvments to speed controller * Some clearer code * We MUST consider counter wrapper or terrible things happen commit 0eae3c85c0ee88fdc2a26d9cf1d0c4f7de5d3c95 Author: Xavier Lagorce <Xav...@cr...> Date: Sat May 22 14:48:21 2010 +0200 Cleaning ----------------------------------------------------------------------- Changes: diff --git a/elec/boards/Controller_HolonomicDrive/Firmware/motor.c b/elec/boards/Controller_HolonomicDrive/Firmware/motor.c index 00c2f1f..5d71d92 100644 --- a/elec/boards/Controller_HolonomicDrive/Firmware/motor.c +++ b/elec/boards/Controller_HolonomicDrive/Firmware/motor.c @@ -10,45 +10,6 @@ signed char currentSpeedSign[] = {0, 0, 0}; TIM_OCInitTypeDef TIM_OCInitStructure; /* - * Interrupt routine for PWM generation - */ -/*void VectorB0(void) { - - if (TIM_GetITStatus(TIM2, TIM_IT_CC1) != RESET) - { - // Clear TIM2 Capture Compare1 interrupt pending bit - TIM_ClearITPendingBit(TIM2, TIM_IT_CC1); - - // End of motor1 pulse - GPIO_ResetBits(GPIOA, GPIO_Pin_1); - } - else if (TIM_GetITStatus(TIM2, TIM_IT_CC2) != RESET) - { - // Clear TIM2 Capture Compare2 interrupt pending bit - TIM_ClearITPendingBit(TIM2, TIM_IT_CC2); - - // End of motor2 pulse - GPIO_ResetBits(GPIOA, GPIO_Pin_2); - } - else if (TIM_GetITStatus(TIM2, TIM_IT_CC3) != RESET) - { - // Clear TIM2 Capture Compare3 interrupt pending bit - TIM_ClearITPendingBit(TIM2, TIM_IT_CC3); - - // End of motor3 pulse - GPIO_ResetBits(GPIOA, GPIO_Pin_3); - } - else { - // TIM_IT_Update - - // Clear TIM2 Update interrupt pending bit - TIM_ClearITPendingBit(TIM2, TIM_IT_Update); - - GPIO_SetBits(GPIOA, GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_3); - } - }*/ - -/* * Initialises TIM2 for PWM generation and associated GPIOs */ void motorsInit(void) { diff --git a/elec/boards/Controller_HolonomicDrive/Firmware/speed_control.c b/elec/boards/Controller_HolonomicDrive/Firmware/speed_control.c index 10f186a..418f2fe 100644 --- a/elec/boards/Controller_HolonomicDrive/Firmware/speed_control.c +++ b/elec/boards/Controller_HolonomicDrive/Firmware/speed_control.c @@ -20,9 +20,9 @@ static msg_t ThreadSpeedController(void *arg) { systime_t time; int32_t commands[3] = {0, 0, 0}; int32_t errors[3] = {0, 0, 0}; - uint16_t positions[3] = {0, 0, 0}; + int32_t positions[3] = {0, 0, 0}; int32_t last_errors[3] = {0, 0, 0}; - uint16_t prev_positions[3] = {0, 0, 0}; + int32_t prev_positions[3] = {0, 0, 0}; int32_t integ[3] = {0, 0, 0}; @@ -32,20 +32,36 @@ static msg_t ThreadSpeedController(void *arg) { while (TRUE) { time += MS2ST(Tcomp); - prev_positions[0] = getEncoderPosition(ENCODER1); - prev_positions[1] = getEncoderPosition(ENCODER2); - prev_positions[2] = getEncoderPosition(ENCODER3); + prev_positions[0] = (int32_t)getEncoderPosition(ENCODER1); + prev_positions[1] = (int32_t)getEncoderPosition(ENCODER2); + prev_positions[2] = (int32_t)getEncoderPosition(ENCODER3); - time += MS2ST(Te-Tcomp); chThdSleepUntil(time); + time += MS2ST(Te-Tcomp); - positions[0] = getEncoderPosition(ENCODER1); - positions[1] = getEncoderPosition(ENCODER2); - positions[2] = getEncoderPosition(ENCODER3); - - cur_speeds[0] = (K_v*((int32_t)positions[0] - (int32_t)prev_positions[0])); - cur_speeds[1] = (K_v*((int32_t)positions[1] - (int32_t)prev_positions[1])); - cur_speeds[2] = (K_v*((int32_t)positions[2] - (int32_t)prev_positions[2])); + positions[0] = (int32_t)getEncoderPosition(ENCODER1); + positions[1] = (int32_t)getEncoderPosition(ENCODER2); + positions[2] = (int32_t)getEncoderPosition(ENCODER3); + + // we MUST consider counter wrapping + cur_speeds[0] = positions[0] - prev_positions[0]; + if (cur_speeds[0] >= 10000) + cur_speeds[0] -= 65536; + else if (cur_speeds[0] <= -10000) + cur_speeds[0] += 65536; + cur_speeds[0] *= K_v; + cur_speeds[1] = positions[1] - prev_positions[1]; + if (cur_speeds[1] >= 10000) + cur_speeds[1] -= 65536; + else if (cur_speeds[1] <= -10000) + cur_speeds[1] += 65536; + cur_speeds[1] *= K_v; + cur_speeds[2] = positions[2] - prev_positions[2]; + if (cur_speeds[2] >= 10000) + cur_speeds[2] -= 65536; + else if (cur_speeds[2] <= -10000) + cur_speeds[2] += 65536; + cur_speeds[2] *= K_v; errors[0] = ref_speeds[0] - cur_speeds[0]; errors[1] = ref_speeds[1] - cur_speeds[1]; @@ -68,6 +84,8 @@ static msg_t ThreadSpeedController(void *arg) { else if (integ[2] < -INTEG_MAX) integ[2] = -INTEG_MAX; + chThdSleepUntil(time); + //--> Command computation commands[0] = (K_P*errors[0] + K_I*integ[0])/100; commands[1] = (K_P*errors[1] + K_I*integ[1])/100; @@ -81,12 +99,6 @@ static msg_t ThreadSpeedController(void *arg) { motorSetSpeed(MOTOR1, commands[0]); motorSetSpeed(MOTOR2, commands[1]); motorSetSpeed(MOTOR3, commands[2]); - - prev_positions[0] = positions[0]; - prev_positions[1] = positions[1]; - prev_positions[2] = positions[2]; - - chThdSleepUntil(time); } return 0; } @@ -99,7 +111,9 @@ void speedControlInit(void) { enableMotor(MOTOR1 | MOTOR2 | MOTOR3); motorSetSpeed(MOTOR1 | MOTOR2 | MOTOR3, 0); - resetEncoderPosition(ENCODER1 | ENCODER2 | ENCODER3); + resetEncoderPosition(ENCODER1); + resetEncoderPosition(ENCODER2); + resetEncoderPosition(ENCODER3); chThdCreateStatic(waThreadSC, sizeof(waThreadSC), HIGHPRIO, ThreadSpeedController, NULL); } hooks/post-receive -- krobot |
From: Xavier L. <Ba...@us...> - 2010-05-22 11:58:23
|
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 1c622c29659ace246c78926491a29bd98d75d13e (commit) via 1e0363fd488565fe530f0163a57d8312dc79d6f7 (commit) from 54d1ed6481b23cc83fc0168205a60a50e3f1e3e3 (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 1c622c29659ace246c78926491a29bd98d75d13e Author: Xavier Lagorce <Xav...@cr...> Date: Sat May 22 13:57:04 2010 +0200 Minor corrections to GPIO init and there was a remaining statement from the past which was making motor control foobar commit 1e0363fd488565fe530f0163a57d8312dc79d6f7 Author: Xavier Lagorce <Xav...@cr...> Date: Fri May 21 22:55:31 2010 +0200 Changed controller computation method. This one works better and offers better control over the integrator saturation Controller constants are tuned for KrobotJr ----------------------------------------------------------------------- Changes: diff --git a/elec/boards/Controller_HolonomicDrive/Firmware/motor.c b/elec/boards/Controller_HolonomicDrive/Firmware/motor.c index 7972948..00c2f1f 100644 --- a/elec/boards/Controller_HolonomicDrive/Firmware/motor.c +++ b/elec/boards/Controller_HolonomicDrive/Firmware/motor.c @@ -57,6 +57,7 @@ void motorsInit(void) { GPIO_InitTypeDef GPIO_InitStructure; //Enable GPIOB and GPIOC clock + RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE); RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE); RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC, ENABLE); @@ -79,8 +80,8 @@ void motorsInit(void) { // IN2 PC8 // PWM PA3 // IND PC9 - GPIO_InitStructure.GPIO_Pin = (GPIO_Pin_0 | GPIO_Pin_2 | GPIO_Pin_3 | GPIO_Pin_5 | GPIO_Pin_6 - | GPIO_Pin_7 | GPIO_Pin_8 | GPIO_Pin_9 | GPIO_Pin_10 | GPIO_Pin_13); + GPIO_InitStructure.GPIO_Pin = (GPIO_Pin_0 | GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_3 | GPIO_Pin_5 | GPIO_Pin_6 + | GPIO_Pin_7 | GPIO_Pin_8 | GPIO_Pin_9 | GPIO_Pin_10); GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_Init(GPIOC, &GPIO_InitStructure); @@ -94,8 +95,8 @@ void motorsInit(void) { // Default value of H-Bridge configuration GPIO_ResetBits(GPIOB, GPIO_Pin_0 | GPIO_Pin_1); - GPIO_ResetBits(GPIOC, GPIO_Pin_0 | GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_6 | GPIO_Pin_7 | GPIO_Pin_8 | GPIO_Pin_10 - | GPIO_Pin_3 | GPIO_Pin_9 | GPIO_Pin_13); + GPIO_ResetBits(GPIOC, GPIO_Pin_0 | GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_6 | GPIO_Pin_7 + | GPIO_Pin_8 | GPIO_Pin_10); // TimeBase configuration TIM_TimeBaseStructure.TIM_Prescaler = (uint16_t) (72000000 / 72000000) - 1;; @@ -258,7 +259,7 @@ void motorSetSpeed(uint8_t motor, int32_t speed) { GPIO_SetBits(GPIOC, GPIO_Pin_7); GPIO_ResetBits(GPIOC, GPIO_Pin_8); } - TIM_SetCompare3(TIM2, (uint16_t)(-speed)); + TIM_OCInitStructure.TIM_Pulse = (uint16_t)(-speed); } TIM_OC4Init(TIM2, &TIM_OCInitStructure); TIM_OC4PreloadConfig(TIM2, TIM_OCPreload_Enable); diff --git a/elec/boards/Controller_HolonomicDrive/Firmware/speed_control.c b/elec/boards/Controller_HolonomicDrive/Firmware/speed_control.c index b689068..10f186a 100644 --- a/elec/boards/Controller_HolonomicDrive/Firmware/speed_control.c +++ b/elec/boards/Controller_HolonomicDrive/Firmware/speed_control.c @@ -22,8 +22,8 @@ static msg_t ThreadSpeedController(void *arg) { int32_t errors[3] = {0, 0, 0}; uint16_t positions[3] = {0, 0, 0}; int32_t last_errors[3] = {0, 0, 0}; - int32_t last_commands[3] = {0, 0, 0}; uint16_t prev_positions[3] = {0, 0, 0}; + int32_t integ[3] = {0, 0, 0}; (void)arg; @@ -51,35 +51,29 @@ static msg_t ThreadSpeedController(void *arg) { errors[1] = ref_speeds[1] - cur_speeds[1]; errors[2] = ref_speeds[2] - cur_speeds[2]; + integ[0] += (errors[0] + last_errors[0])*Te/2; + integ[1] += (errors[1] + last_errors[1])*Te/2; + integ[2] += (errors[2] + last_errors[2])*Te/2; + + if (integ[0] > INTEG_MAX) + integ[0] = INTEG_MAX; + else if (integ[0] < -INTEG_MAX) + integ[0] = -INTEG_MAX; + if (integ[1] > INTEG_MAX) + integ[1] = INTEG_MAX; + else if (integ[1] < -INTEG_MAX) + integ[1] = -INTEG_MAX; + if (integ[2] > INTEG_MAX) + integ[2] = INTEG_MAX; + else if (integ[2] < -INTEG_MAX) + integ[2] = -INTEG_MAX; + //--> Command computation - commands[0] = ((K_Pn + K_In)*errors[0] - K_Pn*last_errors[0] + 100*last_commands[0])/100; - commands[1] = ((K_Pn + K_In)*errors[1] - K_Pn*last_errors[1] + 100*last_commands[1])/100; - commands[2] = ((K_Pn + K_In)*errors[2] - K_Pn*last_errors[2] + 100*last_commands[2])/100; + commands[0] = (K_P*errors[0] + K_I*integ[0])/100; + commands[1] = (K_P*errors[1] + K_I*integ[1])/100; + commands[2] = (K_P*errors[2] + K_I*integ[2])/100; //--> End of command computation - if (commands[0] >= 0) - commands[0] = MIN(MAX_COMMAND, commands[0]); - else - commands[0] = MAX(-MAX_COMMAND, commands[0]); - if (commands[1] >= 0) - commands[1] = MIN(MAX_COMMAND, commands[1]); - else - commands[1] = MAX(-MAX_COMMAND, commands[1]); - if (commands[2] >= 0) - commands[2] = MIN(MAX_COMMAND, commands[2]); - else - commands[2] = MAX(-MAX_COMMAND, commands[2]); - - last_commands[0] = commands[0]; - last_commands[1] = commands[1]; - last_commands[2] = commands[2]; - - if (commands[0] >= -DEAD_ZONE && commands[0] <= DEAD_ZONE) - commands[0] = 0; - if (commands[1] >= -DEAD_ZONE && commands[1] <= DEAD_ZONE) - commands[1] = 0; - if (commands[2] >= -DEAD_ZONE && commands[2] <= DEAD_ZONE) - commands[2] = 0; last_errors[0] = errors[0]; last_errors[1] = errors[1]; last_errors[2] = errors[2]; diff --git a/elec/boards/Controller_HolonomicDrive/Firmware/speed_control.h b/elec/boards/Controller_HolonomicDrive/Firmware/speed_control.h index 9354b1b..3017066 100644 --- a/elec/boards/Controller_HolonomicDrive/Firmware/speed_control.h +++ b/elec/boards/Controller_HolonomicDrive/Firmware/speed_control.h @@ -6,17 +6,14 @@ #ifndef HEADER__SPEEDCONTROL #define HEADER__SPEEDCONTROL -#define K_P 80 -#define K_I 1 -#define Tcomp 100 // speed will be computed on a Tcomp timesample -#define Te 110 +#define K_P 150 +#define K_I 3 +#define Tcomp 40 // speed will be computed on a Tcomp timesample +#define Te 50 #define K_v (1000/Tcomp) -#define K_Pn K_P -#define K_In 10//(K_I)*Te -#define DEAD_ZONE 0 -#define MAX_COMMAND 3600 +#define INTEG_MAX 20000 #include "ch.h" #include "motor.h" hooks/post-receive -- krobot |
From: Jérémie D. <Ba...@us...> - 2010-05-21 20:30:29
|
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 54d1ed6481b23cc83fc0168205a60a50e3f1e3e3 (commit) via 388c7859e24d2a860b24b94f1fc2b072fd6b1c40 (commit) via a47e6014bed09e50501f3e7e40678bf261d4837b (commit) via 27f74d0ec09a3eb55ddc145e8ea3443d4f4b4ef3 (commit) from e4676289e7990e6c6a086cf1597d4faf40df304f (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 54d1ed6481b23cc83fc0168205a60a50e3f1e3e3 Author: Jérémie Dimino <je...@di...> Date: Fri May 21 22:29:40 2010 +0200 use the scanner for taking ears in the ia commit 388c7859e24d2a860b24b94f1fc2b072fd6b1c40 Author: Jérémie Dimino <je...@di...> Date: Fri May 21 22:28:09 2010 +0200 more tests for the infrared scanner commit a47e6014bed09e50501f3e7e40678bf261d4837b Author: [Kro]bot <kr...@wa...> Date: Fri May 21 22:13:35 2010 +0200 enhancement of the infrared scanner commit 27f74d0ec09a3eb55ddc145e8ea3443d4f4b4ef3 Author: Jérémie Dimino <je...@di...> Date: Thu May 20 23:16:09 2010 +0200 fix infrared number for the scan ----------------------------------------------------------------------- Changes: diff --git a/info/control/clients/ia.ml b/info/control/clients/ia.ml index dee979e..0da42ae 100644 --- a/info/control/clients/ia.ml +++ b/info/control/clients/ia.ml @@ -12,7 +12,7 @@ open Krobot_move let section = Lwt_log.Section.make "ia" -let velocity = 400 +let velocity = 100 let acceleration = 800 (* +-----------------------------------------------------------------+ @@ -162,7 +162,9 @@ let rec goto krobot state dest = return state else let next = Krobot_move.next graph state.position dest in + lwt () = Lwt_log.info_f "next position: (%d, %d)" next.vx next.vy in let angle, distance, state' = Krobot_move.move state next in + lwt () = Lwt_log.info_f "angle: %d, distance: %d, new state: position: (%d, %d), oritentation: %d" angle distance state'.position.vx state'.position.vy state'.orientation in lwt () = if angle <> 0 then lwt _ = Krobot.Motors.turn krobot ~angle ~velocity ~acceleration in @@ -202,10 +204,58 @@ let take_ear krobot state ear = in return { state with orientation = 180 } in - lwt () = try_lwt Krobot.Grip.down krobot with _ -> return () in - lwt () = try_lwt Krobot.Grip.open_ krobot with _ -> return () in - lwt _ = Krobot.Motors.move krobot ~distance:85 ~velocity ~acceleration in - lwt () = try_lwt Krobot.Grip.close krobot with _ -> return () in + lwt _ = Krobot.Motors.move krobot ~distance:100 ~velocity ~acceleration in + let pi = 4.0 *. atan 1.0 in + let sqr x = x *. x in + let scan () = + lwt pts = Krobot.Infrared.scan krobot in + let dist_min = List.fold_left (fun dist_min (angle, dist) -> + if dist >= 0 && dist <= 130 && dist < dist_min then + dist + else + dist_min) max_int pts in + let pts = List.filter (fun (a, d) -> d >= 0 && d <= 130 && d < dist_min + 10) pts in + lwt () = + Lwt_list.iter_s + (fun (angle, dist) -> + Lwt_io.printlf "angle = %d, distance = %d" angle dist) + pts + in + if dist_min = max_int then + lwt () = Lwt_io.printl "no ears found" in + exit 2 + else begin + let mean = float_of_int (List.fold_left (fun acc (a, d) -> acc + a) 0 pts) /. float_of_int (List.length pts) in + lwt () = Lwt_io.printlf "ears found at angle = %f, distance = %d" mean dist_min in + let alpha = mean /. 180.0 *. pi and d = float_of_int dist_min +. 60.0 +. 25.0 in + let a = d *. cos alpha +. 270.0 and b = d *. sin alpha in + let b = + if b < -25.0 then + b -. 25.0 + else if b <= 0.0 && b >= -25.0 then + 25.0 -. b + else + b +. 25.0 + in + let beta = atan(b /. a) in + let c = sqrt (sqr a +. sqr b) in + let e = c -. 270.0 -. 110.0 in + let beta = beta /. pi *. 180.0 in + lwt () = Lwt_io.printlf "a = %f, b = %f, c = %f" a b c in + lwt () = Lwt_io.printlf "turn: %f, move: %f" beta e in + return (beta, e) + end + in + lwt a, d = scan () in + lwt _ = Krobot.Motors.turn krobot ~angle:(-(truncate a)) ~velocity ~acceleration in + lwt a, d = scan () in + lwt _ = Krobot.Motors.turn krobot ~angle:(truncate a) ~velocity ~acceleration in + lwt _ = Krobot.Motors.move krobot ~distance:(truncate d) ~velocity ~acceleration in + lwt _ = Krobot.Motors.move krobot ~distance:(-100) ~velocity ~acceleration in + lwt () = Krobot.Grip.down krobot in + lwt () = Krobot.Grip.open_ krobot in + lwt _ = Krobot.Motors.move krobot ~distance:80 ~velocity ~acceleration in + lwt () = Krobot.Grip.close krobot in lwt () = try_lwt Krobot.Grip.up krobot >> Krobot.Grip.release krobot with _ -> return () and _ = Krobot.Motors.move krobot ~distance:(-85) ~velocity ~acceleration in return state diff --git a/info/control/driver/driver.ml b/info/control/driver/driver.ml index 08a8f59..09fcb87 100644 --- a/info/control/driver/driver.ml +++ b/info/control/driver/driver.ml @@ -318,6 +318,9 @@ type ax12_action = { aa_velocity : int; } +let get_ax12 id = + USBCard.call Commands.AX12.get_position (get_card card_interface) (id, 1000) + let set_ax12 actions = lwt () = Lwt_list.iter_p @@ -335,7 +338,7 @@ let set_ax12 actions = lwt delta = Lwt_list.fold_left_s (fun delta action -> - lwt pos = USBCard.call Commands.AX12.get_position (get_card card_interface) (action.aa_id, 32000) in + lwt pos = get_ax12 action.aa_id in return (max delta (abs (pos - action.aa_position)))) 0 actions in @@ -498,17 +501,17 @@ struct let go_left () = set_ax12 [{ aa_id = 1; aa_position = pos_left; - aa_velocity = 200 }] + aa_velocity = 0 }] let go_right () = set_ax12 [{ aa_id = 1; aa_position = pos_right; - aa_velocity = 200 }] + aa_velocity = 0 }] let go_center () = set_ax12 [{ aa_id = 1; aa_position = pos_90_degree; - aa_velocity = 200 }] + aa_velocity = 0 }] (* +---------------------------------------------------------------+ | Calibration data | @@ -578,28 +581,32 @@ struct | Scanning | +---------------------------------------------------------------+ *) - let step = 10 + let step = 5 let scan () = - lwt () = go_left () in - lwt () = Lwt_unix.sleep 1.5 in - let rec loop pos acc = - if pos <= pos_right then - return acc + lwt pos = get_ax12 1 in + lwt t = + if pos >= pos_90_degree then + lwt () = go_left () in + return (set_ax12 [{ aa_id = 1; aa_position = pos_right; aa_velocity = 100 }]) + else + lwt () = go_right () in + return (set_ax12 [{ aa_id = 1; aa_position = pos_left; aa_velocity = 100 }]) + in + let rec loop acc = + if state t <> Sleep then + return acc else begin + lwt pos = get_ax12 1 in + lwt () = Lwt_unix.sleep 0.1 in let infrareds = React.S.value states in - let i1 = infrareds.(2) in + let i1 = infrareds.(0) in let dist1 = distance !data1 i1 and angle = (pos_90_degree - pos) * 90 / (pos_90_degree - pos_0_degree) in - let pos = pos - step in - lwt () = set_ax12 [{ aa_id = 1; - aa_position = pos; - aa_velocity = 200 }] in - lwt () = Lwt_unix.sleep 0.05 in - loop pos ((angle, dist1) :: acc) + loop ((angle, dist1) :: acc) end in - loop pos_left [] + loop [] let () = OBus_object.add_interfaces obus diff --git a/info/control/tests/scan_infrared.ml b/info/control/tests/scan_infrared.ml index bade5cf..59de9db 100644 --- a/info/control/tests/scan_infrared.ml +++ b/info/control/tests/scan_infrared.ml @@ -10,7 +10,7 @@ open Lwt let rec print krobot infrared = - lwt pos = Krobot.unsafe_call Commands.AX12.get_position krobot (1, 100) in + lwt pos = Krobot.unsafe_call Commands.AX12.get_position krobot (1, 1000) in let is = React.S.value infrared in lwt () = Lwt_io.printlf "position: %3d, %4d %4d %4d %4d" pos is.(0) is.(1) is.(2) is.(3) in lwt () = Lwt_unix.sleep 0.2 in @@ -18,15 +18,25 @@ let rec print krobot infrared = let delay = 1.5 +let goto krobot pos = + let rec loop () = + lwt pos' = Krobot.unsafe_call Commands.AX12.get_position krobot (1, 1000) in + lwt () = Lwt_unix.sleep 0.1 in + if abs (pos - pos') < 10 then + return () + else + loop () + in + lwt () = Krobot.unsafe_call Commands.AX12.goto krobot (1, pos, 100, `Now) in + loop () + lwt () = lwt krobot = Krobot.create () in let rec loop1 () = - lwt () = Krobot.Infrared.go_left krobot in - lwt () = Lwt_unix.sleep delay in + lwt () = goto krobot 750 in loop2 () and loop2 () = - lwt () = Krobot.Infrared.go_right krobot in - lwt () = Lwt_unix.sleep delay in + lwt () = goto krobot 250 in loop1 () in lwt infrared = OBus_property.monitor (Krobot.Infrared.states krobot) in diff --git a/info/control/tests/take_ear_with_infrared.ml b/info/control/tests/take_ear_with_infrared.ml new file mode 100644 index 0000000..6a48e1f --- /dev/null +++ b/info/control/tests/take_ear_with_infrared.ml @@ -0,0 +1,75 @@ +(* + * take_ear_with_infrared.ml + * ------------------------- + * Copyright : (c) 2010, Jeremie Dimino <je...@di...> + * Licence : BSD3 + * + * This file is a part of [kro]bot. + *) + +(* Scan the front of the robot to find an ear, then take it *) + +open Lwt + +let pi = 4.0 *. atan 1.0 +let sqr x = x *. x + +let pos_90_degree = 515 +let pos_0_degree = 205 + +lwt () = + lwt krobot = Krobot.create () in + let prout () = + lwt pts = Krobot.Infrared.scan krobot in + let dist_min = List.fold_left (fun dist_min (angle, dist) -> + if dist >= 0 && dist <= 130 && dist < dist_min then + dist + else + dist_min) max_int pts in + let pts = List.filter (fun (a, d) -> d >= 0 && d <= 130 && d < dist_min + 10) pts in + lwt () = + Lwt_list.iter_s + (fun (angle, dist) -> + Lwt_io.printlf "angle = %d, distance = %d" angle dist) + pts + in + if dist_min = max_int then + lwt () = Lwt_io.printl "no ears found" in + exit 2 + else begin + let mean = float_of_int (List.fold_left (fun acc (a, d) -> acc + a) 0 pts) /. float_of_int (List.length pts) in + lwt () = Lwt_io.printlf "ears found at angle = %f, distance = %d" mean dist_min in + lwt () = Krobot.unsafe_call Commands.AX12.goto krobot (1, pos_90_degree - (truncate mean * (pos_90_degree - pos_0_degree) / 90), 0, `Now) in + let alpha = mean /. 180.0 *. pi and d = float_of_int dist_min +. 60.0 +. 25.0 in + let a = d *. cos alpha +. 270.0 and b = d *. sin alpha in + let b = + if b < -25.0 then + b -. 25.0 + else if b <= 0.0 && b >= -25.0 then + 25.0 -. b + else + b +. 25.0 + in + let beta = atan(b /. a) in + let c = sqrt (sqr a +. sqr b) in + let e = c -. 270.0 -. 110.0 in + let beta = beta /. pi *. 180.0 in + lwt () = Lwt_io.printlf "a = %f, b = %f, c = %f" a b c in + lwt () = Lwt_io.printlf "turn: %f, move: %f" beta e in + return (beta, e) + end + in + lwt a, d = prout () in + let velocity = 400 and acceleration = 800 in + lwt _ = Krobot.Motors.turn krobot ~angle:(-(truncate a)) ~velocity ~acceleration in + lwt a, d = prout () in + lwt _ = Krobot.Motors.turn krobot ~angle:(truncate a) ~velocity ~acceleration in + lwt _ = Krobot.Motors.move krobot ~distance:(truncate d) ~velocity ~acceleration in + lwt _ = Krobot.Motors.move krobot ~distance:(-100) ~velocity ~acceleration in + lwt () = Krobot.Grip.down krobot in + lwt () = Krobot.Grip.open_ krobot in + lwt _ = Krobot.Motors.move krobot ~distance:80 ~velocity ~acceleration in + lwt () = Krobot.Grip.close krobot in + lwt _ = Krobot.Grip.up krobot in + return () + hooks/post-receive -- krobot |
From: Jérémie D. <Ba...@us...> - 2010-05-20 20:42:33
|
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 e4676289e7990e6c6a086cf1597d4faf40df304f (commit) from f8f0962c983e01f45754512fef21d92a6f72a32a (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 e4676289e7990e6c6a086cf1597d4faf40df304f Author: Jérémie Dimino <je...@di...> Date: Thu May 20 22:37:44 2010 +0200 better handling of driver exit ----------------------------------------------------------------------- Changes: diff --git a/info/control/driver/driver.ml b/info/control/driver/driver.ml index 2a3320d..08a8f59 100644 --- a/info/control/driver/driver.ml +++ b/info/control/driver/driver.ml @@ -16,6 +16,8 @@ open Lwt module String_map = Map.Make(String) +let quit = ref false + (* +-----------------------------------------------------------------+ | Cards | +-----------------------------------------------------------------+ *) @@ -103,15 +105,21 @@ let poll card ?(update_delay=Config.update_delay) initial get = lwt x = get usb_card in set_value x; return () - with exn -> - lwt () = Lwt_log.error_f ~section ~exn "reading from card %s failed with" card.card_name in - return () + with + | USBCard.Card_closed when !quit -> + return () + | exn -> + lwt () = Lwt_log.error_f ~section ~exn "reading from card %s failed with" card.card_name in + return () end | None -> return () in lwt () = Lwt_unix.sleep update_delay in - loop () + if !quit then + return () + else + loop () in ignore (loop ()); value @@ -1125,7 +1133,6 @@ end +-----------------------------------------------------------------+ *) let done_waiter, done_wakener = Lwt.wait () -let quit = ref false module Manager = struct @@ -1142,13 +1149,16 @@ struct let shutdown ctx manager = lwt () = Lwt_log.info ~section "exiting" in quit := true; - lwt () = close card_interface - and () = close card_sensor - and () = close card_motor - and () = close card_monitoring in - lwt _ = OBus_bus.release_name (OBus_context.connection ctx) "fr.krobot.Driver" in - Lwt.wakeup done_wakener (); - return () + try_lwt + lwt () = close card_interface + and () = close card_sensor + and () = close card_motor + and () = close card_monitoring in + lwt _ = OBus_bus.release_name (OBus_context.connection ctx) "fr.krobot.Driver" in + return () + finally + Lwt.wakeup done_wakener (); + return () let services_status = React.S.map @@ -1283,7 +1293,7 @@ let rec monitor_card ~name ~vendor_id ~product_id ~set on_up on_down = lwt () = Lwt_log.info_f ~section "%s card is up and running" name in set (Some card); lwt () = on_up card in - lwt result = USBCard.watch card in + lwt result = try_lwt USBCard.watch card with exn -> return (`Error exn) in set None; lwt () = on_down () in lwt () = @@ -1318,7 +1328,7 @@ let rec monitor_rx64 ~name ~path ~rate ~set on_up on_down = lwt () = Lwt_log.info_f ~section "%s card is up and running" name in set (Some card); lwt () = on_up card in - lwt result = RX64Card.watch card in + lwt result = try_lwt RX64Card.watch card with exn -> return (`Error exn) in set None; lwt () = on_down () in lwt () = hooks/post-receive -- krobot |
From: Jérémie D. <Ba...@us...> - 2010-05-20 19:56:02
|
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 f8f0962c983e01f45754512fef21d92a6f72a32a (commit) from 3203ee03ae548651c179d42d530326159cfa862e (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 f8f0962c983e01f45754512fef21d92a6f72a32a Author: [Kro]bot <kr...@wa...> Date: Thu May 20 21:41:40 2010 +0200 add some missing ~section ----------------------------------------------------------------------- Changes: diff --git a/info/control/driver/driver.ml b/info/control/driver/driver.ml index b3568d0..2a3320d 100644 --- a/info/control/driver/driver.ml +++ b/info/control/driver/driver.ml @@ -104,7 +104,7 @@ let poll card ?(update_delay=Config.update_delay) initial get = set_value x; return () with exn -> - lwt () = Lwt_log.error_f ~exn "reading from card %s failed with" card.card_name in + lwt () = Lwt_log.error_f ~section ~exn "reading from card %s failed with" card.card_name in return () end | None -> @@ -1352,7 +1352,7 @@ lwt () = let usage_msg = Printf.sprintf "Usage: %s [-n]\n\noptions are:" (Filename.basename (Sys.argv.(0))) in Arg.parse args ignore usage_msg; - lwt () = Lwt_log.notice_f "loading infrareds calibration data from %S" !Infrared.data_file in + lwt () = Lwt_log.notice_f ~section "loading infrareds calibration data from %S" !Infrared.data_file in lwt () = Infrared.reload_config () in (* Open the krobot message bus *) hooks/post-receive -- krobot |
From: Jérémie D. <Ba...@us...> - 2010-05-20 19:54:39
|
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 3203ee03ae548651c179d42d530326159cfa862e (commit) from 4d68c289e5743915edea6f7b24a9a27af6b7dd25 (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 3203ee03ae548651c179d42d530326159cfa862e Author: Jérémie Dimino <je...@di...> Date: Thu May 20 21:53:04 2010 +0200 request the driver name by hand There is already a mechanism to handle driver restart, no need for Util.single_instance ----------------------------------------------------------------------- Changes: diff --git a/info/control/driver/driver.ml b/info/control/driver/driver.ml index ae34e5b..b3568d0 100644 --- a/info/control/driver/driver.ml +++ b/info/control/driver/driver.ml @@ -1361,13 +1361,8 @@ lwt () = lwt () = try_lwt lwt () = Lwt_log.info ~section "Killing any running driver" in - OBus_proxy.call - (OBus_proxy.make (OBus_peer.make bus "fr.krobot.Driver") ["fr"; "krobot"; "Manager"]) - ~interface:"fr.krobot.Manager" - ~member:"Shutdown" - ~i_args:OBus_value.C.seq0 - ~o_args:OBus_value.C.seq0 - () + let proxy = OBus_proxy.make (OBus_peer.make bus "fr.krobot.Driver") ["fr"; "krobot"; "Manager"] in + OBus_method.call Krobot_interfaces.Fr_krobot_Manager.m_Shutdown proxy () with OBus_error.DBus((OBus_bus.Service_unknown | OBus_error.No_reply), _, _) -> return () in @@ -1376,7 +1371,14 @@ lwt () = return () else begin - lwt () = Util.single_instance bus "fr.krobot.Driver" in + lwt () = + OBus_bus.request_name bus ~allow_replacement:true ~replace_existing:true "fr.krobot.Driver" >>= function + | `Primary_owner -> + return () + | _ -> + lwt () = Lwt_log.info ~section "cannot get the fr.krobot.Driver name, exiting" in + exit 1 + in lwt () = if !foreground then hooks/post-receive -- krobot |
From: Xavier L. <Ba...@us...> - 2010-05-20 19:32:08
|
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 4d68c289e5743915edea6f7b24a9a27af6b7dd25 (commit) from 01c6c4d6b738786e36dce17f38467fc1e0c72fd7 (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 4d68c289e5743915edea6f7b24a9a27af6b7dd25 Author: Xavier Lagorce <Xav...@cr...> Date: Thu May 20 21:31:17 2010 +0200 Added correct binaries for the Robot Interface Firmware ----------------------------------------------------------------------- Changes: diff --git a/elec/boards/Interface_Robot/Firmware/output/Robot_Interface.cof b/elec/boards/Interface_Robot/Firmware/output/Robot_Interface.cof index 284d606..391e30b 100644 Binary files a/elec/boards/Interface_Robot/Firmware/output/Robot_Interface.cof and b/elec/boards/Interface_Robot/Firmware/output/Robot_Interface.cof differ diff --git a/elec/boards/Interface_Robot/Firmware/output/Robot_Interface.hex b/elec/boards/Interface_Robot/Firmware/output/Robot_Interface.hex index e96fbb5..dcf9d8a 100644 --- a/elec/boards/Interface_Robot/Firmware/output/Robot_Interface.hex +++ b/elec/boards/Interface_Robot/Firmware/output/Robot_Interface.hex @@ -559,7 +559,7 @@ :102A700018E20001865104E00001A76B010E16D098 :102A80000000000000000000000000000000000046 :102A90000000000000000000DF2A010E01E3DB2A35 -:102AA000D9D70001010EA76F2A0E00D0006E020ECA +:102AA000D9D70001010EA76F000E00D0006E020EF4 :102AB000E15C02E2E16AE552E16E0050E552E7CFE7 :102AC000D9FF120060D9E66A060E07D920D123D9B2 :102AD000030E03D91CD107D970D902E2E16AE5528D @@ -979,8 +979,8 @@ :10439000DAFFFD0EDB50C96EC6AE02D0FF0E09D0AB :1043A000C7B0FED722EC23F0C5AC02D0FE0E01D080 :0E43B000000EE552E5CFDAFFE7CFD9FF12008D -:0243BE00313993 -:1043C0003A33333A32370020004D617920313620BC +:0243BE0032319A +:1043C0003A33303A30340020004D617920323020C9 :1043D0003230313000526F626F7420496E746572F2 :1043E0006661636520312E300A4F6C6976696572AB :0943F00020424943484C455200AB diff --git a/elec/boards/Interface_Robot/Firmware/output/Robot_Interface.map b/elec/boards/Interface_Robot/Firmware/output/Robot_Interface.map index 50e7e39..6cd2ac0 100644 --- a/elec/boards/Interface_Robot/Firmware/output/Robot_Interface.map +++ b/elec/boards/Interface_Robot/Firmware/output/Robot_Interface.map @@ -1,5 +1,5 @@ MPLINK 4.21, Linker -Linker Map File - Created Sun May 16 19:49:05 2010 +Linker Map File - Created Thu May 20 21:30:18 2010 Section Info Section Type Address Location Size(Bytes) @@ -223,7 +223,7 @@ REMAPPED_LOW_INTERRUPT_VECTOR code 0x000818 program 0x000006 Symbols - Sorted by Name Name Address Location Storage File --------- --------- --------- --------- --------- - BlinkUSBStatus 0x0018ca program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c + BlinkUSBStatus 0x0018ca program extern Z:\elec\boards\Interface_Robot\Firmware\main.c BusyADC 0x004660 program extern C:\MCC18\src\pmc_common\ADC\adcbusy.c CloseI2C 0x00466a program extern C:\MCC18\src\pmc_common\i2c\i2c_clos.c D10K_1 0x0045b0 program static C:\MCC18\src\traditional\delays\d10ktcyx.asm @@ -245,12 +245,12 @@ REMAPPED_LOW_INTERRUPT_VECTOR code 0x000818 program 0x000006 FPS32 0x002e64 program extern C:\MCC18\src\traditional\math\addFP.asm FXD3232U 0x0042b6 program extern C:\MCC18\src\traditional\math\fxd3232u.c FXM1616U 0x003112 program extern C:\MCC18\src\traditional\math\fxm1616u.asm - High_ISR 0x000008 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c + High_ISR 0x000008 program extern Z:\elec\boards\Interface_Robot\Firmware\main.c INT3216 0x00314e program extern C:\MCC18\src\traditional\math\castFP16.asm INT3232 0x0031ac program extern C:\MCC18\src\traditional\math\castFP32.asm IdleI2C 0x004644 program extern C:\MCC18\src\pmc_common\i2c\i2c_idle.c - InitializeSystem 0x000984 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c - Low_ISR 0x000018 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c + InitializeSystem 0x000984 program static Z:\elec\boards\Interface_Robot\Firmware\main.c + Low_ISR 0x000018 program extern Z:\elec\boards\Interface_Robot\Firmware\main.c OpenADC 0x004112 program extern C:\MCC18\src\pmc_common\ADC\adcopen.c OpenI2C 0x0044d8 program extern C:\MCC18\src\pmc_common\i2c\i2c_open.c OpenPWM1 0x004544 program extern C:\MCC18\src\pmc_common\PWM\pw1open.c @@ -259,58 +259,58 @@ REMAPPED_LOW_INTERRUPT_VECTOR code 0x000818 program 0x000006 OpenTimer2 0x0044a2 program extern C:\MCC18\src\pmc_common\Timers\t2open.c OpenTimer3 0x0042fe program extern C:\MCC18\src\pmc_common\Timers\t3open.c OpenUSART 0x004012 program extern C:\MCC18\src\pmc_common\USART\uopen.c - ProcessIO 0x000a12 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c + ProcessIO 0x000a12 program extern Z:\elec\boards\Interface_Robot\Firmware\main.c ReadADC 0x004632 program extern C:\MCC18\src\pmc_common\ADC\adcread.c - ReadEEPROM 0x00422c program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\eeprom.c + ReadEEPROM 0x00422c program extern Z:\elec\boards\Interface_Robot\Firmware\eeprom.c ReadUSART 0x004344 program extern C:\MCC18\src\pmc_common\USART\uread.c - Remapped_High_ISR 0x000808 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c - Remapped_Low_ISR 0x000818 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c - ResetSource 0x001ae2 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c + Remapped_High_ISR 0x000808 program extern Z:\elec\boards\Interface_Robot\Firmware\main.c + Remapped_Low_ISR 0x000818 program extern Z:\elec\boards\Interface_Robot\Firmware\main.c + ResetSource 0x001ae2 program extern Z:\elec\boards\Interface_Robot\Firmware\main.c SelChanConvADC 0x004574 program extern C:\MCC18\src\pmc_common\ADC\adcselchconv.c SetDCPWM1 0x004258 program extern C:\MCC18\src\pmc_common\PWM\pw1setdc.c - USBCBCheckOtherReq 0x0019f2 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c - USBCBErrorHandler 0x0019f0 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c - USBCBInitEP 0x0019f8 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c - USBCBSendResume 0x001a30 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c - USBCBStdSetDscHandler 0x0019f6 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c - USBCBSuspend 0x001948 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c - USBCBWakeFromSuspend 0x001986 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c - USBCB_SOF_Handler 0x0019ee program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c - USBCheckHIDRequest 0x003df6 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_function_hid.c - USBCheckStdRequest 0x002008 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - USBClearInterruptFlag 0x0025be program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - USBConfigureEndpoint 0x00247a program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - USBCtrlEPService 0x001e92 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - USBCtrlEPServiceComplete 0x002272 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - USBCtrlTrfInHandler 0x001f66 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - USBCtrlTrfOutHandler 0x001f4a program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - USBCtrlTrfRxService 0x00238c program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - USBCtrlTrfSetupHandler 0x001f26 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - USBCtrlTrfTxService 0x0022e6 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - USBDeviceInit 0x001cb4 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - USBDeviceTasks 0x001d20 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - USBEnableEndpoint 0x0024f2 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c -USBPrepareForNextSetupTrf 0x001fc0 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - USBStallEndpoint 0x00252c program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - USBStallHandler 0x001e42 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - USBStdFeatureReqHandler 0x0020b0 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - USBStdGetDscHandler 0x002172 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - USBStdGetStatusHandler 0x0021f4 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - USBStdSetCfgHandler 0x002444 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - USBSuspend 0x001e68 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - USBTransferOnePacket 0x002556 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - USBWakeFromSuspend 0x001e7a program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - USB_CD_Ptr 0x003f6c program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_descriptors.c - USB_SD_Ptr 0x003f6e program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_descriptors.c -USER_USB_CALLBACK_EVENT_HANDLER 0x001a4c program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c - UserInit 0x00098e program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c - WriteEEPROM 0x0041ec program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\eeprom.c + USBCBCheckOtherReq 0x0019f2 program extern Z:\elec\boards\Interface_Robot\Firmware\main.c + USBCBErrorHandler 0x0019f0 program extern Z:\elec\boards\Interface_Robot\Firmware\main.c + USBCBInitEP 0x0019f8 program extern Z:\elec\boards\Interface_Robot\Firmware\main.c + USBCBSendResume 0x001a30 program extern Z:\elec\boards\Interface_Robot\Firmware\main.c + USBCBStdSetDscHandler 0x0019f6 program extern Z:\elec\boards\Interface_Robot\Firmware\main.c + USBCBSuspend 0x001948 program extern Z:\elec\boards\Interface_Robot\Firmware\main.c + USBCBWakeFromSuspend 0x001986 program extern Z:\elec\boards\Interface_Robot\Firmware\main.c + USBCB_SOF_Handler 0x0019ee program extern Z:\elec\boards\Interface_Robot\Firmware\main.c + USBCheckHIDRequest 0x003df6 program extern Z:\elec\boards\Interface_Robot\Firmware\usb_function_hid.c + USBCheckStdRequest 0x002008 program extern Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + USBClearInterruptFlag 0x0025be program extern Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + USBConfigureEndpoint 0x00247a program extern Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + USBCtrlEPService 0x001e92 program extern Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + USBCtrlEPServiceComplete 0x002272 program extern Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + USBCtrlTrfInHandler 0x001f66 program extern Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + USBCtrlTrfOutHandler 0x001f4a program extern Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + USBCtrlTrfRxService 0x00238c program extern Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + USBCtrlTrfSetupHandler 0x001f26 program extern Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + USBCtrlTrfTxService 0x0022e6 program extern Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + USBDeviceInit 0x001cb4 program extern Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + USBDeviceTasks 0x001d20 program extern Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + USBEnableEndpoint 0x0024f2 program extern Z:\elec\boards\Interface_Robot\Firmware\usb_device.c +USBPrepareForNextSetupTrf 0x001fc0 program extern Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + USBStallEndpoint 0x00252c program extern Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + USBStallHandler 0x001e42 program extern Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + USBStdFeatureReqHandler 0x0020b0 program extern Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + USBStdGetDscHandler 0x002172 program extern Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + USBStdGetStatusHandler 0x0021f4 program extern Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + USBStdSetCfgHandler 0x002444 program extern Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + USBSuspend 0x001e68 program extern Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + USBTransferOnePacket 0x002556 program extern Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + USBWakeFromSuspend 0x001e7a program extern Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + USB_CD_Ptr 0x003f6c program extern Z:\elec\boards\Interface_Robot\Firmware\usb_descriptors.c + USB_SD_Ptr 0x003f6e program extern Z:\elec\boards\Interface_Robot\Firmware\usb_descriptors.c +USER_USB_CALLBACK_EVENT_HANDLER 0x001a4c program extern Z:\elec\boards\Interface_Robot\Firmware\main.c + UserInit 0x00098e program extern Z:\elec\boards\Interface_Robot\Firmware\main.c + WriteEEPROM 0x0041ec program extern Z:\elec\boards\Interface_Robot\Firmware\eeprom.c WriteI2C 0x004382 program extern C:\MCC18\src\pmc_common\i2c\i2c_writ.c WriteTimer0 0x004432 program extern C:\MCC18\src\pmc_common\Timers\t0write.c WriteTimer3 0x0043fa program extern C:\MCC18\src\pmc_common\Timers\t3write.c WriteUSART 0x0045d2 program extern C:\MCC18\src\pmc_common\USART\uwrite.c - YourHighPriorityISRCode 0x000874 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c - YourLowPriorityISRCode 0x000934 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c + YourHighPriorityISRCode 0x000874 program extern Z:\elec\boards\Interface_Robot\Firmware\main.c + YourLowPriorityISRCode 0x000934 program extern Z:\elec\boards\Interface_Robot\Firmware\main.c _2jContinue 0x0041a0 program static C:\MCC18\src\traditional\stdclib\memset.asm _3jEnd 0x0041aa program static C:\MCC18\src\traditional\stdclib\memset.asm _D10KTCYXCODE_0010 0x0045b4 program static C:\MCC18\src\traditional\delays\d10ktcyx.asm @@ -465,138 +465,138 @@ USER_USB_CALLBACK_EVENT_HANDLER 0x001a4c program extern Z:\home\nicolas ___switchexit_lbl00106 0x0016fe program static ___switchexit_lbl00153 0x001ad6 program static __init 0x00466e program extern C:\MCC18\src\traditional\stdclib\__init.c - __pa_0 0x004536 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\error.c - __pa_0 0x0038fe program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\servo.c - __pa_0 0x003bd8 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\mcc.c - __pa_0 0x003cca program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\adjd-s371.c - __pa_0 0x003d88 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\lcd.c - __pa_0 0x002cda program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\ax12.c - __pa_0 0x00368e program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\infrared.c - __pa_0 0x004248 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\eeprom.c - __pa_0 0x0025e8 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_0 0x004536 program static Z:\elec\boards\Interface_Robot\Firmware\error.c + __pa_0 0x0038fe program static Z:\elec\boards\Interface_Robot\Firmware\servo.c + __pa_0 0x003bd8 program static Z:\elec\boards\Interface_Robot\Firmware\mcc.c + __pa_0 0x003cca program static Z:\elec\boards\Interface_Robot\Firmware\adjd-s371.c + __pa_0 0x003d88 program static Z:\elec\boards\Interface_Robot\Firmware\lcd.c + __pa_0 0x002cda program static Z:\elec\boards\Interface_Robot\Firmware\ax12.c + __pa_0 0x00368e program static Z:\elec\boards\Interface_Robot\Firmware\infrared.c + __pa_0 0x004248 program static Z:\elec\boards\Interface_Robot\Firmware\eeprom.c + __pa_0 0x0025e8 program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c __pa_0 0x004102 program static C:\MCC18\src\pmc_common\i2c\i2c_puts.c - __pa_0 0x001b2e program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c - __pa_1 0x003bea program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\mcc.c - __pa_1 0x003956 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\servo.c - __pa_1 0x0025f6 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_1 0x002ce6 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\ax12.c - __pa_1 0x003cd4 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\adjd-s371.c - __pa_1 0x00369c program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\infrared.c - __pa_1 0x001b6a program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c - __pa_1 0x003dae program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\lcd.c - __pa_10 0x001c2a program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c - __pa_10 0x002d68 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\ax12.c - __pa_10 0x003718 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\infrared.c - __pa_10 0x002646 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_11 0x002d76 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\ax12.c - __pa_11 0x001c38 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c - __pa_11 0x002656 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_11 0x00372c program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\infrared.c - __pa_12 0x002d80 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\ax12.c - __pa_12 0x00373e program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\infrared.c - __pa_12 0x001c42 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c - __pa_12 0x00266a program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_13 0x002d86 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\ax12.c - __pa_13 0x001c56 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c - __pa_13 0x003748 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\infrared.c - __pa_13 0x00267c program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_14 0x002d90 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\ax12.c - __pa_14 0x003752 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\infrared.c - __pa_14 0x001c5e program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c - __pa_14 0x002688 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_15 0x001c6a program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c - __pa_15 0x0026a4 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_15 0x002da4 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\ax12.c - __pa_15 0x00375c program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\infrared.c - __pa_16 0x001c74 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c - __pa_16 0x002dae program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\ax12.c - __pa_16 0x0026aa program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_16 0x003766 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\infrared.c - __pa_17 0x0026b4 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_17 0x002dba program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\ax12.c - __pa_17 0x001c84 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c - __pa_18 0x0026c0 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_18 0x002dc2 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\ax12.c - __pa_18 0x001c8c program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c - __pa_19 0x002dd2 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\ax12.c - __pa_19 0x001c94 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c - __pa_19 0x0026cc program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_2 0x002d04 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\ax12.c - __pa_2 0x0025fc program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_2 0x00397a program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\servo.c - __pa_2 0x0036ae program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\infrared.c - __pa_2 0x003d02 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\adjd-s371.c - __pa_2 0x001bbc program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c - __pa_2 0x003dc2 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\lcd.c - __pa_20 0x002dda program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\ax12.c - __pa_20 0x0026dc program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_20 0x001c9e program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c - __pa_21 0x0026ec program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_21 0x001ca6 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c - __pa_22 0x0026fc program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_23 0x00270a program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_24 0x002718 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_25 0x002726 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_26 0x002734 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_27 0x002742 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_28 0x00275a program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_29 0x002776 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_3 0x001bc2 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c - __pa_3 0x002d0e program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\ax12.c - __pa_3 0x002606 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_3 0x003dc8 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\lcd.c - __pa_3 0x003990 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\servo.c - __pa_3 0x0036b8 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\infrared.c - __pa_3 0x003d0a program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\adjd-s371.c - __pa_30 0x002780 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_31 0x002788 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_32 0x00279a program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_33 0x0027a4 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_34 0x0027ae program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_35 0x0027b8 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_36 0x0027c8 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_37 0x0027d6 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_38 0x0027e0 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_39 0x0027ea program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_4 0x001bd4 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c - __pa_4 0x002d16 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\ax12.c - __pa_4 0x00260e program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_4 0x003dd0 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\lcd.c - __pa_4 0x0039a2 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\servo.c - __pa_4 0x003d12 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\adjd-s371.c - __pa_4 0x0036ce program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\infrared.c - __pa_40 0x0027f2 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_41 0x0027fa program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_5 0x003dd4 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\lcd.c - __pa_5 0x0036d4 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\infrared.c - __pa_5 0x002d2a program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\ax12.c - __pa_5 0x001be8 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c - __pa_5 0x0039ae program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\servo.c - __pa_5 0x002618 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_6 0x003ddc program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\lcd.c - __pa_6 0x0036e6 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\infrared.c - __pa_6 0x002d38 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\ax12.c - __pa_6 0x0039b6 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\servo.c - __pa_6 0x002620 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_6 0x001bf6 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c - __pa_7 0x001bfa program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c - __pa_7 0x002d40 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\ax12.c - __pa_7 0x0036f8 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\infrared.c - __pa_7 0x003de2 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\lcd.c - __pa_7 0x002628 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_8 0x001c0a program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c - __pa_8 0x003704 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\infrared.c - __pa_8 0x002d4c program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\ax12.c - __pa_8 0x003dea program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\lcd.c - __pa_8 0x00262e program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_9 0x003710 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\infrared.c - __pa_9 0x002d5c program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\ax12.c - __pa_9 0x00263c program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_device.c - __pa_9 0x001c1a program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c - __string_0 0x0043d5 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c - __string_1 0x0043c9 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c - __string_2 0x0043c7 program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c - __string_3 0x0043be program static Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c + __pa_0 0x001b2e program static Z:\elec\boards\Interface_Robot\Firmware\main.c + __pa_1 0x003bea program static Z:\elec\boards\Interface_Robot\Firmware\mcc.c + __pa_1 0x003956 program static Z:\elec\boards\Interface_Robot\Firmware\servo.c + __pa_1 0x0025f6 program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_1 0x002ce6 program static Z:\elec\boards\Interface_Robot\Firmware\ax12.c + __pa_1 0x003cd4 program static Z:\elec\boards\Interface_Robot\Firmware\adjd-s371.c + __pa_1 0x00369c program static Z:\elec\boards\Interface_Robot\Firmware\infrared.c + __pa_1 0x001b6a program static Z:\elec\boards\Interface_Robot\Firmware\main.c + __pa_1 0x003dae program static Z:\elec\boards\Interface_Robot\Firmware\lcd.c + __pa_10 0x001c2a program static Z:\elec\boards\Interface_Robot\Firmware\main.c + __pa_10 0x002d68 program static Z:\elec\boards\Interface_Robot\Firmware\ax12.c + __pa_10 0x003718 program static Z:\elec\boards\Interface_Robot\Firmware\infrared.c + __pa_10 0x002646 program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_11 0x002d76 program static Z:\elec\boards\Interface_Robot\Firmware\ax12.c + __pa_11 0x001c38 program static Z:\elec\boards\Interface_Robot\Firmware\main.c + __pa_11 0x002656 program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_11 0x00372c program static Z:\elec\boards\Interface_Robot\Firmware\infrared.c + __pa_12 0x002d80 program static Z:\elec\boards\Interface_Robot\Firmware\ax12.c + __pa_12 0x00373e program static Z:\elec\boards\Interface_Robot\Firmware\infrared.c + __pa_12 0x001c42 program static Z:\elec\boards\Interface_Robot\Firmware\main.c + __pa_12 0x00266a program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_13 0x002d86 program static Z:\elec\boards\Interface_Robot\Firmware\ax12.c + __pa_13 0x001c56 program static Z:\elec\boards\Interface_Robot\Firmware\main.c + __pa_13 0x003748 program static Z:\elec\boards\Interface_Robot\Firmware\infrared.c + __pa_13 0x00267c program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_14 0x002d90 program static Z:\elec\boards\Interface_Robot\Firmware\ax12.c + __pa_14 0x003752 program static Z:\elec\boards\Interface_Robot\Firmware\infrared.c + __pa_14 0x001c5e program static Z:\elec\boards\Interface_Robot\Firmware\main.c + __pa_14 0x002688 program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_15 0x001c6a program static Z:\elec\boards\Interface_Robot\Firmware\main.c + __pa_15 0x0026a4 program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_15 0x002da4 program static Z:\elec\boards\Interface_Robot\Firmware\ax12.c + __pa_15 0x00375c program static Z:\elec\boards\Interface_Robot\Firmware\infrared.c + __pa_16 0x001c74 program static Z:\elec\boards\Interface_Robot\Firmware\main.c + __pa_16 0x002dae program static Z:\elec\boards\Interface_Robot\Firmware\ax12.c + __pa_16 0x0026aa program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_16 0x003766 program static Z:\elec\boards\Interface_Robot\Firmware\infrared.c + __pa_17 0x0026b4 program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_17 0x002dba program static Z:\elec\boards\Interface_Robot\Firmware\ax12.c + __pa_17 0x001c84 program static Z:\elec\boards\Interface_Robot\Firmware\main.c + __pa_18 0x0026c0 program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_18 0x002dc2 program static Z:\elec\boards\Interface_Robot\Firmware\ax12.c + __pa_18 0x001c8c program static Z:\elec\boards\Interface_Robot\Firmware\main.c + __pa_19 0x002dd2 program static Z:\elec\boards\Interface_Robot\Firmware\ax12.c + __pa_19 0x001c94 program static Z:\elec\boards\Interface_Robot\Firmware\main.c + __pa_19 0x0026cc program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_2 0x002d04 program static Z:\elec\boards\Interface_Robot\Firmware\ax12.c + __pa_2 0x0025fc program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_2 0x00397a program static Z:\elec\boards\Interface_Robot\Firmware\servo.c + __pa_2 0x0036ae program static Z:\elec\boards\Interface_Robot\Firmware\infrared.c + __pa_2 0x003d02 program static Z:\elec\boards\Interface_Robot\Firmware\adjd-s371.c + __pa_2 0x001bbc program static Z:\elec\boards\Interface_Robot\Firmware\main.c + __pa_2 0x003dc2 program static Z:\elec\boards\Interface_Robot\Firmware\lcd.c + __pa_20 0x002dda program static Z:\elec\boards\Interface_Robot\Firmware\ax12.c + __pa_20 0x0026dc program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_20 0x001c9e program static Z:\elec\boards\Interface_Robot\Firmware\main.c + __pa_21 0x0026ec program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_21 0x001ca6 program static Z:\elec\boards\Interface_Robot\Firmware\main.c + __pa_22 0x0026fc program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_23 0x00270a program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_24 0x002718 program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_25 0x002726 program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_26 0x002734 program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_27 0x002742 program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_28 0x00275a program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_29 0x002776 program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_3 0x001bc2 program static Z:\elec\boards\Interface_Robot\Firmware\main.c + __pa_3 0x002d0e program static Z:\elec\boards\Interface_Robot\Firmware\ax12.c + __pa_3 0x002606 program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_3 0x003dc8 program static Z:\elec\boards\Interface_Robot\Firmware\lcd.c + __pa_3 0x003990 program static Z:\elec\boards\Interface_Robot\Firmware\servo.c + __pa_3 0x0036b8 program static Z:\elec\boards\Interface_Robot\Firmware\infrared.c + __pa_3 0x003d0a program static Z:\elec\boards\Interface_Robot\Firmware\adjd-s371.c + __pa_30 0x002780 program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_31 0x002788 program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_32 0x00279a program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_33 0x0027a4 program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_34 0x0027ae program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_35 0x0027b8 program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_36 0x0027c8 program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_37 0x0027d6 program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_38 0x0027e0 program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_39 0x0027ea program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_4 0x001bd4 program static Z:\elec\boards\Interface_Robot\Firmware\main.c + __pa_4 0x002d16 program static Z:\elec\boards\Interface_Robot\Firmware\ax12.c + __pa_4 0x00260e program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_4 0x003dd0 program static Z:\elec\boards\Interface_Robot\Firmware\lcd.c + __pa_4 0x0039a2 program static Z:\elec\boards\Interface_Robot\Firmware\servo.c + __pa_4 0x003d12 program static Z:\elec\boards\Interface_Robot\Firmware\adjd-s371.c + __pa_4 0x0036ce program static Z:\elec\boards\Interface_Robot\Firmware\infrared.c + __pa_40 0x0027f2 program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_41 0x0027fa program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_5 0x003dd4 program static Z:\elec\boards\Interface_Robot\Firmware\lcd.c + __pa_5 0x0036d4 program static Z:\elec\boards\Interface_Robot\Firmware\infrared.c + __pa_5 0x002d2a program static Z:\elec\boards\Interface_Robot\Firmware\ax12.c + __pa_5 0x001be8 program static Z:\elec\boards\Interface_Robot\Firmware\main.c + __pa_5 0x0039ae program static Z:\elec\boards\Interface_Robot\Firmware\servo.c + __pa_5 0x002618 program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_6 0x003ddc program static Z:\elec\boards\Interface_Robot\Firmware\lcd.c + __pa_6 0x0036e6 program static Z:\elec\boards\Interface_Robot\Firmware\infrared.c + __pa_6 0x002d38 program static Z:\elec\boards\Interface_Robot\Firmware\ax12.c + __pa_6 0x0039b6 program static Z:\elec\boards\Interface_Robot\Firmware\servo.c + __pa_6 0x002620 program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_6 0x001bf6 program static Z:\elec\boards\Interface_Robot\Firmware\main.c + __pa_7 0x001bfa program static Z:\elec\boards\Interface_Robot\Firmware\main.c + __pa_7 0x002d40 program static Z:\elec\boards\Interface_Robot\Firmware\ax12.c + __pa_7 0x0036f8 program static Z:\elec\boards\Interface_Robot\Firmware\infrared.c + __pa_7 0x003de2 program static Z:\elec\boards\Interface_Robot\Firmware\lcd.c + __pa_7 0x002628 program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_8 0x001c0a program static Z:\elec\boards\Interface_Robot\Firmware\main.c + __pa_8 0x003704 program static Z:\elec\boards\Interface_Robot\Firmware\infrared.c + __pa_8 0x002d4c program static Z:\elec\boards\Interface_Robot\Firmware\ax12.c + __pa_8 0x003dea program static Z:\elec\boards\Interface_Robot\Firmware\lcd.c + __pa_8 0x00262e program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_9 0x003710 program static Z:\elec\boards\Interface_Robot\Firmware\infrared.c + __pa_9 0x002d5c program static Z:\elec\boards\Interface_Robot\Firmware\ax12.c + __pa_9 0x00263c program static Z:\elec\boards\Interface_Robot\Firmware\usb_device.c + __pa_9 0x001c1a program static Z:\elec\boards\Interface_Robot\Firmware\main.c + __string_0 0x0043d5 program static Z:\elec\boards\Interface_Robot\Firmware\main.c + __string_1 0x0043c9 program static Z:\elec\boards\Interface_Robot\Firmware\main.c + __string_2 0x0043c7 program static Z:\elec\boards\Interface_Robot\Firmware\main.c + __string_3 0x0043be program static Z:\elec\boards\Interface_Robot\Firmware\main.c __tmplbl_0 0x000a3a program static __tmplbl_1 0x000a34 program static __tmplbl_10 0x001a88 program static @@ -619,41 +619,41 @@ USER_USB_CALLBACK_EVENT_HANDLER 0x001a4c program extern Z:\home\nicolas _do_cinit 0x003f74 program extern C:\MCC18\src\traditional\startup\c018i.c _entry 0x000000 program extern C:\MCC18\src\traditional\startup\c018i.c _false 0x0042f8 program static - _reset 0x000800 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\main.c + _reset 0x000800 program extern Z:\elec\boards\Interface_Robot\Firmware\main.c _startup 0x004600 program extern C:\MCC18\src\traditional\startup\c018i.c - actionAX12 0x002c7e program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\ax12.c - adjdReadRegister 0x003c4c program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\adjd-s371.c - adjdWriteRegister 0x003c28 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\adjd-s371.c - checkTOR 0x003ba2 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\mcc.c + actionAX12 0x002c7e program extern Z:\elec\boards\Interface_Robot\Firmware\ax12.c + adjdReadRegister 0x003c4c program extern Z:\elec\boards\Interface_Robot\Firmware\adjd-s371.c + adjdWriteRegister 0x003c28 program extern Z:\elec\boards\Interface_Robot\Firmware\adjd-s371.c + checkTOR 0x003ba2 program extern Z:\elec\boards\Interface_Robot\Firmware\mcc.c clear_loop 0x004658 program static C:\MCC18\src\traditional\proc\p18F4550.asm - configAX12 0x002a0c program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\ax12.c - configDescriptor1 0x003ed6 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_descriptors.c + configAX12 0x002a0c program extern Z:\elec\boards\Interface_Robot\Firmware\ax12.c + configDescriptor1 0x003ed6 program extern Z:\elec\boards\Interface_Robot\Firmware\usb_descriptors.c copy_loop 0x003fe6 program static copy_one_byte 0x003fec program static - device_dsc 0x003ec4 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_descriptors.c - disableMotor 0x003a50 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\mcc.c - disableServo 0x0038ea program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\servo.c + device_dsc 0x003ec4 program extern Z:\elec\boards\Interface_Robot\Firmware\usb_descriptors.c + disableMotor 0x003a50 program extern Z:\elec\boards\Interface_Robot\Firmware\mcc.c + disableServo 0x0038ea program extern Z:\elec\boards\Interface_Robot\Firmware\servo.c done 0x004010 program static done_copying 0x003ffa program static - enableMotor 0x003a48 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\mcc.c - enableServo 0x0038d6 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\servo.c - error 0x00450e program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\error.c - getIFRange 0x00352e program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\infrared.c - getPosition 0x002cce program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\ax12.c - getSpeed 0x002cd4 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\ax12.c - goTo 0x002c88 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\ax12.c - hasTimedOut 0x0029e6 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\ax12.c - hid_rpt01 0x003f4f program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\usb_descriptors.c - initAX12 0x002800 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\ax12.c - initAdjd 0x003bf2 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\adjd-s371.c - initIF 0x003326 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\infrared.c - initMCC 0x0039c8 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\mcc.c - initServos 0x00376c program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\servo.c - interruptAX12 0x00280a program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\ax12.c - interruptIF 0x003346 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\infrared.c - interruptMotor1 0x003a12 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\mcc.c - interruptServo 0x003796 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\servo.c - isStatusPacketReceived 0x0029e0 program extern Z:\home\nicolasd\code\krobot\krobot\elec\boards\Interface_Robot\Firmware\ax12.c + enableMotor 0x003a48 program extern Z:\elec\boards\Interface_Robot\Firmware\mcc.c + enableServo 0x0038d6 program extern Z:\elec\boards\Interface_Robot\Firmware\servo.c + error 0x00450e program extern Z:\elec\boards\Interface_Robot\Firmware\error.c + getIFRange 0x00352e program extern Z:\elec\boards\Interface_Robot\Firmware\infrared.c + getPosition 0x002cce program extern Z:\elec\boards\Interface_Robot\Firmware\ax12.c + getSpeed 0x002cd4 program extern Z:\elec\boards\Interface_Robot\Firmware\ax12.c + goTo 0x002c88 program extern Z:\elec\boards\Interface_Robot\Firmware\ax12.c + hasTimedOut 0x0029e6 program extern Z:\elec\boards\Interface_Robot\Firmware\ax12.c + hid_rpt01 0x003f4f program extern Z:\elec\boards\Interface_Robot\Firmware\usb_descriptors.c + initAX12 0x002800 program extern Z:\elec\boards\Interface_Robot\Firmware\ax12.c + initAdjd 0x003bf2 program extern Z:\elec\boards\Interface_Robot\Firmware\adjd-s371.c + initIF 0x003326 program extern Z:\elec\boards\Interface_Robot\Firmware\infrared.c + initMCC 0x0039c8 program extern Z:\elec\boards\Interface_Robot\Firmware\mcc.c + initServos 0x00376c program extern Z:\elec\boards\Interface_Robot\Firmware\servo.c + interruptAX12 0x00280a program extern Z:\elec\boards\Interface_Robot\Firmware\ax12.c + interruptIF 0x003346 program extern Z:\elec\boards\Interface_Robot\Firmware\infrared.c + interruptMotor1 0x003a12 program extern Z:\elec\boards\Interface_Robot\Firmware\mcc.c + interruptServo 0x003796 program extern Z:\elec\boards\Interface_Robot\Firmware\servo.c + isStatusPacketReceived 0x0029e0 program extern Z:\elec\boards\Interface_Robot\Firmware\ax12.c jANotInf 0x002fb0 program ... [truncated message content] |
From: Xavier L. <Ba...@us...> - 2010-05-20 19:26:41
|
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 01c6c4d6b738786e36dce17f38467fc1e0c72fd7 (commit) via 16ac54f3285ee3f4036e1b4650ea6ba007855e80 (commit) via 3c3cfb29da4be2f565aea48827a885140fbe5656 (commit) from 9ab5f4a67923e98473a1685942ecf176e8c06fc4 (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 01c6c4d6b738786e36dce17f38467fc1e0c72fd7 Author: Xavier Lagorce <Xav...@cr...> Date: Thu May 20 21:25:46 2010 +0200 Better constants, the PID controller parameters need to be better tuned commit 16ac54f3285ee3f4036e1b4650ea6ba007855e80 Author: Xavier Lagorce <Xav...@cr...> Date: Thu May 20 21:25:12 2010 +0200 Better controller computation commit 3c3cfb29da4be2f565aea48827a885140fbe5656 Author: Xavier Lagorce <Xav...@cr...> Date: Thu May 20 21:23:59 2010 +0200 Use hardware PWM instead of semi-software PWM generation Also use the indicators on the motor boards to show that the commands is at saturation point ----------------------------------------------------------------------- Changes: diff --git a/elec/boards/Controller_HolonomicDrive/Firmware/motor.c b/elec/boards/Controller_HolonomicDrive/Firmware/motor.c index 748356f..7972948 100644 --- a/elec/boards/Controller_HolonomicDrive/Firmware/motor.c +++ b/elec/boards/Controller_HolonomicDrive/Firmware/motor.c @@ -5,13 +5,14 @@ #include "motor.h" -uint8_t enabledMotors = 0; +uint8_t enabledMotors = 0, indMotors = 0; signed char currentSpeedSign[] = {0, 0, 0}; +TIM_OCInitTypeDef TIM_OCInitStructure; /* * Interrupt routine for PWM generation */ -void VectorB0(void) { +/*void VectorB0(void) { if (TIM_GetITStatus(TIM2, TIM_IT_CC1) != RESET) { @@ -45,7 +46,7 @@ void VectorB0(void) { GPIO_SetBits(GPIOA, GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_3); } -} + }*/ /* * Initialises TIM2 for PWM generation and associated GPIOs @@ -53,7 +54,6 @@ void VectorB0(void) { void motorsInit(void) { TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure; - TIM_OCInitTypeDef TIM_OCInitStructure; GPIO_InitTypeDef GPIO_InitStructure; //Enable GPIOB and GPIOC clock @@ -68,16 +68,19 @@ void motorsInit(void) { // IN1 PB0 // IN2 PB1 // PWM PA1 + // IND PC3 //Motor2 : STBY PC0 // IN1 PC1 // IN2 PC2 // PWM PA2 + // IND PC5 //Motor3 : STBY PC6 // IN1 PC7 // IN2 PC8 // PWM PA3 - GPIO_InitStructure.GPIO_Pin = (GPIO_Pin_0 | GPIO_Pin_2 | GPIO_Pin_6 - | GPIO_Pin_7 | GPIO_Pin_8 | GPIO_Pin_10 | GPIO_Pin_13); + // IND PC9 + GPIO_InitStructure.GPIO_Pin = (GPIO_Pin_0 | GPIO_Pin_2 | GPIO_Pin_3 | GPIO_Pin_5 | GPIO_Pin_6 + | GPIO_Pin_7 | GPIO_Pin_8 | GPIO_Pin_9 | GPIO_Pin_10 | GPIO_Pin_13); GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_Init(GPIOC, &GPIO_InitStructure); @@ -86,6 +89,7 @@ void motorsInit(void) { GPIO_Init(GPIOB, &GPIO_InitStructure); GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1|GPIO_Pin_2|GPIO_Pin_3; + GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP; GPIO_Init(GPIOA, &GPIO_InitStructure); // Default value of H-Bridge configuration @@ -94,37 +98,32 @@ void motorsInit(void) { | GPIO_Pin_3 | GPIO_Pin_9 | GPIO_Pin_13); // TimeBase configuration - TIM_TimeBaseStructure.TIM_Prescaler = 0; + TIM_TimeBaseStructure.TIM_Prescaler = (uint16_t) (72000000 / 72000000) - 1;; TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up; - TIM_TimeBaseStructure.TIM_Period = 36000; // 2 kHz + TIM_TimeBaseStructure.TIM_Period = 3600; // 20 kHz TIM_TimeBaseStructure.TIM_ClockDivision = 0; - TIM_TimeBaseStructure.TIM_RepetitionCounter = 0; TIM_TimeBaseInit(TIM2, &TIM_TimeBaseStructure); - // Output Compare Active Mode configuration: Channel1 - TIM_OCInitStructure.TIM_OCMode = TIM_OCMode_Inactive; - TIM_OCInitStructure.TIM_OutputState = TIM_OutputState_Disable; - TIM_OCInitStructure.TIM_Pulse = 18000; + // PWM1 Mode configuration: Channel1 + TIM_OCInitStructure.TIM_OCMode = TIM_OCMode_PWM1; + TIM_OCInitStructure.TIM_OutputState = TIM_OutputState_Enable; + TIM_OCInitStructure.TIM_Pulse = 0; TIM_OCInitStructure.TIM_OCPolarity = TIM_OCPolarity_High; - TIM_OC1Init(TIM2, &TIM_OCInitStructure); TIM_OC2Init(TIM2, &TIM_OCInitStructure); + TIM_OC2PreloadConfig(TIM2, TIM_OCPreload_Enable); TIM_OC3Init(TIM2, &TIM_OCInitStructure); - TIM_OC1PreloadConfig(TIM2, TIM_OCPreload_Disable); - TIM_OC2PreloadConfig(TIM2, TIM_OCPreload_Disable); - TIM_OC3PreloadConfig(TIM2, TIM_OCPreload_Disable); - - // Enable interrupt vector - NVICEnableVector(TIM2_IRQn, 0); - - // TIM IT enable - TIM_ITConfig(TIM2, TIM_IT_CC1 | TIM_IT_CC2 | TIM_IT_CC3 | TIM_IT_Update, ENABLE); + TIM_OC3PreloadConfig(TIM2, TIM_OCPreload_Enable); + TIM_OC4Init(TIM2, &TIM_OCInitStructure); + TIM_OC4PreloadConfig(TIM2, TIM_OCPreload_Enable); // All motors are disabled enabledMotors = 0; //Enable timer Peripherals TIM_Cmd(TIM2,ENABLE); + + GPIO_ResetBits(GPIOC, GPIO_Pin_3 | GPIO_Pin_5 | GPIO_Pin_9); } /* @@ -170,15 +169,22 @@ void disableMotor(uint8_t motor) { */ void motorSetSpeed(uint8_t motor, int32_t speed) { + uint8_t ind = 0; + if (speed == 0) { motorStop(motor, MOTOR_BRAKE); return; } - if (speed >= MAX_PWM) + if (speed >= MAX_PWM) { speed = MAX_PWM; - if (speed <= -MAX_PWM) + ind = 1; + } else if (speed <= -MAX_PWM) { speed = -MAX_PWM; + ind = 1; + } else { + ind = 0; + } if (motor & MOTOR1) { if(speed > 0) { @@ -187,14 +193,26 @@ void motorSetSpeed(uint8_t motor, int32_t speed) { GPIO_SetBits(GPIOB, GPIO_Pin_1); GPIO_ResetBits(GPIOB, GPIO_Pin_0); } - TIM_SetCompare1(TIM2, (uint16_t)speed); + TIM_OCInitStructure.TIM_Pulse = (uint16_t)speed; } else { if (currentSpeedSign[0] != -1) { currentSpeedSign[0] = -1; GPIO_SetBits(GPIOB, GPIO_Pin_0); GPIO_ResetBits(GPIOB, GPIO_Pin_1); } - TIM_SetCompare1(TIM2, (uint16_t)(-speed)); + TIM_OCInitStructure.TIM_Pulse = (uint16_t)(-speed); + } + TIM_OC2Init(TIM2, &TIM_OCInitStructure); + TIM_OC2PreloadConfig(TIM2, TIM_OCPreload_Enable); + TIM_ARRPreloadConfig(TIM2, ENABLE); + if (ind) { + if ((indMotors & MOTOR1) == 0) { + GPIO_SetBits(GPIOC, GPIO_Pin_3); + indMotors |= MOTOR1; + } + } else if ((indMotors & MOTOR1) != 0) { + GPIO_ResetBits(GPIOC, GPIO_Pin_3); + indMotors &= ~MOTOR1; } } if (motor & MOTOR2) { @@ -204,14 +222,26 @@ void motorSetSpeed(uint8_t motor, int32_t speed) { GPIO_SetBits(GPIOC, GPIO_Pin_2); GPIO_ResetBits(GPIOC, GPIO_Pin_1); } - TIM_SetCompare2(TIM2, (uint16_t)speed); + TIM_OCInitStructure.TIM_Pulse = (uint16_t)speed; } else { if (currentSpeedSign[1] != -1) { currentSpeedSign[1] = -1; GPIO_SetBits(GPIOC, GPIO_Pin_1); GPIO_ResetBits(GPIOC, GPIO_Pin_2); } - TIM_SetCompare2(TIM2, (uint16_t)(-speed)); + TIM_OCInitStructure.TIM_Pulse = (uint16_t)(-speed); + } + TIM_OC3Init(TIM2, &TIM_OCInitStructure); + TIM_OC3PreloadConfig(TIM2, TIM_OCPreload_Enable); + TIM_ARRPreloadConfig(TIM2, ENABLE); + if (ind) { + if ((indMotors & MOTOR2) == 0) { + GPIO_SetBits(GPIOC, GPIO_Pin_5); + indMotors |= MOTOR2; + } + } else if ((indMotors & MOTOR2) != 0) { + GPIO_ResetBits(GPIOC, GPIO_Pin_5); + indMotors &= ~MOTOR2; } } if (motor & MOTOR3) { @@ -221,7 +251,7 @@ void motorSetSpeed(uint8_t motor, int32_t speed) { GPIO_SetBits(GPIOC, GPIO_Pin_8); GPIO_ResetBits(GPIOC, GPIO_Pin_7); } - TIM_SetCompare3(TIM2, (uint16_t)speed); + TIM_OCInitStructure.TIM_Pulse = (uint16_t)speed; } else { if (currentSpeedSign[2] != -1) { currentSpeedSign[2] = -1; @@ -230,6 +260,18 @@ void motorSetSpeed(uint8_t motor, int32_t speed) { } TIM_SetCompare3(TIM2, (uint16_t)(-speed)); } + TIM_OC4Init(TIM2, &TIM_OCInitStructure); + TIM_OC4PreloadConfig(TIM2, TIM_OCPreload_Enable); + TIM_ARRPreloadConfig(TIM2, ENABLE); + if (ind) { + if ((indMotors & MOTOR3) == 0) { + GPIO_SetBits(GPIOC, GPIO_Pin_9); + indMotors |= MOTOR3; + } + } else if ((indMotors & MOTOR3) != 0) { + GPIO_ResetBits(GPIOC, GPIO_Pin_9); + indMotors &= ~MOTOR3; + } } } diff --git a/elec/boards/Controller_HolonomicDrive/Firmware/motor.h b/elec/boards/Controller_HolonomicDrive/Firmware/motor.h index dd0b148..c08e974 100644 --- a/elec/boards/Controller_HolonomicDrive/Firmware/motor.h +++ b/elec/boards/Controller_HolonomicDrive/Firmware/motor.h @@ -13,7 +13,7 @@ #define MOTOR_STOP 1 #define MOTOR_BRAKE 2 -#define MAX_PWM 35000 +#define MAX_PWM 3600 #include "ch.h" #include "nvic.h" diff --git a/elec/boards/Controller_HolonomicDrive/Firmware/speed_control.c b/elec/boards/Controller_HolonomicDrive/Firmware/speed_control.c index 9ae4b91..b689068 100644 --- a/elec/boards/Controller_HolonomicDrive/Firmware/speed_control.c +++ b/elec/boards/Controller_HolonomicDrive/Firmware/speed_control.c @@ -8,7 +8,7 @@ #define MAX(x,y) ((x) > (y) ? (x) : (y)) #define MIN(x,y) ((x) > (y) ? (y) : (x)) -int32_t ref_speeds[3] = {0, 0, 0}; +volatile int32_t ref_speeds[3] = {0, 0, 0}; volatile int32_t cur_speeds[3] = {0, 0, 0}; /* @@ -30,13 +30,14 @@ static msg_t ThreadSpeedController(void *arg) { time = chTimeNow(); while (TRUE) { - time += MS2ST(Te); + time += MS2ST(Tcomp); prev_positions[0] = getEncoderPosition(ENCODER1); prev_positions[1] = getEncoderPosition(ENCODER2); prev_positions[2] = getEncoderPosition(ENCODER3); - chThdSleepMilliseconds(Tcomp); + time += MS2ST(Te-Tcomp); + chThdSleepUntil(time); positions[0] = getEncoderPosition(ENCODER1); positions[1] = getEncoderPosition(ENCODER2); @@ -51,9 +52,9 @@ static msg_t ThreadSpeedController(void *arg) { errors[2] = ref_speeds[2] - cur_speeds[2]; //--> Command computation - commands[0] = (K_Pn + K_In)*errors[0] - K_Pn*last_errors[0] + last_commands[0]; - commands[1] = (K_Pn + K_In)*errors[1] - K_Pn*last_errors[1] + last_commands[1]; - commands[2] = (K_Pn + K_In)*errors[2] - K_Pn*last_errors[2] + last_commands[2]; + commands[0] = ((K_Pn + K_In)*errors[0] - K_Pn*last_errors[0] + 100*last_commands[0])/100; + commands[1] = ((K_Pn + K_In)*errors[1] - K_Pn*last_errors[1] + 100*last_commands[1])/100; + commands[2] = ((K_Pn + K_In)*errors[2] - K_Pn*last_errors[2] + 100*last_commands[2])/100; //--> End of command computation if (commands[0] >= 0) @@ -81,7 +82,7 @@ static msg_t ThreadSpeedController(void *arg) { commands[2] = 0; last_errors[0] = errors[0]; last_errors[1] = errors[1]; - last_errors[2] = errors[2]; + last_errors[2] = errors[2]; motorSetSpeed(MOTOR1, commands[0]); motorSetSpeed(MOTOR2, commands[1]); diff --git a/elec/boards/Controller_HolonomicDrive/Firmware/speed_control.h b/elec/boards/Controller_HolonomicDrive/Firmware/speed_control.h index b97ea45..9354b1b 100644 --- a/elec/boards/Controller_HolonomicDrive/Firmware/speed_control.h +++ b/elec/boards/Controller_HolonomicDrive/Firmware/speed_control.h @@ -6,17 +6,17 @@ #ifndef HEADER__SPEEDCONTROL #define HEADER__SPEEDCONTROL -#define K_P 17 -#define K_I 1 -#define Tcomp 15 // speed will be computed on a Tcomp timesample -#define Te 50 +#define K_P 80 +#define K_I 1 +#define Tcomp 100 // speed will be computed on a Tcomp timesample +#define Te 110 #define K_v (1000/Tcomp) #define K_Pn K_P -#define K_In 10//(K_I)*Te +#define K_In 10//(K_I)*Te -#define DEAD_ZONE 100 -#define MAX_COMMAND 35500 +#define DEAD_ZONE 0 +#define MAX_COMMAND 3600 #include "ch.h" #include "motor.h" hooks/post-receive -- krobot |
From: Xavier L. <Ba...@us...> - 2010-05-20 13:43:41
|
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 9ab5f4a67923e98473a1685942ecf176e8c06fc4 (commit) via 755fd4c6d04fc43bc96eddfc9ee20f3007a717aa (commit) via b4fe376e4b223f387804ff33e89595c6345fa93d (commit) via 21a3822e7f2c19f56bfcda23fdf077c186a78080 (commit) via 4854cd39e1f97d00b3d77ecea3e50ce58852357d (commit) from 892d4515a07e0f72f224f324deea6fd8cc362bee (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 9ab5f4a67923e98473a1685942ecf176e8c06fc4 Author: Xavier Lagorce <Xav...@cr...> Date: Thu May 20 15:42:23 2010 +0200 Added macro commands to monitor to move [Kro]bot Jr's AX12s commit 755fd4c6d04fc43bc96eddfc9ee20f3007a717aa Author: Xavier Lagorce <Xav...@cr...> Date: Thu May 20 15:41:53 2010 +0200 Remove some warnings commit b4fe376e4b223f387804ff33e89595c6345fa93d Author: Xavier Lagorce <Xav...@cr...> Date: Thu May 20 15:41:23 2010 +0200 Added constants for AX12 interesting positions for Krobot Jr commit 21a3822e7f2c19f56bfcda23fdf077c186a78080 Author: Xavier Lagorce <Xav...@cr...> Date: Wed May 19 23:26:28 2010 +0200 No need to wait after the last command commit 4854cd39e1f97d00b3d77ecea3e50ce58852357d Author: Xavier Lagorce <Xav...@cr...> Date: Wed May 19 23:23:47 2010 +0200 Modified AX12s IDs to be different from the default one ----------------------------------------------------------------------- Changes: diff --git a/elec/boards/MotherBoard_KrobotJr2010/Firmware/ax12.c b/elec/boards/MotherBoard_KrobotJr2010/Firmware/ax12.c index dd17855..cf34548 100644 --- a/elec/boards/MotherBoard_KrobotJr2010/Firmware/ax12.c +++ b/elec/boards/MotherBoard_KrobotJr2010/Firmware/ax12.c @@ -150,8 +150,6 @@ void ax12Configure(uint8_t old_id, uint8_t new_id) { */ // Set ID ax12SendPacket(old_id, INST_WRITE, sizeof(paramsID), paramsID); - chThdSleepMilliseconds(1); - } void ax12Goto(uint8_t id, uint16_t position, uint16_t speed, uint8_t mode) { diff --git a/elec/boards/MotherBoard_KrobotJr2010/Firmware/ax12.h b/elec/boards/MotherBoard_KrobotJr2010/Firmware/ax12.h index a685bcc..a3da360 100644 --- a/elec/boards/MotherBoard_KrobotJr2010/Firmware/ax12.h +++ b/elec/boards/MotherBoard_KrobotJr2010/Firmware/ax12.h @@ -6,7 +6,7 @@ #ifndef HEADER__AX12 #define HEADER__AX12 -#define AX12_BAUDRATE 1000000 +#define AX12_BAUDRATE 115200//1000000 #include <stdio.h> #include <stdlib.h> @@ -117,12 +117,20 @@ #define CMD_ACTION 2 // AX12 names -#define AX12_ARM1 1 -#define AX12_GRIP1 2 -#define AX12_ARM2 3 -#define AX12_GRIP2 4 -#define AX12_ARM3 5 -#define AX12_GRIP3 6 +#define AX12_ARM1 2 +#define AX12_GRIP1 3 +#define AX12_ARM2 4 +#define AX12_GRIP2 5 +#define AX12_ARM3 6 +#define AX12_GRIP3 7 + +// AX12 positions +#define GRIP_OPEN 250 +#define GRIP_CLOSE 435 +#define GRIP_RELEASE 350 + +#define ARM_GET 512 +#define ARM_CARRY 200 void ax12Init(void); void ax12SendPacket(uint8_t id, uint8_t instruction, uint8_t len, uint8_t *params); diff --git a/elec/boards/MotherBoard_KrobotJr2010/Firmware/monitor.c b/elec/boards/MotherBoard_KrobotJr2010/Firmware/monitor.c index abf1662..66d0b06 100644 --- a/elec/boards/MotherBoard_KrobotJr2010/Firmware/monitor.c +++ b/elec/boards/MotherBoard_KrobotJr2010/Firmware/monitor.c @@ -203,8 +203,8 @@ void ax12Handler(BaseChannel *chp, int argc, char* argv[]) { uint8_t id, new_id; uint16_t pos, spd; - if (argc < 2) { - shellPrintLine(chp, "Usage : ax12 (config|goto|goto_delayed|action) id ..."); + if (argc < 1) { + shellPrintLine(chp, "Usage : ax12 (config|goto|goto_delayed|action|open|close) id ..."); return; } @@ -239,6 +239,153 @@ void ax12Handler(BaseChannel *chp, int argc, char* argv[]) { else if(strcmp(argv[0], "action") == 0) { ax12Action(id); } + else if(strcmp(argv[0], "open") == 0) { + if (argc == 1) { + ax12Goto(AX12_GRIP1, GRIP_OPEN, 0, CMD_ACTION); + chThdSleepMilliseconds(5); + ax12Goto(AX12_GRIP2, GRIP_OPEN, 0, CMD_ACTION); + chThdSleepMilliseconds(5); + ax12Goto(AX12_GRIP3, GRIP_OPEN, 0, CMD_ACTION); + chThdSleepMilliseconds(5); + ax12Action(ID_BROADCAST); + } + else if (argc == 2) { + switch(argv[1][0]) { + case '1': + ax12Goto(AX12_GRIP1, GRIP_OPEN, 0, CMD_NOW); + break; + case '2': + ax12Goto(AX12_GRIP2, GRIP_OPEN, 0, CMD_NOW); + break; + case '3': + ax12Goto(AX12_GRIP3, GRIP_OPEN, 0, CMD_NOW); + break; + default: + shellPrintLine(chp, "Identifiant de pince entre 1 et 3"); + break; + } + } + else { + shellPrintLine(chp, "Usage : ax12 open [id]"); + } + } + else if(strcmp(argv[0], "close") == 0) { + if (argc == 1) { + ax12Goto(AX12_GRIP1, GRIP_CLOSE, 0, CMD_ACTION); + chThdSleepMilliseconds(5); + ax12Goto(AX12_GRIP2, GRIP_CLOSE, 0, CMD_ACTION); + chThdSleepMilliseconds(5); + ax12Goto(AX12_GRIP3, GRIP_CLOSE, 0, CMD_ACTION); + chThdSleepMilliseconds(5); + ax12Action(ID_BROADCAST); + } + else if (argc == 2) { + switch(argv[1][0]) { + case '1': + ax12Goto(AX12_GRIP1, GRIP_CLOSE, 0, CMD_NOW); + break; + case '2': + ax12Goto(AX12_GRIP2, GRIP_CLOSE, 0, CMD_NOW); + break; + case '3': + ax12Goto(AX12_GRIP3, GRIP_CLOSE, 0, CMD_NOW); + break; + default: + shellPrintLine(chp, "Identifiant de pince entre 1 et 3"); + break; + } + } + else { + shellPrintLine(chp, "Usage : ax12 close [id]"); + } + } + else if(strcmp(argv[0], "release") == 0) { + if (argc == 1) { + ax12Goto(AX12_GRIP1, GRIP_RELEASE, 0, CMD_ACTION); + chThdSleepMilliseconds(5); + ax12Goto(AX12_GRIP2, GRIP_RELEASE, 0, CMD_ACTION); + chThdSleepMilliseconds(5); + ax12Goto(AX12_GRIP3, GRIP_RELEASE, 0, CMD_ACTION); + chThdSleepMilliseconds(5); + ax12Action(ID_BROADCAST); + } + else if (argc == 2) { + switch(argv[1][0]) { + case '1': + ax12Goto(AX12_GRIP1, GRIP_RELEASE, 0, CMD_NOW); + break; + case '2': + ax12Goto(AX12_GRIP2, GRIP_RELEASE, 0, CMD_NOW); + break; + case '3': + ax12Goto(AX12_GRIP3, GRIP_RELEASE, 0, CMD_NOW); + break; + default: + shellPrintLine(chp, "Identifiant de pince entre 1 et 3"); + break; + } + } + else { + shellPrintLine(chp, "Usage : ax12 close [id]"); + } + } + else if(strcmp(argv[0], "get") == 0) { + if (argc == 1) { + ax12Goto(AX12_ARM1, ARM_GET, 0, CMD_ACTION); + chThdSleepMilliseconds(5); + ax12Goto(AX12_ARM2, ARM_GET, 0, CMD_ACTION); + chThdSleepMilliseconds(5); + ax12Goto(AX12_ARM3, ARM_GET, 0, CMD_ACTION); + chThdSleepMilliseconds(5); + ax12Action(ID_BROADCAST); + } + else if (argc == 2) { + switch(argv[1][0]) { + case '1': + ax12Goto(AX12_ARM1, ARM_GET, 0, CMD_NOW); + break; + case '2': + ax12Goto(AX12_ARM2, ARM_GET, 0, CMD_NOW); + break; + case '3': + ax12Goto(AX12_ARM3, ARM_GET, 0, CMD_NOW); + break; + default: + shellPrintLine(chp, "Identifiant de pince entre 1 et 3"); + break; + } + } + } + else if(strcmp(argv[0], "carry") == 0) { + if (argc == 1) { + ax12Goto(AX12_ARM1, ARM_CARRY, 0, CMD_ACTION); + chThdSleepMilliseconds(5); + ax12Goto(AX12_ARM2, ARM_CARRY, 0, CMD_ACTION); + chThdSleepMilliseconds(5); + ax12Goto(AX12_ARM3, ARM_CARRY, 0, CMD_ACTION); + chThdSleepMilliseconds(5); + ax12Action(ID_BROADCAST); + } + else if (argc == 2) { + switch(argv[1][0]) { + case '1': + ax12Goto(AX12_ARM1, ARM_CARRY, 0, CMD_NOW); + break; + case '2': + ax12Goto(AX12_ARM2, ARM_CARRY, 0, CMD_NOW); + break; + case '3': + ax12Goto(AX12_ARM3, ARM_CARRY, 0, CMD_NOW); + break; + default: + shellPrintLine(chp, "Identifiant de pince entre 1 et 3"); + break; + } + } + else { + shellPrintLine(chp, "Usage : ax12 close [id]"); + } + } else { shellPrintLine(chp, "Usage : ax12 (config|goto|goto_delayed|action) ..."); return; diff --git a/elec/boards/MotherBoard_KrobotJr2010/Firmware/monitor.h b/elec/boards/MotherBoard_KrobotJr2010/Firmware/monitor.h index 77fb7ed..021ef64 100644 --- a/elec/boards/MotherBoard_KrobotJr2010/Firmware/monitor.h +++ b/elec/boards/MotherBoard_KrobotJr2010/Firmware/monitor.h @@ -14,6 +14,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <ctype.h> #include "ch.h" #include "hal.h" hooks/post-receive -- krobot |
From: Jérémie D. <Ba...@us...> - 2010-05-20 13:28:37
|
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 892d4515a07e0f72f224f324deea6fd8cc362bee (commit) from 7c302e1ddad155c8dbf5c20f0f2bd97e4169d214 (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 892d4515a07e0f72f224f324deea6fd8cc362bee Author: Jérémie Dimino <je...@di...> Date: Thu May 20 15:28:10 2010 +0200 update OBus_object.make_interface ----------------------------------------------------------------------- Changes: diff --git a/info/control/clients/ia.ml b/info/control/clients/ia.ml index 8f7ab55..dee979e 100644 --- a/info/control/clients/ia.ml +++ b/info/control/clients/ia.ml @@ -12,7 +12,7 @@ open Krobot_move let section = Lwt_log.Section.make "ia" -let velocity = 100 +let velocity = 400 let acceleration = 800 (* +-----------------------------------------------------------------+ @@ -202,9 +202,12 @@ let take_ear krobot state ear = in return { state with orientation = 180 } in - lwt _ = Krobot.Motors.move krobot ~distance:50 ~velocity ~acceleration in - lwt () = Lwt_unix.sleep 2.0 in - lwt _ = Krobot.Motors.move krobot ~distance:(-50) ~velocity ~acceleration in + lwt () = try_lwt Krobot.Grip.down krobot with _ -> return () in + lwt () = try_lwt Krobot.Grip.open_ krobot with _ -> return () in + lwt _ = Krobot.Motors.move krobot ~distance:85 ~velocity ~acceleration in + lwt () = try_lwt Krobot.Grip.close krobot with _ -> return () in + lwt () = try_lwt Krobot.Grip.up krobot >> Krobot.Grip.release krobot with _ -> return () + and _ = Krobot.Motors.move krobot ~distance:(-85) ~velocity ~acceleration in return state (* +-----------------------------------------------------------------+ diff --git a/info/control/driver/export_unsafe.ml b/info/control/driver/export_unsafe.ml index 77b1a22..fd8f5c5 100644 --- a/info/control/driver/export_unsafe.ml +++ b/info/control/driver/export_unsafe.ml @@ -29,7 +29,8 @@ let make_method card cmd = ~interface:"toto.titi" ~member:cmd.name ~i_args:(make_args cmd.send) - ~o_args:(make_args cmd.recv)) + ~o_args:(make_args cmd.recv) + ~annotations:[]) (fun ctx obj args -> match React.S.value card.card_card with | Some card' -> @@ -48,7 +49,7 @@ let make_method card cmd = card.card_name) let make_interface card name commands = - OBus_object.make_interface name (List.map (make_method card) commands) + OBus_object.make_interface ~name ~methods:(List.map (make_method card) commands) () let interface name card = let interface_commands = List.assoc name commands in hooks/post-receive -- krobot |
From: Jérémie D. <Ba...@us...> - 2010-05-20 13:26:25
|
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 7c302e1ddad155c8dbf5c20f0f2bd97e4169d214 (commit) from 01b2cdeb8eb11b676481e41d063dffaa328d9a39 (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 7c302e1ddad155c8dbf5c20f0f2bd97e4169d214 Author: Jérémie Dimino <je...@di...> Date: Thu May 20 15:25:19 2010 +0200 use less quotes in krobot.obus ----------------------------------------------------------------------- Changes: diff --git a/info/control/protocol/krobot.obus b/info/control/protocol/krobot.obus index 6daf8cf..2446015 100644 --- a/info/control/protocol/krobot.obus +++ b/info/control/protocol/krobot.obus @@ -11,13 +11,13 @@ driver and the clients. *) -interface "fr.krobot.Service.Power" { +interface fr.krobot.Service.Power { method SetBuzzerState : (state : boolean) -> () property.r Current : int32 } -interface "fr.krobot.Service.Infrared" { +interface fr.krobot.Service.Infrared { property.r States : int32 array method GoLeft : () -> () @@ -28,7 +28,7 @@ interface "fr.krobot.Service.Infrared" { method ReloadConfig : () -> () } -interface "fr.krobot.Service.Gate" { +interface fr.krobot.Service.Gate { method Enable : () -> () (** Enable the motor of the gate *) @@ -48,12 +48,12 @@ interface "fr.krobot.Service.Gate" { (** Stop holding the gate *) } -interface "fr.krobot.Service.Compass" { +interface fr.krobot.Service.Compass { property.r Value : int32 (** Current value of the compass *) } -interface "fr.krobot.Service.LCD" { +interface fr.krobot.Service.LCD { method Set : (lines : string array) -> () (** Write all the given lines on the LCD *) @@ -61,7 +61,7 @@ interface "fr.krobot.Service.LCD" { method BacklightOff : () -> () } -interface "fr.krobot.Service.Claws" { +interface fr.krobot.Service.Claws { method Enable : () -> () (** Enable the claws. They are initially disabled. When disabled, commands are ignored. *) @@ -76,7 +76,7 @@ interface "fr.krobot.Service.Claws" { (** Put the claws in a position allowing to capture a ball *) } -interface "fr.krobot.Service.Grip" { +interface fr.krobot.Service.Grip { method Up : () -> (result : boolean) method EmptyUp : () -> () method Down : () -> () @@ -85,15 +85,15 @@ interface "fr.krobot.Service.Grip" { method Release : () -> () } -interface "fr.krobot.Service.LogicSensors" { +interface fr.krobot.Service.LogicSensors { property.r Value : boolean array } -interface "fr.krobot.Service.RangeFinders" { +interface fr.krobot.Service.RangeFinders { property.r Value : int32 array } -interface "fr.krobot.Service.Motors" { +interface fr.krobot.Service.Motors { property.r State : string method Turn : (angle : int32, velocity : int32, acceleration : int32) -> (result : int32) method Move : (distance : int32, velocity : int32, acceleration : int32) -> (result : int32) @@ -113,7 +113,7 @@ interface "fr.krobot.Service.Motors" { property.rw InhibitBackwardUntil : double } -interface "fr.krobot.Manager" { +interface fr.krobot.Manager { property.r ServicesStatus : (string, boolean) dict (** Mapping from service name to their current state *) @@ -121,7 +121,7 @@ interface "fr.krobot.Manager" { (** Shutdown the driver *) } -interface "fr.krobot.Card" { +interface fr.krobot.Card { property.r Name : string property.r State : int32 hooks/post-receive -- krobot |