Исправления мелких багов
This commit is contained in:
12
utils.c
12
utils.c
@@ -445,10 +445,18 @@ void debug_print_robot_code(const struct robot_code *code, const short robot_id,
|
||||
* опустить траверсу
|
||||
* установить время ожидания барабана (для промывки 4а)
|
||||
*/
|
||||
void create_operation(struct robot_code *code, const short barrel_id, const short start_zone, const short dest_zone,
|
||||
void create_operation(struct robot_code *code, short barrel_id, const short start_zone, const short dest_zone,
|
||||
const short current_zone, const short robot_id) {
|
||||
// создаем код транзакции, пока обычный
|
||||
if (barrel_id >= BARRELS_COUNT) {
|
||||
barrel_id = -1;
|
||||
}
|
||||
code->barrel_id = barrel_id;
|
||||
|
||||
if (barrel_id >= 0) {
|
||||
barrels[barrel_id].flags.robot = robot_id;
|
||||
}
|
||||
|
||||
short cmd_index = 0;
|
||||
|
||||
if (!one_robot_mode && !hla_night_mode) {
|
||||
@@ -474,7 +482,7 @@ void create_operation(struct robot_code *code, const short barrel_id, const shor
|
||||
}
|
||||
|
||||
// если ночной режим, то нужно сразу обновить флаг у барабана
|
||||
if (hla_night_mode && barrel_id >= 0 && barrel_id < BARRELS_COUNT) {
|
||||
if (hla_night_mode && barrel_id >= 0) {
|
||||
barrels[barrel_id].flags.is_night = -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user