|
@@ -2,7 +2,6 @@ package main
|
|
|
|
|
|
import (
|
|
import (
|
|
"cicv-data-closedloop/pjisuv_msgs"
|
|
"cicv-data-closedloop/pjisuv_msgs"
|
|
- "fmt"
|
|
|
|
"math"
|
|
"math"
|
|
"time"
|
|
"time"
|
|
)
|
|
)
|
|
@@ -32,9 +31,7 @@ func Rule(data *pjisuv_msgs.CommonVehicleCmd) string {
|
|
}
|
|
}
|
|
// 每3秒判断一次
|
|
// 每3秒判断一次
|
|
if time.Since(timeWindowBegin).Seconds() > float64(timeWindowLength) {
|
|
if time.Since(timeWindowBegin).Seconds() > float64(timeWindowLength) {
|
|
- fmt.Println("已缓存的数据为:", cacheSlice)
|
|
|
|
numCount := countSignChange(cacheSlice)
|
|
numCount := countSignChange(cacheSlice)
|
|
- fmt.Println("抖动次数为:", numCount)
|
|
|
|
if numCount > 3 {
|
|
if numCount > 3 {
|
|
return "CmdStrAngleUnstable"
|
|
return "CmdStrAngleUnstable"
|
|
}
|
|
}
|