Skip to content
Snippets Groups Projects
Commit 52a03466 authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Added the algorithm to go down stairs.

Added the necessary changes in the dynamixel interface to execute it.
parent 20897b8d
No related branches found
No related tags found
2 merge requests!5Dynamixel manager,!2Smart charger fw
......@@ -643,8 +643,8 @@ typedef enum {
// | detected | enable
DARWIN_GRIPPER_CNTRL = 0x0251, // bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | bit 0
// left opened | right opened | left moving | right moving | close left | open left | close right | open right
DARWIN_STAIRS_CNTRL = 0x0252 // bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | bit 0
// current phase | climbing | | stop stairs | start stairs
DARWIN_STAIRS_CNTRL = 0x0252 // bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | bit 0
// current phase | climbing | stop stairs | start stairs down | start stairs up
}darwin_registers;
#define GPIO_BASE_ADDRESS 0x0100
......@@ -753,8 +753,9 @@ typedef enum {
#define STAIRS_MEM_LENGTH 1
#define STAIRS_EEPROM_ADDRESS 0x0066
#define STAIRS_EEPROM_LENGTH 30
#define STAIRS_START 0x01
#define STAIRS_STOP 0x02
#define STAIRS_START_UP 0x01
#define STAIRS_START_DOWN 0x02
#define STAIRS_STOP 0x04
#define STAIRS_STATUS 0x08
#define STAIRS_PHASE 0xF0
......
......@@ -12,7 +12,7 @@ extern "C" {
void stairs_init(uint16_t period_us);
inline void stairs_set_period(uint16_t period_us);
inline uint16_t stairs_get_period(void);
void stairs_start(void);
void stairs_start(uint8_t up);
void stairs_stop(void);
uint8_t is_climbing_stairs(void);
uint8_t stairs_get_phase(void);
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment