Skip to content

Instantly share code, notes, and snippets.

@KKostya
Created July 25, 2018 13:46
Show Gist options
  • Save KKostya/b2e5e73ede74833d8a4349805365bf38 to your computer and use it in GitHub Desktop.
Save KKostya/b2e5e73ede74833d8a4349805365bf38 to your computer and use it in GitHub Desktop.
let one_step state =
match state.incoming with None -> state | Some in_msg ->
let state = { state with incoming = None; outgoing = None } in
match in_msg with
| Sensor laserScan ->
let min_range, min_direction = get_min_and_direction laserScan in
process_sensor_message state min_range min_direction
| Clock _ -> process_clock_message state
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment