func setInternalOrderLights(internal_order datatypes.InternalOrder) { if internal_order.Executed_order { driver.Elevator_set_button_lamp(driver.BUTTON_INSIDE_COMMAND, internal_order.Floor, false) } else { driver.Elevator_set_button_lamp(driver.BUTTON_INSIDE_COMMAND, internal_order.Floor, true) } }
func setExternalOrderLights(external_order datatypes.ExternalOrder) { if external_order.Direction == 1 { if external_order.Executed_order { driver.Elevator_set_button_lamp(driver.BUTTON_OUTSIDE_UP, external_order.Floor, false) } else { driver.Elevator_set_button_lamp(driver.BUTTON_OUTSIDE_UP, external_order.Floor, true) } } else if external_order.Direction == -1 { if external_order.Executed_order { driver.Elevator_set_button_lamp(driver.BUTTON_OUTSIDE_DOWN, external_order.Floor, false) } else { driver.Elevator_set_button_lamp(driver.BUTTON_OUTSIDE_DOWN, external_order.Floor, true) } } }