package main

import (
	"cicv-data-closedloop/kinglong_msgs"
	"fmt"
)

func Topic() string {
	return "/nodefault_info"
}
func Label() string {
	return "plannerfault"
}
func Rule(data *kinglong_msgs.FaultInfo) string {
	// 驾驶员接管
	if string(Hex(int(data.ErrorCode))[2]) == "2" {
		return "plannerfault"
	}
	return ""
}

func Hex(num int) string {
	return fmt.Sprintf("0x%x", num)
}
