diff --git a/fuse.go b/fuse.go index d4c141a..3dc1ec1 100644 --- a/fuse.go +++ b/fuse.go @@ -88,6 +88,13 @@ func converterMotionValues(ctx context.Context, in <-chan infinitime.MotionValue return out } +func converter1String(ctx context.Context, in string) <-chan []byte { + out := make(chan []byte, 2) + out <- []byte(in + "\n") + close(out) + return out +} + type ITProperty struct { name string Ino uint64 @@ -619,6 +626,14 @@ func startFuse(ctx context.Context, dev *infinitime.Device) error { ans, err := dev.WatchStepCount(ctx) return converterU32(ctx, ans), err } + properties[4].gen = func(ctx context.Context) (<-chan []byte, error) { + ans, err := dev.Version() + return converter1String(ctx, ans), err + } + properties[5].gen = func(ctx context.Context) (<-chan []byte, error) { + ans := dev.Address() + return converter1String(ctx, ans), nil + } myfs, err = dev.FS() if err != nil {