feat(platform): expose missing sources per vehicle
This commit is contained in:
@@ -58,6 +58,16 @@ type Service struct {
|
||||
|
||||
var canonicalVehicleProtocols = []string{"GB32960", "JT808", "YUTONG_MQTT"}
|
||||
|
||||
func missingCanonicalProtocols(protocols []string) []string {
|
||||
missing := make([]string, 0, len(canonicalVehicleProtocols))
|
||||
for _, protocol := range canonicalVehicleProtocols {
|
||||
if !containsString(protocols, protocol) {
|
||||
missing = append(missing, protocol)
|
||||
}
|
||||
}
|
||||
return missing
|
||||
}
|
||||
|
||||
func NewService(store Store) *Service {
|
||||
return &Service{store: store}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user