From: Jérémie D. <Ba...@us...> - 2010-03-07 21:00:24
|
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 8cc04bff36432dd8189d7c78585e8dd3bfead7aa (commit) from a6e8536a3b19b3d0de30a97cf8ea60ccfddce72e (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 8cc04bff36432dd8189d7c78585e8dd3bfead7aa Author: Jérémie Dimino <je...@di...> Date: Sun Mar 7 21:59:41 2010 +0100 add a command to reset an AX12 ----------------------------------------------------------------------- Changes: diff --git a/PC_Mainboard/clients/script.ml b/PC_Mainboard/clients/script.ml index 55dfb13..64a5ed8 100644 --- a/PC_Mainboard/clients/script.ml +++ b/PC_Mainboard/clients/script.ml @@ -312,6 +312,9 @@ let () = register ~path:["ax12"] "action" (f1 (int ~default:254 "id")) (fun logger krobot id -> Krobot_unsafe.AX12.action krobot id); + register ~path:["ax12"] "reset" (f1 (int ~default:254 "id")) + (fun logger krobot id -> + Krobot_unsafe.AX12.reset krobot id); (* +---------------------------------------------------------------+ | Grip | diff --git a/PC_Mainboard/common/PcInterface.h b/PC_Mainboard/common/PcInterface.h index fa7faca..04a05cb 100644 --- a/PC_Mainboard/common/PcInterface.h +++ b/PC_Mainboard/common/PcInterface.h @@ -131,7 +131,8 @@ typedef struct _UP { #define AX12_GET_LOAD 0x07 #define AX12_GET_STATS 0x08 #define AX12_WRITE_REG 0x09 -#define AX12_ACTION 0x10 +#define AX12_ACTION 0x10 // <-- ou la loose, bibich sait pas compter en hexa -- dim +#define AX12_RESET 0x11 #define AX12_VALUE8 0x00 #define AX12_VALUE16 0x01 diff --git a/PC_Mainboard/interface/interface.ml b/PC_Mainboard/interface/interface.ml index 91f115d..a730840 100644 --- a/PC_Mainboard/interface/interface.ml +++ b/PC_Mainboard/interface/interface.ml @@ -365,6 +365,12 @@ let interfaces = [ ~args:[Cst(uint8, PcInterface.ax12_action); Arg("id", uint8)] (); + request + ~name:"reset" + ~code:PcInterface.cmd_ax12 + ~args:[Cst(uint8, PcInterface.ax12_reset); + Arg("id", uint8)] + (); ]); Module("logic-sensors", [ diff --git a/PC_Mainboard/python/dev/USB_Com_Layer/src/PcInterface.h b/PC_Mainboard/python/dev/USB_Com_Layer/src/PcInterface.h index fa7faca..04a05cb 100644 --- a/PC_Mainboard/python/dev/USB_Com_Layer/src/PcInterface.h +++ b/PC_Mainboard/python/dev/USB_Com_Layer/src/PcInterface.h @@ -131,7 +131,8 @@ typedef struct _UP { #define AX12_GET_LOAD 0x07 #define AX12_GET_STATS 0x08 #define AX12_WRITE_REG 0x09 -#define AX12_ACTION 0x10 +#define AX12_ACTION 0x10 // <-- ou la loose, bibich sait pas compter en hexa -- dim +#define AX12_RESET 0x11 #define AX12_VALUE8 0x00 #define AX12_VALUE16 0x01 diff --git a/PC_Mainboard/python/dev/User_Interface/PcInterface.h b/PC_Mainboard/python/dev/User_Interface/PcInterface.h index fa7faca..04a05cb 100644 --- a/PC_Mainboard/python/dev/User_Interface/PcInterface.h +++ b/PC_Mainboard/python/dev/User_Interface/PcInterface.h @@ -131,7 +131,8 @@ typedef struct _UP { #define AX12_GET_LOAD 0x07 #define AX12_GET_STATS 0x08 #define AX12_WRITE_REG 0x09 -#define AX12_ACTION 0x10 +#define AX12_ACTION 0x10 // <-- ou la loose, bibich sait pas compter en hexa -- dim +#define AX12_RESET 0x11 #define AX12_VALUE8 0x00 #define AX12_VALUE16 0x01 diff --git a/USB_Dev_Board/Firmware/PcInterface.h b/USB_Dev_Board/Firmware/PcInterface.h index fa7faca..04a05cb 100644 --- a/USB_Dev_Board/Firmware/PcInterface.h +++ b/USB_Dev_Board/Firmware/PcInterface.h @@ -131,7 +131,8 @@ typedef struct _UP { #define AX12_GET_LOAD 0x07 #define AX12_GET_STATS 0x08 #define AX12_WRITE_REG 0x09 -#define AX12_ACTION 0x10 +#define AX12_ACTION 0x10 // <-- ou la loose, bibich sait pas compter en hexa -- dim +#define AX12_RESET 0x11 #define AX12_VALUE8 0x00 #define AX12_VALUE16 0x01 diff --git a/USB_Module/Battery_Monitoring/Firmware/PcInterface.h b/USB_Module/Battery_Monitoring/Firmware/PcInterface.h index fa7faca..04a05cb 100644 --- a/USB_Module/Battery_Monitoring/Firmware/PcInterface.h +++ b/USB_Module/Battery_Monitoring/Firmware/PcInterface.h @@ -131,7 +131,8 @@ typedef struct _UP { #define AX12_GET_LOAD 0x07 #define AX12_GET_STATS 0x08 #define AX12_WRITE_REG 0x09 -#define AX12_ACTION 0x10 +#define AX12_ACTION 0x10 // <-- ou la loose, bibich sait pas compter en hexa -- dim +#define AX12_RESET 0x11 #define AX12_VALUE8 0x00 #define AX12_VALUE16 0x01 diff --git a/USB_Module/Motor_Controller/Firmware/PcInterface.h b/USB_Module/Motor_Controller/Firmware/PcInterface.h index fa7faca..04a05cb 100644 --- a/USB_Module/Motor_Controller/Firmware/PcInterface.h +++ b/USB_Module/Motor_Controller/Firmware/PcInterface.h @@ -131,7 +131,8 @@ typedef struct _UP { #define AX12_GET_LOAD 0x07 #define AX12_GET_STATS 0x08 #define AX12_WRITE_REG 0x09 -#define AX12_ACTION 0x10 +#define AX12_ACTION 0x10 // <-- ou la loose, bibich sait pas compter en hexa -- dim +#define AX12_RESET 0x11 #define AX12_VALUE8 0x00 #define AX12_VALUE16 0x01 diff --git a/USB_Module/Proximity_Sensor/Firmware/PcInterface.h b/USB_Module/Proximity_Sensor/Firmware/PcInterface.h index fa7faca..04a05cb 100644 --- a/USB_Module/Proximity_Sensor/Firmware/PcInterface.h +++ b/USB_Module/Proximity_Sensor/Firmware/PcInterface.h @@ -131,7 +131,8 @@ typedef struct _UP { #define AX12_GET_LOAD 0x07 #define AX12_GET_STATS 0x08 #define AX12_WRITE_REG 0x09 -#define AX12_ACTION 0x10 +#define AX12_ACTION 0x10 // <-- ou la loose, bibich sait pas compter en hexa -- dim +#define AX12_RESET 0x11 #define AX12_VALUE8 0x00 #define AX12_VALUE16 0x01 diff --git a/USB_Module/Robot_Interface/Firmware/PcInterface.h b/USB_Module/Robot_Interface/Firmware/PcInterface.h index fa7faca..04a05cb 100644 --- a/USB_Module/Robot_Interface/Firmware/PcInterface.h +++ b/USB_Module/Robot_Interface/Firmware/PcInterface.h @@ -131,7 +131,8 @@ typedef struct _UP { #define AX12_GET_LOAD 0x07 #define AX12_GET_STATS 0x08 #define AX12_WRITE_REG 0x09 -#define AX12_ACTION 0x10 +#define AX12_ACTION 0x10 // <-- ou la loose, bibich sait pas compter en hexa -- dim +#define AX12_RESET 0x11 #define AX12_VALUE8 0x00 #define AX12_VALUE16 0x01 diff --git a/USB_Module/Robot_Interface/Firmware/main.c b/USB_Module/Robot_Interface/Firmware/main.c index a994ee1..b81a33b 100644 --- a/USB_Module/Robot_Interface/Firmware/main.c +++ b/USB_Module/Robot_Interface/Firmware/main.c @@ -981,6 +981,9 @@ void ProcessIO(void) { actionAX12(ReceivedDataBuffer.DATA[1]); break; + case AX12_RESET: + resetAX12(ReceivedDataBuffer.DATA[1]) + default: ToSendDataBuffer.ERR = ERR_UNKNOWN_CMD; } hooks/post-receive -- krobot |