robofsm: update jaws min, max position, now is open, close, catch values as defines in header file
//close jaw, max_pos, open jaw min_pos
//letf jaw potenciometer on ADC 0, header J32 on board
- fsm_jaw_left.max_pos=0x310; //max 0x324
- fsm_jaw_left.min_pos=0xB0; //min 0xC0
+ fsm_jaw_left.max_pos=0x320; //max 0x324
+ fsm_jaw_left.min_pos=0xB0; //min 0xC3
fsm_jaw_left.act_pos = adc_val[0];
//close jaw, max_pos, open jaw min_pos
//letf jaw potenciometer on ADC 1, header J33 on board
- fsm_jaw_right.max_pos=0x370; //max 0x382
- fsm_jaw_right.min_pos=0x080; //min 0x8D
+ fsm_jaw_right.max_pos=0x380; //max 0x382
+ fsm_jaw_right.min_pos=0x010; //min 0xF5
fsm_jaw_right.act_pos = adc_val[1];
//left jaw engine is engine A, conector MOTA on board
{
switch (cmd) {
case OPEN:
- orte->jaws_cmd.req_pos.left=0x1C3;
- orte->jaws_cmd.req_pos.right=0x1B3;
- break;
+ orte->jaws_cmd.req_pos.left = JAW_LEFT_OPEN;
+ orte->jaws_cmd.req_pos.right = JAW_RIGHT_OPEN;
+ break;
case CLOSE:
- orte->jaws_cmd.req_pos.left=0x30F;
- orte->jaws_cmd.req_pos.right=0x36F;
+ orte->jaws_cmd.req_pos.left = JAW_LEFT_CLOSE;
+ orte->jaws_cmd.req_pos.right = JAW_RIGHT_CLOSE;
break;
case CATCH:
- orte->jaws_cmd.req_pos.left = 0x25F;
- orte->jaws_cmd.req_pos.right = 0x27F;
+ orte->jaws_cmd.req_pos.left = JAW_LEFT_CATCH;
+ orte->jaws_cmd.req_pos.right = JAW_RIGHT_CATCH;
break;
default:
- orte->jaws_cmd.req_pos.left=0x1C3;
- orte->jaws_cmd.req_pos.right=0x1B3;
+ orte->jaws_cmd.req_pos.left = JAW_LEFT_OPEN;
+ orte->jaws_cmd.req_pos.right = JAW_RIGHT_OPEN;
}
}
CATCH
} jaws_cmds;
+#define JAW_LEFT_OPEN 0x1C3
+#define JAW_RIGHT_OPEN 0x1B3
+
+#define JAW_LEFT_CLOSE 0x31F
+#define JAW_RIGHT_CLOSE 0x37F
+
+#define JAW_LEFT_CATCH 0x25F
+#define JAW_RIGHT_CATCH 0x27F
+
#ifdef __cplusplus
extern "C" {
#endif