示例#1
0
文件: startlist.go 项目: masone/ogn
func handleOnGround(t time.Time, id string, cs string) {
	lastPosition := startlist_db.GetLastPosition(id, t)

	if lastPosition == "air" {
		//fmt.Printf("*** %s landed %s at %s\n", cs, t, id)
		startlist_db.InsertLanding(t, id, cs)
	} else {
		//fmt.Printf("    %s still on ground %s\n", cs, id)
	}
}
示例#2
0
文件: startlist.go 项目: masone/ogn
func handleAirborne(t time.Time, id string, cs string) {
	lastPosition := startlist_db.GetLastPosition(id, t)

	if lastPosition == "gnd" {
		//fmt.Printf("*** %s started (%s) at %s\n", cs, t, id)
		startlist_db.InsertStart(t, id, cs)

		go func() {
			delay := 20 * time.Second
			delayed := t.Add(delay)
			time.Sleep(delay)
			detectLaunchType(id, t, delayed, cs)
		}() // TODO: sync
	} else {
		//fmt.Printf("    %s still airborne %s\n", cs, id)
	}
}