Сделан и отлажен инкремент зон травления и цинкования.
This commit is contained in:
35
utils.h
35
utils.h
@@ -182,6 +182,12 @@ extern short hla_time_reagent;
|
||||
extern short hla_time_washing_1;
|
||||
extern short hla_time_washing_2;
|
||||
|
||||
// выбор зоны промежуточной с панели
|
||||
extern short hla_exchange_zone;
|
||||
|
||||
// выбор отключенных зон
|
||||
extern short hla_disabled_zones;
|
||||
|
||||
extern char hla_robot1_en;
|
||||
extern char hla_robot2_en;
|
||||
|
||||
@@ -220,6 +226,9 @@ extern char scheduler_start_signal;
|
||||
#define hla_time_washing_1 _c_hla_time_washing_1
|
||||
#define hla_time_washing_2 _c_hla_time_washing_2
|
||||
|
||||
#define hla_exchange_zone _c_hla_exchange_zone
|
||||
#define hla_disabled_zones _c_hla_disabled_zones
|
||||
|
||||
#define hla_robot1_en _c_hla_robot1_en
|
||||
#define hla_robot2_en _c_hla_robot2_en
|
||||
|
||||
@@ -281,6 +290,22 @@ extern const short NIGHT_ZONES[9];
|
||||
#define ROBOT_CMD_INC_ZONE(arg) ((ROBOT_CMD_INC_ZONE_code) | (short)(arg))
|
||||
|
||||
|
||||
/* ======================== DISABLED ZONES DEFS ======================== */
|
||||
|
||||
#define DISABLED_ETCH_1 0x0001
|
||||
#define DISABLED_ETCH_2 0x0002
|
||||
#define DISABLED_ETCH 0x0003
|
||||
|
||||
#define DISABLED_GAL_1 0x0004
|
||||
#define DISABLED_GAL_2 0x0008
|
||||
#define DISABLED_GAL_3 0x0010
|
||||
#define DISABLED_GAL_4 0x0020
|
||||
#define DISABLED_GAL_5 0x0040
|
||||
#define DISABLED_GAL_6 0x0080
|
||||
#define DISABLED_GAL_7 0x0100
|
||||
#define DISABLED_GAL_8 0x0200
|
||||
#define DISABLED_GAL 0x03FC
|
||||
|
||||
/* ======================== IO DEFS ======================== */
|
||||
|
||||
#define ROBOT1_X 1
|
||||
@@ -294,9 +319,6 @@ extern const short NIGHT_ZONES[9];
|
||||
|
||||
/* ======================== ROBOT DEFS ======================== */
|
||||
|
||||
|
||||
|
||||
|
||||
#define MB_CMD_WRITE_FLAG 5
|
||||
#define MB_CMD_WRITE_REG 6
|
||||
|
||||
@@ -350,6 +372,13 @@ char remove_barrel_from_zone(short zone);
|
||||
void create_operation(struct robot_code *code, const short barrel_id, const short start_zone, const short dest_zone,
|
||||
const short current_zone, const short robot_id);
|
||||
|
||||
/**
|
||||
* Инкрементировать зону цинкования или зону травления.
|
||||
* @param zone ROBOT_ZONE_ETCH или ROBOT_ZONE_GAL. Для других значений функция вернет false.
|
||||
* @return true, если существует хотя бы одна зона, куда можно положить баран. При любых ошибках вернет false.
|
||||
*/
|
||||
char increment_zone(short zone);
|
||||
|
||||
#ifdef EMULATOR
|
||||
void debug_print_robot_code(const struct robot_code *code, const short robot_id, int fd);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user