position_ += ELEVATOR_STEP;
// TODO: Call into the GUI to update the position
- gui_update_position_label (number_, (float)position_);
+ gui_update_position_label (number_, (float)position_, direction_);
std::cout << "Updating the GUI with our position: " << position_ << std::endl;
}
position_ -= ELEVATOR_STEP;
// TODO: Call into the GUI to update the position
- gui_update_position_label (number_, (float)position_);
+ gui_update_position_label (number_, (float)position_, direction_);
std::cout << "Updating the GUI with our position: " << position_ << std::endl;
}
void Elevator::transition_move_idle ()
{
direction_ = IDLE;
+ // TODO: Call into the GUI to update the position
+ gui_update_position_label (number_, (float)position_, direction_);
// do not change position while IDLE
}
{
stops_.remove (Stop(position_, direction_));
gui_unpress_call_button ((int)position_, direction_);
+ gui_unpress_request_button (number_, (int)position_);
}
// TODO: Call into the GUI to open the door
bool Elevator::is_idle () const
{
+ if (stops_.size() != 0)
+ return false;
+
return direction_ == IDLE;
}